:root {
    --primary: #2d8a8a;
    --primary-dark: #246d6d;
    --bg-light: #f4f7f6;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #666666;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --success: #27ae60;
    --danger: #e74c3c;
    --overlay: rgba(0, 0, 0, 0.4);
    --sport: #2d8a8a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    width: 100%;
    background-color: var(--primary);
    background-size: cover;
    background-position: center;
    padding: 100px 20px;
    text-align: center;
    color: white;
}

header h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.main-content {
    max-width: 800px;
    margin: -50px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.module {
    background: var(--white);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border-top: 6px solid var(--sport);
    transition: border-color 0.3s;
}

/* Update around line 81 */
#user-profile-section {
    display: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    gap: 16px; /* Increased gap for better spacing when wrapped */
    flex-wrap: wrap; /* Allows items to move to the next line */
    border-left: none;
    border-top: 6px solid var(--primary) !important;
}



#welcome-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-signout {
    padding: 8px 20px;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    background: var(--danger);
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-signout:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Update around line 104 */
#login-prompt {
    background: var(--white);
    border-radius: 24px;
    padding: 32px; /* Changed to match attendee box */
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border-top: 6px solid var(--primary); /* Changed from border-left to border-top */
    border-left: none; /* Remove the blue line from the left */
    text-align: center;
}

#login-prompt p {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.btn-login-trigger {
    padding: 10px 25px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login-trigger:hover {
    background: var(--primary);
    color: white;
}

.module.is-full {
    border-top-color: var(--danger);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.module h2 {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 2px;
    font-weight: 800;
}

#attendee-count {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
    font-size: 0.9rem;
}

.full-badge {
    display: none;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    margin-left: 10px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}


.dot {
    height: 8px;
    width: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.stopped {
    animation: none;
    background-color: var(--danger);
}


/* Re-added Pulse Animations */
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

.scroll-container {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 12px;
}

.scroll-container::-webkit-scrollbar { width: 6px; }
.scroll-container::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f4f4;
}

.status-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.confirmed { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.status-badge.queue { background-color: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }

.btn-main {
    flex: 1;
    padding: 18px;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    background: var(--primary);
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
    box-shadow: 0 4px 15px rgba(45, 138, 138, 0.2);
}

.btn-main:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* New Hover Effect */
.btn-main:hover:not(.full-mode) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 138, 138, 0.4);
    filter: brightness(1.1);
}

/* New Click/Press Effect */
.btn-main:active:not(.full-mode) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(45, 138, 138, 0.3);
}

.full-mode {
    background: var(--text-muted);
}

.full-mode:hover {
    background: var(--text-muted);
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 32px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #eee;
    margin-bottom: 20px;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.btn-leave {
    background: var(--danger);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.btn-leave:hover:not(.full-mode) {
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    filter: brightness(1.1);
    transform: translateY(-3px);
}

.btn-secondary {
    color: black;
    flex: 1;
    padding: 12px;
    border-radius: 100px;
    border: none;
    background: #eee;
    cursor: pointer;
}

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

.btn-submit {
    flex: 2;
    padding: 12px;
    border-radius: 100px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.description-text {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-top: 10px;
}

.time-badge {
    display: inline-block;
    background-color: var(--success);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.skill-badge {
    display: inline-block;
    background-color: var(--danger);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Container to hold both modules side-by-side */
.dashboard-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap; /* Stacks on smaller screens */
}

#dashboard-grid {
    transition: filter 0.4s ease, opacity 0.4s ease;
}

/* The class we will toggle via JS */
.grid-blur {
    filter: blur(10px);
    pointer-events: none; /* Prevent users from clicking buttons while blurred */
    opacity: 0.8;        /* Slight fade makes the blur look more high-end */
}

.column-left {
    flex: 1.2; /* Attendee module takes slightly more space */
    min-width: 320px;
}

.column-right {
    flex: 1;
    min-width: 320px;
}

.time-badge {
    display: inline-block;
    background-color: var(--success);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.description-text {
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Help Icon Styling */
#description-module { position: relative; }

.help-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.help-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Unified Flex Alignment for Headers and Profile */
.module h2 {
    display: flex;
    align-items: center;
    gap: 8px; /* Consistent spacing between text and icon */
}

#profile-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: fit-content;
}

.profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Keep these two buttons on the same line as each other */
}

@media (max-width: 600px) {
    #user-profile-section {
        justify-content: center; /* Centers everything when stacked */
        text-align: center;
        padding: 24px;
    }

    #profile-info {
        justify-content: center;
        width: 100%; /* Forces buttons to the next line */
    }

    .profile-actions {
        width: 100%;
        justify-content: center;
    }
}

.help-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--primary); /* Uses your teal theme color */
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1; /* Critical for vertical centering */
}

