/* Common styles shared across all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

body {
    background: #fafafa;
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header */
.header {
    background: white;
    padding: 16px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 180px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: #5B6FE0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    color: #1a1a1a;
}

.login-btn {
    background: transparent;
    color: #4c5fd5;
    border: 2px solid #4c5fd5;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #4c5fd5;
    color: white;
}

.register-btn,
.logout-btn {
    background: #4c5fd5;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.register-btn:hover,
.logout-btn:hover {
    background: #3a4ba3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 95, 213, 0.3);
}

.register-btn:active,
.logout-btn:active {
    transform: translateY(0);
}

/* Avatars */
.attendee-avatars {
    display: flex;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid white;
    margin-left: -12px;
}

.avatar:first-child {
    margin-left: 0;
}

.avatar-1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.avatar-2 {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.avatar-3 {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.avatar-4 {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.avatar-5 {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 12px 20px;
    }

    .logo {
        width: 140px;
        height: 50px;
    }

    .nav-menu {
        gap: 20px;
    }

    .nav-menu a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        display: none;
    }

    .user-menu {
        gap: 8px;
    }

    .login-btn,
    .register-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Event Registration Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.member-badge-inline {
    display: inline-block;
    background: linear-gradient(135deg, #5B6FE0, #4c5fd5);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.registration-fee {
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    border: 2px solid #5B6FE0;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.registration-fee.free-event {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #22c55e;
}

.price-display {
    text-align: center;
}

.price-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-amount {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #5B6FE0;
    margin-bottom: 8px;
    line-height: 1;
}

.price-type {
    display: block;
    font-size: 14px;
    color: #64748b;
    font-style: italic;
}

.free-badge {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #22c55e;
}

.price-prompt {
    text-align: center;
}

.prompt-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

.prompt-text {
    display: block;
    font-size: 15px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 500;
}

.price-hints {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.price-hints span {
    font-size: 13px;
    color: #64748b;
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.registration-fee h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
}

.fee-details p {
    margin: 8px 0;
    font-size: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.required {
    color: #e53e3e;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
    color: #1a1a1a;
}

.form-control:disabled,
.form-control[readonly] {
    background: #f5f5f5;
    color: #333;
    cursor: not-allowed;
    opacity: 1;
    -webkit-text-fill-color: #333;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

select.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 1;
}

select.form-control option {
    color: #1a1a1a;
    background: white;
    padding: 10px;
    font-size: 15px;
}

/* Modal form fixes for inputs and selects */
.modal .form-control {
    height: 44px;
    /* tall enough for text */
    line-height: 1.4;
    /* vertically center text */
    padding: 8px 16px;
    /* top/bottom + left/right padding */
    box-sizing: border-box;
    /* ensure padding included in height */
}

/* Fix select specifically (keep arrow visible) */
.modal select.form-control {
    padding-right: 36px;
    /* leave space for dropdown arrow */
    background-position: right 12px center;
    /* arrow position */
}

/* Optional: disabled styling for inputs/selects */
.modal .form-control:disabled,
.modal .form-control[readonly] {
    background-color: #f5f5f5;
    color: #333;
    cursor: not-allowed;
    opacity: 1;
}

select.form-control optgroup {
    color: #999;
    font-size: 12px;
}

.form-control:focus {
    outline: none;
    border-color: #5B6FE0;
    box-shadow: 0 0 0 3px rgba(91, 111, 224, 0.1);
}

.error {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 6px;
}

.consent-group {
    margin: 24px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.success-message {
    display: block;
    color: #22c55e;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.btn-submit {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #5B6FE0, #4c5fd5);
    border: none;
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 111, 224, 0.3);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

/* Thank You Page */
.thank-you-container {
    max-width: 600px;
    margin: 80px auto;
    padding: 0 20px;
}

.thank-you-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 60px 40px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #5B6FE0, #4c5fd5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-icon i {
    font-size: 40px;
    color: white;
}

.thank-you-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.thank-you-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 32px;
}

.registration-details {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #555;
}

.detail-value {
    color: #1a1a1a;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #5B6FE0, #4c5fd5);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 111, 224, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #5B6FE0;
    color: #5B6FE0;
}

.btn-secondary:hover {
    background: #f8f9fb;
}

@media (max-width: 768px) {
    .thank-you-card {
        padding: 40px 24px;
    }

    .thank-you-title {
        font-size: 24px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}