* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #222;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.tagline {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.nav-link:hover {
    background: #0056b3;
}

.back-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link:hover {
    text-decoration: underline;
}

.content {
    color: #555;
    font-size: 1rem;
    margin-top: 30px;
}

.content h2 {
    margin-bottom: 20px;
    color: #222;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
}

/* Admin Panel */
.admin-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.admin-panel h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Events List */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.event-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-card.registered {
    border-left: 4px solid #28a745;
}

.event-card h3 {
    margin-bottom: 10px;
    color: #222;
    font-size: 1.3rem;
}

.event-date, .event-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.event-description {
    color: #555;
    margin: 15px 0;
    line-height: 1.5;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

/* Event Results */
.event-results {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.event-results h3 {
    margin-bottom: 10px;
}

.event-results pre {
    background: white;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .events-list {
        grid-template-columns: 1fr;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}
