html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #10101c;
    color: #ffffff;
    overflow-x: hidden;
}

.Section_top {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(24px, 4vh, 48px) clamp(14px, 2.5vw, 24px);
    box-sizing: border-box;
}

.image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(16, 16, 28, 0.72) 0%, rgba(10, 8, 20, 0.90) 100%);
    z-index: 2;
}

.image-container div {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    animation: slideshow 12s infinite;
}

/* Specify animation timing for each slideshow image */
.image-container div:nth-child(1) {
    animation-delay: 0s;
}

.image-container div:nth-child(2) {
    animation-delay: 4s;
}

.image-container div:nth-child(3) {
    animation-delay: 8s;
}

@keyframes slideshow {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    33% {
        opacity: 1;
    }
    43% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.content {
    position: relative;
    z-index: 3;
    max-width: 640px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#title {
    margin: 0 0 10px 0;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    text-align: center;
    font-size: clamp(26px, 5vw, 42px);
    font-style: italic;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

#title span {
    color: #a685ff;
    background: linear-gradient(135deg, #a685ff 0%, #3ae8bd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#subtitle {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* User Status Chip on Landing Page */
.user-status-banner {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(166, 133, 255, 0.16);
    border: 1px solid rgba(166, 133, 255, 0.35);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: #bdb5ff;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.user-status-banner strong {
    color: #ffffff;
    font-weight: 700;
}

.sign-out-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sign-out-btn:hover {
    background: rgba(233, 69, 85, 0.85);
    border-color: rgba(233, 69, 85, 1);
}

/* Play Now Button */
.play-btn-link {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 32px;
}

.play-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 48px;
    font-size: 20px;
    font-family: inherit;
    font-style: italic;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #10101c;
    background: linear-gradient(180deg, #97e851 0%, #479440 100%);
    border: none;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(71, 148, 64, 0.45),
                inset 0 2px 1px rgba(255, 255, 255, 0.4),
                inset 0 -2px 1px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.play-now-btn:hover {
    transform: translateY(-2px) scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 10px 28px rgba(71, 148, 64, 0.6),
                inset 0 2px 1px rgba(255, 255, 255, 0.5);
}

.play-now-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4),
                inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.play-icon {
    fill: #10101c;
    transition: transform 0.15s ease;
}

.play-now-btn:hover .play-icon {
    transform: scale(1.1);
}

/* Weekly Leaderboard Card */
.leaderboard-card {
    width: 100%;
    max-width: 520px;
    background: rgba(23, 18, 53, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 22px 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-transform: none;
    box-sizing: border-box;
    margin: 0 auto;
}

.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.leaderboard-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trophy-icon {
    font-size: 20px;
    line-height: 1;
}

.leaderboard-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.leaderboard-badge {
    background: rgba(166, 133, 255, 0.18);
    border: 1px solid rgba(166, 133, 255, 0.35);
    color: #bdb5ff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 20px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 16, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 14px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.09);
    transform: translateX(3px);
}

.leaderboard-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-rank {
    font-size: 0.95rem;
    font-weight: 800;
    font-style: italic;
    width: 26px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

.rank-1 .leaderboard-rank {
    color: #ffc628;
    text-shadow: 0 0 8px rgba(255, 198, 40, 0.5);
}

.rank-2 .leaderboard-rank {
    color: #e2e1f0;
    text-shadow: 0 0 8px rgba(226, 225, 240, 0.4);
}

.rank-3 .leaderboard-rank {
    color: #ffa43d;
    text-shadow: 0 0 8px rgba(255, 164, 61, 0.4);
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.rank-1 .leaderboard-avatar {
    border-color: #ffc628;
}

.rank-2 .leaderboard-avatar {
    border-color: #d9d7f0;
}

.rank-3 .leaderboard-avatar {
    border-color: #ffa43d;
}

.leaderboard-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
    letter-spacing: 0.3px;
}

.leaderboard-score {
    font-size: 1.05rem;
    font-weight: 800;
    font-style: italic;
    color: #97e851;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.leaderboard-score span {
    font-size: 0.72rem;
    font-weight: 500;
    font-style: normal;
    color: rgba(255, 255, 255, 0.55);
    margin-left: 2px;
}

.leaderboard-footer {
    margin-top: 14px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.leaderboard-item.placeholder {
    opacity: 0.6;
    background: rgba(16, 16, 28, 0.35);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.leaderboard-item.placeholder:hover {
    background: rgba(16, 16, 28, 0.45);
    transform: none;
}

.leaderboard-avatar.placeholder-avatar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder-dash {
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.leaderboard-name.placeholder-text {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    letter-spacing: 2px;
}

.leaderboard-score.placeholder-score {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    letter-spacing: 2px;
}

/* ========================================================
   Auth & Account Styling (login.html)
   ======================================================== */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(23, 18, 53, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-transform: none;
    box-sizing: border-box;
    margin: 12px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-pill-badge {
    background: rgba(166, 133, 255, 0.18);
    border: 1px solid rgba(166, 133, 255, 0.35);
    color: #bdb5ff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
}

.auth-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
}

/* Google Button */
.google-signin-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffffff;
    color: #1f1f1f;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.google-signin-btn:hover {
    transform: translateY(-2px);
    background-color: #f8f9fa;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.google-signin-btn:active {
    transform: translateY(1px);
}

.google-icon {
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    width: 100%;
    display: flex;
    align-items: center;
    margin: 24px 0 20px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-divider span {
    padding: 0 12px;
}

/* Guest Form */
.guest-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(16, 16, 28, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    border-color: #a685ff;
    box-shadow: 0 0 0 3px rgba(166, 133, 255, 0.25);
}

.auth-input.has-error {
    border-color: #e94555 !important;
    box-shadow: 0 0 0 3px rgba(233, 69, 85, 0.35) !important;
}

.input-error-msg {
    display: none;
    color: #e94555;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 6px;
    margin-left: 4px;
    text-align: left;
    letter-spacing: 0.3px;
}

.input-group.error .input-error-msg {
    display: block;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.guest-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-family: inherit;
    font-style: italic;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #10101c;
    background: linear-gradient(180deg, #97e851 0%, #479440 100%);
    border: none;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(71, 148, 64, 0.4),
                inset 0 2px 1px rgba(255, 255, 255, 0.4),
                inset 0 -2px 1px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.guest-submit-btn:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 8px 24px rgba(71, 148, 64, 0.55);
}

.guest-submit-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* Auth Footer */
.auth-footer {
    margin-top: 24px;
}

.back-home-link {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.back-home-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    #title {
        font-size: 26px;
        letter-spacing: 2px;
        padding: 10px 16px;
    }
    .play-now-btn {
        padding: 14px 34px;
        font-size: 17px;
    }
    .leaderboard-card, .auth-card {
        padding: 18px 16px;
    }
    .leaderboard-item {
        padding: 8px 10px;
    }
    .leaderboard-name {
        font-size: 0.85rem;
    }
    .leaderboard-score {
        font-size: 0.95rem;
    }
}

/* ── Full-Screen Loading Curtain ────────────────────────────── */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #10101c;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: all;
}

.page-loader.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.page-loader .loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.12);
    border-top-color: #97e851;
    border-right-color: #8c52ff;
    border-radius: 50%;
    animation: loader-spin 0.85s linear infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.page-loader .loader-text {
    font-size: clamp(15px, 1.2vw + 10px, 19px);
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    font-family: inherit;
}