.help-badge:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

/* Subtle version for the profile section */
#user-profile-section .help-badge {
    background-color: var(--text-muted);
}

#user-profile-section .help-badge:hover {
    background-color: var(--primary);
}

.btn-feedback {
    padding: 8px 20px;
    border: 2px solid var(--primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    background: transparent;
    color: var(--primary);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-feedback:hover {
    background: var(--primary);
    color: white;
}

/* Apply the 'button hover' look to the name specifically */
.list-item.is-me .attendee-name {
    background-color: var(--primary, #2d8a8a); /* Matches your button hover color */
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px; /* Makes it look like a pill/button */
    font-weight: 500;
    display: inline-block;
}

/* Optional: remove any default margins to keep it centered with the badge */
.list-item.is-me {
    align-items: center;
}

/* Container to keep name and "You" badge side-by-side */
.name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* The "You" pill badge */
.you-badge {
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sport-selection-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
    background: var(--white);
    padding: 16px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.sport-selection-container label {
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
}

.custom-select-wrapper {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.sport-dropdown {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-light);
    border: 2px solid transparent;
    padding: 10px 40px 10px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sport-dropdown:hover {
    border-color: var(--primary);
    background-color: var(--white);
}

.sport-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 138, 138, 0.1);
}

.select-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    font-size: 0.8rem;
}

.notify-item {
    display: flex;
    align-items: center; /* This vertically centers the text and checkbox */
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px; /* Adds space between the rows */
}

.notify-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0; /* Forces margin to 0 except for the right side */
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0; /* Prevents the checkbox from squishing on small screens */
}

.notify-item span {
    line-height: 1; /* Ensures the text height matches the checkbox alignment */
}

.notify-item:hover {
    background: #e8eeee;
}

.notify-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary); /* Styles the checkbox teal */
}

.notify-item label {
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    flex-grow: 1;
    margin: 0;
}

@media (max-width: 600px) {
    .sport-selection-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .custom-select-wrapper {
        max-width: 100%;
    }
}

.btn-notify {
    color: black;
    flex: none !important;    /* Forces it to NOT stretch */
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: #eee;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-notify:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.btn-notify i {
    font-size: 1rem;
}

#loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101; /* Stay above the blur */

    /* The Pill Container */
    background: rgba(0, 0, 0, 0.75); /* Darker background for high contrast */
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);

    /* Layout for Text + Spinner */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* The Loading Text */
.loading-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.loading-visible {
    opacity: 0.3;
    visibility: visible;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

#admin-session-actions button {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

#admin-session-actions {
    /* This will be set to 'flex' by your JavaScript */
    box-sizing: border-box;
}

#admin-session-actions button {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 20px;
    margin: 0; /* Remove any default button margins */
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

#admin-session-actions button:active {
    transform: scale(0.98);
}

.badge-cancelled {
    background-color: #e0e0e0;
    color: #666;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #ccc;
    vertical-align: middle;
}

/* Container for the hearts */
.heart-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Don't block clicks */
    overflow: hidden;
}

/* Individual heart styling */
.floating-heart {
    position: absolute;
    bottom: -20px;
    color: #e74c3c;
    font-size: 1.2rem;
    user-select: none;
    animation: floatUp 3s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1.5) rotate(20deg);
        opacity: 0;
    }
}

/* --- Membership Button --- */
#become-member-btn {
    display: none; /* JS handles visibility */
    padding: 10px 24px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(45, 138, 138, 0.2);
    white-space: nowrap;
}

#become-member-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 138, 138, 0.3);
    filter: brightness(1.1);
}

#become-member-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(45, 138, 138, 0.3);
}

/* --- Payment & Registration Page Styles --- */
.registration-module {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 32px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border-top: 6px solid var(--primary);
}

.registration-module h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-sublabel {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -6px;
    margin-bottom: 10px;
    display: block;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #eee;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.2s;
    background-color: var(--bg-light);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 14px;
    background: var(--bg-light);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: 2px solid transparent;
}

.radio-option:hover {
    background: #e8eeee;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-option span {
    font-weight: 600;
    font-size: 0.95rem;
}

.swish-instructions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #856404;
}

.qr-container {
    text-align: center;
    margin-bottom: 30px;
}

.qr-container img {
    width: 100%;
    max-width: 250px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
