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

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    background: #000428;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    height: 100vh;
    height: 100dvh;
    color: #fff;
    overflow: hidden;
    position: relative;
}

/* Dynamic Space Background */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(to bottom, #020111 0%, #050520 100%);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: #000 url('/assets/stars.png') repeat;
    z-index: 0;
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: transparent url('/assets/twinkling.png') repeat;
    z-index: 1;
    animation: move-twinkling 200s linear infinite;
    opacity: 0.5;
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: transparent url('/assets/clouds.png') repeat;
    z-index: 2;
    animation: move-clouds 200s linear infinite;
    opacity: 0.4;
}

@keyframes move-twinkling {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -10000px 5000px;
    }
}

@keyframes move-clouds {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 10000px 0;
    }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 1);
    animation: animate-shooting 3s linear infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

.shooting-star:nth-child(4) {
    top: 0;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 3s;
}

.shooting-star:nth-child(5) {
    top: 0;
    left: 50%;
    animation-delay: 2s;
    animation-duration: 4s;
}

.shooting-star:nth-child(6) {
    top: 0;
    left: 85%;
    animation-delay: 4s;
    animation-duration: 3.5s;
}

@keyframes animate-shooting {
    0% {
        transform: rotate(315deg) translateX(0);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: rotate(315deg) translateX(-1000px);
        opacity: 0;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Main Layout - Single column */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

.groan-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 40px;
}

/* Metrics Sidebar */




/* Contribution Stat */
.contribution-stat {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 15px 20px;
    border-radius: 15px;
    border: 4px solid #fff;
    box-shadow: 0 6px 0 #000, 0 8px 20px rgba(0, 0, 0, 0.5);
    min-width: 150px;
    text-align: center;
}

.contribution-label {
    display: block;
    font-size: 1rem;
    color: #ffff00;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
}

.contribution-value {
    display: block;
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* Privacy Settings */
.privacy-settings {
    margin-top: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.privacy-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffff00;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}

.privacy-dropdown {
    padding: 8px 15px;
    border-radius: 12px;
    border: 3px solid #fff;
    font-size: 1rem;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #000, 0 6px 10px rgba(0, 0, 0, 0.4);
    font-family: 'Comic Sans MS', cursive;
    text-shadow: 1px 1px 0 #000;
    transition: all 0.2s;
}

.privacy-dropdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.5);
}

.privacy-dropdown option {
    background: #333;
    color: #fff;
}

/* Time Stats Popup */
.time-stats-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.time-stats-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

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

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

.time-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.time-stats-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.time-stats-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.time-stats-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.time-stats-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.time-stats-body {
    padding: clamp(10px, 2vh, 20px);
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.2vh, 10px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.time-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 2vh, 15px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.time-stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.time-stat-highlight {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.time-stat-highlight:hover {
    transform: translateX(5px) scale(1.02);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.time-stat-period {
    font-size: clamp(0.85rem, 1.8vh, 1.1rem);
    color: #00ffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.time-stat-highlight .time-stat-period {
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
}

.time-stat-count {
    font-size: clamp(0.9rem, 2vh, 1.3rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* My Stats Popup */
.my-stats-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.my-stats-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.my-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.my-stats-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.my-stats-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.my-stats-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.my-stats-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.my-stats-mode-toggle {
    display: flex;
    gap: 10px;
    padding: 15px;
    justify-content: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.my-stats-mode-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 20px;
    color: #fff;
    font-size: clamp(0.85rem, 1.8vh, 1rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 1px 1px 0 #000;
}

.my-stats-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.my-stats-mode-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.my-stats-body {
    padding: clamp(15px, 3vh, 25px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.my-stats-section {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vh, 16px);
}

.my-stats-section .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 2vh, 15px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.my-stats-section .stat-label {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #00ffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.my-stats-section .stat-value {
    font-size: clamp(0.95rem, 2vh, 1.2rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
}

.my-stats-section .progress-container,
.my-stats-alltime .progress-container {
    margin-top: clamp(8px, 1.5vh, 12px);
    width: 100%;
    height: clamp(20px, 3vh, 30px);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid #fff;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.my-stats-section .progress-bar,
.my-stats-alltime .progress-bar {
    height: 100%;
    width: 0%;
    min-width: 2px;
    background: linear-gradient(90deg, #00ff88 0%, #00cc66 50%, #00ff88 100%);
    border-radius: 13px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.my-stats-section .progress-text,
.my-stats-alltime .progress-text {
    text-align: center;
    font-size: clamp(0.85rem, 1.7vh, 1rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    margin-top: 5px;
}

/* Today's Stats Box (Green) */
.my-stats-session {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    border-radius: clamp(10px, 2vw, 15px);
    border: 3px solid #fff;
    box-shadow: 0 4px 0 #000, 0 6px 20px rgba(0, 0, 0, 0.4);
    padding: clamp(15px, 3vh, 25px);
    text-align: center;
    margin-bottom: clamp(15px, 3vh, 25px);
}

.my-stats-session h3 {
    font-size: clamp(1rem, 2.2vh, 1.3rem);
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    margin: 0 0 clamp(10px, 2vh, 15px) 0;
}

.session-groan-count {
    font-size: clamp(2rem, 5vh, 3rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 3px 3px 0 #000;
    margin: clamp(5px, 1vh, 10px) 0;
}

.session-contribution {
    font-size: clamp(0.85rem, 1.8vh, 1rem);
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    margin-top: clamp(5px, 1vh, 10px);
}

/* All-Time Stats Section */
.my-stats-alltime {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vh, 16px);
}

.my-stats-alltime h3 {
    font-size: clamp(1rem, 2.2vh, 1.3rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    margin: 0 0 clamp(10px, 2vh, 15px) 0;
    text-align: center;
}

/* Spaced stat rows */
.stat-row-spaced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(12px, 2.5vh, 18px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: clamp(8px, 1.5vh, 12px);
}

.stat-row-spaced .stat-label {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #00ffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.stat-row-spaced .stat-value {
    font-size: clamp(0.95rem, 2vh, 1.2rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
}

/* Prestige Button */
.prestige-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border: 3px solid #fff;
    border-radius: clamp(10px, 2vw, 15px);
    padding: clamp(12px, 2.5vh, 18px);
    font-size: clamp(1rem, 2.2vh, 1.3rem);
    font-weight: bold;
    color: #000;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #b8860b, 0 6px 15px rgba(0, 0, 0, 0.4);
    margin-top: clamp(15px, 3vh, 20px);
    width: 100%;
    animation: prestigePulse 2s ease-in-out infinite;
}

.prestige-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 0 #b8860b, 0 8px 20px rgba(0, 0, 0, 0.5);
}

.prestige-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #b8860b, 0 3px 10px rgba(0, 0, 0, 0.3);
}

@keyframes prestigePulse {

    0%,
    100% {
        box-shadow: 0 4px 0 #b8860b, 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    50% {
        box-shadow: 0 4px 0 #b8860b, 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 0 10px rgba(255, 215, 0, 0);
    }
}

/* ============================================================================
   Global Stats Popup (matches My Stats styling)
   ============================================================================ */

.global-stats-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.global-stats-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.global-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.global-stats-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.global-stats-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.global-stats-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.global-stats-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.global-stats-body {
    padding: clamp(15px, 3vh, 25px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.global-stats-body h3 {
    font-size: clamp(1rem, 2.2vh, 1.3rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    margin: 0 0 clamp(15px, 3vh, 20px) 0;
    text-align: center;
}

.global-stats-note {
    text-align: center;
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #00ffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    margin-top: clamp(20px, 3vh, 25px);
    padding: clamp(10px, 2vh, 15px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.global-stats-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: 3px solid #fff;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(10px, 2vh, 15px);
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #000, 0 6px 15px rgba(0, 0, 0, 0.4);
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #000, 0 8px 20px rgba(0, 0, 0, 0.5);
}

.global-stats-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #000, 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Levels Guide Popup (shows all 50 levels)
   ============================================================================ */

.levels-guide-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.levels-guide-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.levels-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.levels-guide-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.levels-guide-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.levels-guide-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.levels-guide-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.levels-guide-body {
    padding: clamp(15px, 3vh, 25px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.levels-intro {
    text-align: center;
    margin-bottom: clamp(15px, 3vh, 20px);
    padding-bottom: clamp(10px, 2vh, 15px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.levels-intro p {
    font-size: clamp(0.85rem, 1.7vh, 1rem);
    color: #fff;
    margin: clamp(5px, 1vh, 8px) 0;
}

.levels-intro strong {
    color: #00ffff;
}

.prestige-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    padding: clamp(2px, 0.4vh, 4px) clamp(6px, 1.2vw, 10px);
    border-radius: clamp(4px, 0.8vw, 6px);
    font-weight: bold;
    font-size: clamp(0.75rem, 1.4vh, 0.9rem);
}

.level-tier {
    margin-bottom: clamp(15px, 3vh, 20px);
}

.level-tier-title {
    font-size: clamp(0.95rem, 1.9vh, 1.1rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: clamp(8px, 1.5vh, 12px);
    padding: clamp(6px, 1.2vh, 10px);
    background: rgba(255, 255, 0, 0.1);
    border-left: 3px solid #ffff00;
    border-radius: clamp(4px, 0.8vw, 6px);
}

.level-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 1.5vh, 12px);
    margin-bottom: clamp(4px, 0.8vh, 6px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(6px, 1.2vw, 8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.level-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.level-number {
    font-size: clamp(0.85rem, 1.7vh, 1rem);
    color: #00ffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    min-width: clamp(50px, 10vw, 70px);
}

.level-requirement {
    font-size: clamp(0.8rem, 1.5vh, 0.95rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    text-align: right;
}

.levels-guide-btn {
    background: linear-gradient(135deg, #a8e6cf 0%, #7bcc99 100%);
    border: 3px solid #fff;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(10px, 2vh, 15px);
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    font-weight: bold;
    color: #000;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #3d8b5c, 0 6px 15px rgba(0, 0, 0, 0.4);
    flex: 1;
    min-width: 0;
}

.levels-guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3d8b5c, 0 8px 20px rgba(0, 0, 0, 0.5);
}

.levels-guide-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #3d8b5c, 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Leaderboard Popup
   ============================================================================ */


.leaderboard-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.leaderboard-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.leaderboard-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.leaderboard-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.leaderboard-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.leaderboard-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.leaderboard-timeframe-toggle {
    display: flex;
    gap: 8px;
    padding: 15px;
    justify-content: center;
}

.leaderboard-timeframe-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: clamp(0.75rem, 1.5vh, 0.95rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leaderboard-timeframe-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.leaderboard-timeframe-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 2px 0 #000, 0 4px 8px rgba(0, 0, 0, 0.4);
}

.leaderboard-timeframe-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 0 #000, 0 6px 12px rgba(0, 0, 0, 0.5);
}

.leaderboard-body {
    padding: clamp(10px, 2vh, 20px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vh, 12px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.leaderboard-loading {
    text-align: center;
    padding: 40px 20px;
    color: #ffff00;
    font-size: clamp(1rem, 2vh, 1.2rem);
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 15px);
    padding: clamp(10px, 2vh, 15px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.leaderboard-entry.top-3 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.leaderboard-entry.top-3:hover {
    transform: translateX(5px) scale(1.02);
}

.leaderboard-rank {
    font-size: clamp(1.2rem, 2.5vh, 1.8rem);
    font-weight: bold;
    min-width: clamp(30px, 5vw, 40px);
    text-align: center;
    color: #00ffff;
    text-shadow: 2px 2px 0 #000;
}

.leaderboard-entry.top-3 .leaderboard-rank {
    color: #8b4513;
    font-size: clamp(1.4rem, 2.8vh, 2rem);
}

.leaderboard-avatar {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.leaderboard-entry.top-3 .leaderboard-avatar {
    border: 3px solid #fff;
    box-shadow: 0 2px 0 #000, 0 3px 8px rgba(0, 0, 0, 0.4);
}

.leaderboard-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-name {
    font-size: clamp(0.9rem, 1.8vh, 1.2rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}

.leaderboard-entry.top-3 .leaderboard-name {
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.leaderboard-score {
    font-size: clamp(0.85rem, 1.6vh, 1.1rem);
    color: #00ff88;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.leaderboard-entry.top-3 .leaderboard-score {
    color: #8b4513;
    font-size: clamp(0.95rem, 1.8vh, 1.2rem);
}

/* Stats Action Buttons */
.stats-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 1.2vw, 8px);
    margin-top: clamp(6px, 1.2vh, 10px);
}

.time-stats-btn,
.leaderboard-btn {
    flex: 1;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.8vw, 6px);
    border: 2px solid #fff;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(8px, 1.5vh, 12px);
    font-size: clamp(0.65rem, 1.2vh, 0.8rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.stats-detail-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #ff69b4 100%);
    border: 3px solid #fff;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(10px, 2vh, 15px);
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    font-weight: bold;
    color: #000;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #cc5490, 0 6px 15px rgba(0, 0, 0, 0.4);
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #cc5490, 0 8px 20px rgba(0, 0, 0, 0.5);
}

.stats-detail-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #cc5490, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.time-stats-btn {
    background: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%);
}

.leaderboard-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.time-stats-btn:hover,
.leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000, 0 6px 15px rgba(0, 0, 0, 0.4);
}

.time-stats-btn:active,
.leaderboard-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 #000, 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Social Share Modal */
.social-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.social-share-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.social-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.social-share-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.social-share-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.social-share-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.social-share-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.social-share-body {
    padding: clamp(15px, 3vh, 25px);
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 3vh, 20px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.social-share-message {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #00ffff;
    text-shadow: 1px 1px 0 #000;
    margin: 0;
    text-align: center;
    font-weight: bold;
}

.social-share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 2.5vh, 15px);
}

.social-share-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: clamp(15px, 3vh, 20px);
    border-radius: clamp(10px, 2vw, 15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1.2vh, 8px);
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.social-share-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000, 0 6px 15px rgba(0, 0, 0, 0.5);
}

.social-share-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.3);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(2px 2px 0 #000);
}

.social-label {
    font-size: clamp(0.85rem, 1.7vh, 1rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

/* Privacy Info Popup */
.privacy-info-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.privacy-info-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.privacy-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.privacy-info-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.privacy-info-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.privacy-info-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.privacy-info-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.privacy-info-body {
    padding: clamp(10px, 2vh, 20px);
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vh, 15px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.privacy-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: clamp(12px, 2.5vh, 18px);
}

.privacy-section h3 {
    font-size: clamp(0.95rem, 2vh, 1.2rem);
    color: #00ffff;
    text-shadow: 1px 1px 0 #000;
    margin: 0 0 clamp(8px, 1.5vh, 12px) 0;
}

.privacy-never {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.privacy-never h3 {
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
}

.privacy-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.privacy-section li {
    font-size: clamp(0.8rem, 1.6vh, 1rem);
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    padding: clamp(4px, 0.8vh, 6px) 0;
    padding-left: clamp(18px, 3vw, 24px);
    position: relative;
}

.privacy-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00ff88;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.privacy-never li::before {
    content: '✗';
    color: #ff4444;
}

/* Privacy Settings Popup */
.privacy-settings-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.privacy-settings-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: clamp(15px, 3vw, 25px);
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #000, 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.privacy-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 3vh, 25px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.privacy-settings-header h2 {
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #ffff00;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.privacy-settings-close {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.privacy-settings-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(0, 0, 0, 0.6);
}

.privacy-settings-close:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: 0 0 0 2px #000, 0 0 8px rgba(0, 0, 0, 0.5);
}

.privacy-settings-body {
    padding: clamp(10px, 2vh, 20px);
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vh, 15px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.privacy-settings-description {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #00ffff;
    text-shadow: 1px 1px 0 #000;
    margin: 0;
    text-align: center;
}

.privacy-settings-options {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.5vh, 15px);
}

.privacy-settings-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: clamp(12px, 2.5vh, 18px);
    border-radius: clamp(10px, 2vw, 15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.8vh, 6px);
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.privacy-settings-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000, 0 6px 15px rgba(0, 0, 0, 0.5);
}

.privacy-settings-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.3);
}

.privacy-settings-btn.privacy-opt-in {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    border-color: #00ff88;
}

.privacy-settings-btn.privacy-opt-in .privacy-btn-text {
    color: #003300;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.privacy-settings-btn.privacy-opt-in .privacy-btn-desc {
    color: rgba(0, 51, 0, 0.9);
}

.privacy-settings-btn.privacy-opt-out {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    border-color: #ff69b4;
}

.privacy-settings-current {
    font-size: clamp(0.8rem, 1.6vh, 1rem);
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    margin: 0;
    text-align: center;
    padding-top: clamp(10px, 2vh, 15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#current-privacy-level {
    color: #00ff88;
    font-weight: bold;
}

.privacy-settings-info-link {
    display: block;
    text-align: center;
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: #00ffff;
    text-decoration: underline;
    margin-top: clamp(8px, 1.5vh, 12px);
    transition: color 0.2s;
}

.privacy-settings-info-link:hover {
    color: #ffff00;
}

/* GDPR Delete Data Section */
.privacy-delete-section {
    margin-top: clamp(15px, 3vh, 25px);
    padding-top: clamp(15px, 3vh, 20px);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.privacy-delete-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border: 2px solid #fff;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(10px, 2vh, 15px) clamp(15px, 3vw, 25px);
    font-size: clamp(0.85rem, 1.7vh, 1rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 0 #660000, 0 4px 10px rgba(0, 0, 0, 0.4);
}

.privacy-delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #660000, 0 6px 15px rgba(0, 0, 0, 0.5);
}

.privacy-delete-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #660000, 0 2px 5px rgba(0, 0, 0, 0.3);
}

.privacy-delete-warning {
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: #ffff00;
    margin-top: clamp(8px, 1.5vh, 12px);
    font-style: italic;
}

.privacy-note {
    font-size: clamp(0.75rem, 1.4vh, 0.9rem);
    color: #ffff00;
    background: rgba(255, 255, 0, 0.1);
    padding: clamp(8px, 1.5vh, 12px);
    border-radius: clamp(6px, 1.2vw, 10px);
    border-left: 3px solid #ffff00;
    margin-top: clamp(10px, 2vh, 15px);
}

.privacy-section p {
    margin: clamp(8px, 1.5vh, 12px) 0;
    font-size: clamp(0.8rem, 1.5vh, 0.95rem);
    color: #fff;
}

.privacy-section strong {
    color: #00ffff;
}

/* Privacy Banner */
/* Privacy Banner */
.privacy-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.97) 0%, rgba(118, 75, 162, 0.97) 100%);
    backdrop-filter: blur(10px);
    padding: clamp(8px, 1.2vh, 12px) clamp(12px, 2vw, 20px);
    border-top: 2px solid #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideUpBanner 0.5s ease-out;
}

@keyframes slideUpBanner {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.privacy-content {
    max-width: 900px;
    margin: 0 auto;
}

.privacy-title {
    font-size: clamp(0.85rem, 1.6vh, 1.05rem);
    font-weight: bold;
    color: #ffff00;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: clamp(4px, 0.8vh, 6px);
}

.privacy-text {
    font-size: clamp(0.65rem, 1.2vh, 0.8rem);
    color: #fff;
    margin-bottom: clamp(6px, 1vh, 10px);
    line-height: 1.3;
}

.privacy-options {
    display: flex;
    gap: clamp(8px, 1.5vw, 12px);
    margin-bottom: clamp(5px, 0.8vh, 8px);
    flex-wrap: wrap;
}

.privacy-btn {
    flex: 1;
    min-width: 160px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #fff;
    border-radius: clamp(6px, 1.2vw, 10px);
    padding: clamp(8px, 1.2vh, 12px);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3px, 0.6vh, 5px);
}

.privacy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000, 0 6px 15px rgba(0, 0, 0, 0.5);
}

.privacy-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #000, 0 3px 8px rgba(0, 0, 0, 0.4);
}

.privacy-opt-in {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
}

.privacy-opt-in .privacy-btn-text {
    color: #003300;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.privacy-opt-in .privacy-btn-desc {
    color: rgba(0, 51, 0, 0.9);
}

.privacy-opt-out {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
}

.privacy-btn-text {
    font-size: clamp(0.85rem, 1.5vh, 1.05rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}

.privacy-btn-desc {
    font-size: clamp(0.65rem, 1.2vh, 0.8rem);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.privacy-learn-more {
    display: inline-block;
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: #00ffff;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.privacy-learn-more:hover {
    color: #ffff00;
}

header {
    text-align: center;
    margin-bottom: clamp(5px, 2vh, 25px);
    animation: slideDown 1s ease-out;
    position: relative;
}

/* User Profile Section */
.user-profile {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.login-section {
    display: flex;
    align-items: center;
}

.discord-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.discord-login-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.discord-login-btn:active {
    transform: translateY(0);
}

.discord-icon {
    width: 20px;
    height: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile responsiveness for user profile */
@media (max-width: 768px) {
    .user-profile {
        position: static;
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
    }

    .discord-login-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .user-info {
        padding: 6px 10px;
    }

    .user-avatar-container {
        width: 32px;
        height: 32px;
    }

    .user-name {
        font-size: 12px;
    }
}

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

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

h1 {
    font-size: clamp(1.5rem, 6vh, 3.5rem);
    background: linear-gradient(90deg,
            #ff0080 0%,
            /* Pink */
            #ff00ff 14%,
            /* Magenta */
            #8000ff 28%,
            /* Purple */
            #0080ff 42%,
            /* Blue */
            #00ffff 57%,
            /* Cyan */
            #00ff80 71%,
            /* Green */
            #ffff00 85%,
            /* Yellow */
            #ff0080 100%
            /* Back to Pink */
        );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowFlow 20s linear infinite;
    margin-bottom: clamp(0px, 0.5vh, 2px);
    font-weight: 900;
    letter-spacing: clamp(-2px, -0.5vw, -1px);
    position: relative;
    filter:
        drop-shadow(3px 3px 0 #000) drop-shadow(-2px -2px 0 #000) drop-shadow(2px -2px 0 #000) drop-shadow(-2px 2px 0 #000) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.letter {
    display: inline-block;
    background: linear-gradient(90deg,
            #ff0000 0%,
            #ff7f00 16.666%,
            #ffff00 33.333%,
            #00ff00 50%,
            #0000ff 66.666%,
            #8b00ff 83.333%,
            #ff0000 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        letterBounceForward 27s ease-in-out infinite,
        letterBounceBackward 27s ease-in-out infinite,
        rainbowText 3s linear infinite;
    animation-delay:
        calc(var(--delay) * 0.15s),
        calc(13.5s + var(--reverse-delay) * 0.15s),
        calc(var(--delay) * 0.1s);
}

@keyframes letterBounceForward {

    0%,
    100% {
        transform: translateY(0);
    }

    1.85% {
        transform: translateY(-15px);
    }

    3.7% {
        transform: translateY(0);
    }
}

@keyframes letterBounceBackward {

    0%,
    100% {
        transform: translateY(0);
    }

    1.85% {
        transform: translateY(-15px);
    }

    3.7% {
        transform: translateY(0);
    }
}

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 200% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes rainbowText {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.tagline {
    font-size: clamp(0.65rem, 1.5vh, 1.1rem);
    color: #00ff00;
    font-style: italic;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        0 0 10px #00ff00, 0 0 20px #00ff00;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Stats Box - Unified (Compact) */
.stats-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: clamp(8px, 1.5vh, 16px) clamp(12px, 2.5vw, 20px);
    border-radius: clamp(10px, 2vw, 15px);
    border: 2px solid #fff;
    box-shadow: 0 4px 0 #000, 0 6px 15px rgba(0, 0, 0, 0.4);
    animation: bounceIn 1s ease-out 0.3s both;
    margin-bottom: clamp(4px, 1vh, 12px);
    max-width: 400px;
    min-width: 300px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.stats-box-header {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.2vh, 10px);
}

/* Level Bar in Stats Box */
.level-bar-container {
    width: 100%;
}

.level-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(3px, 0.6vh, 5px);
}

.level-bar-label {
    font-size: clamp(0.65rem, 1.2vh, 0.8rem);
    color: #00ffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.level-bar-progress {
    font-size: clamp(0.6rem, 1.1vh, 0.75rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.level-bar-track {
    width: 100%;
    height: clamp(8px, 1.5vh, 12px);
    background: rgba(0, 0, 0, 0.4);
    border-radius: clamp(4px, 0.8vw, 6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.level-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #00cc66 50%, #00ff88 100%);
    border-radius: clamp(3px, 0.6vw, 5px);
    transition: width 0.5s ease-out;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    min-width: 2px;
}

.stat-row-compact {
    flex: 1;
    border-bottom: none !important;
    padding: 0 !important;
}


.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(5px, 1vh, 8px) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    gap: clamp(12px, 3vw, 20px);
    min-height: 28px;
}

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

.stat-label {
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-value {
    font-size: clamp(0.7rem, 1.4vh, 0.95rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    text-align: right;
    flex: 1;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
}

/* Level Progress Bar */
.level-progress-container {
    position: relative;
    width: 100%;
    height: clamp(20px, 3vh, 28px);
    background: linear-gradient(135deg, #333 0%, #111 100%);
    border-radius: clamp(10px, 2vw, 14px);
    border: 2px solid #fff;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 2px 0 #000;
    margin: clamp(6px, 1.2vh, 10px) 0;
    overflow: hidden;
}

.level-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #00cc66 50%, #00ff88 100%);
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
    transition: width 0.5s ease-out;
    border-radius: clamp(8px, 2vw, 12px);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

@keyframes progressShine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.level-progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(0.7rem, 1.3vh, 0.9rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    z-index: 10;
    pointer-events: none;
}

/* Time Stats Button */
.time-stats-text,
.leaderboard-text,
.button-text {
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
}

/* Share Button */
.share-btn-main {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: clamp(8px, 1.5vh, 12px) clamp(12px, 2.5vw, 18px);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-family: 'Comic Sans MS', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1vw, 8px);
}

.share-btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.6);
}

.share-btn-main:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.5);
}

.share-icon {
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

/* Support Button */
.support-btn-main {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    padding: clamp(8px, 1.5vh, 12px) clamp(12px, 2.5vw, 18px);
    border-radius: clamp(8px, 1.5vw, 12px);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-family: 'Comic Sans MS', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1vw, 8px);
    text-decoration: none;
}

.support-btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.6);
}

.support-btn-main:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.5);
}

.support-icon {
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    filter: drop-shadow(2px 2px 0 #000);
}

.share-text {
    font-size: clamp(0.75rem, 1.5vh, 0.95rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
}

/* Groan Tube */
.groan-tube-container {
    text-align: center;
    margin-bottom: 5px;
    animation: zoomIn 1s ease-out 0.6s both;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 0;
    position: relative;
}

/* Tube Action Buttons Container */
.tube-action-buttons {
    display: flex;
    gap: clamp(8px, 2vw, 15px);
    justify-content: center;
    align-items: center;
    margin-top: clamp(8px, 2vh, 15px);
}

/* Color Randomize Button */
.color-randomize-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffecd2 100%);
    border: 2px solid #fff;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(8px, 1.5vh, 12px) clamp(12px, 2.5vw, 18px);
    font-size: clamp(1rem, 2vh, 1.3rem);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1vw, 8px);
    font-family: 'Comic Sans MS', cursive;
    font-weight: bold;
}

.color-randomize-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.6);
}

.color-randomize-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.5);
}

.color-icon {
    filter: drop-shadow(1px 1px 0 #000);
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
}

.button-text {
    color: #fff;
    font-size: clamp(0.75rem, 1.5vh, 0.95rem);
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
}

@keyframes colorPulse {

    0%,
    100% {
        background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffecd2 100%);
    }

    33% {
        background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    }

    66% {
        background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    }
}

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

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.groan-tube {
    display: inline-block;
    width: 45px;
    height: 100%;
    max-height: 450px;
    min-height: 150px;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: transform 0.6s ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Larger click area */
.groan-tube::before {
    content: '';
    position: absolute;
    top: -20px;
    bottom: -20px;
    left: -40px;
    right: -40px;
    z-index: 10;
}

.groan-tube.flipped {
    transform: rotate(180deg);
}

.groan-tube:hover {
    filter: drop-shadow(0 15px 30px var(--tube-color-primary, rgba(255, 0, 255, 0.6)));
}

.groan-tube:not(.animating):active {
    transform: scale(0.95);
}

.groan-tube.animating {
    pointer-events: none;
    cursor: default;
}

.groan-tube-shaker.shaking {
    animation: tubeShake 0.5s ease-in-out;
}

@keyframes tubeShake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: rotate(-5deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: rotate(5deg);
    }
}

.tube-top,
.tube-bottom {
    width: 115%;
    height: 8%;
    background: linear-gradient(135deg, var(--cap-color-primary, #ff6600) 0%, var(--cap-color-secondary, #ff8c00) 50%, var(--cap-color-primary, #ff6600) 100%);
    border-radius: clamp(3px, 0.8vw, 6px);
    position: absolute;
    left: -7.5%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), inset 0 5px 15px rgba(255, 255, 255, 0.2);
    border: 2px solid var(--cap-color-border, #ff5500);
    z-index: 10;
}

.tube-top {
    top: 0;
}

.tube-bottom {
    bottom: 0;
}

.tube-body {
    width: 100%;
    background: linear-gradient(to right,
            var(--tube-color-dark, #7FD121) 0%,
            var(--tube-color-primary, #9EE54A) 15%,
            var(--tube-color-light, #AFF05B) 50%,
            var(--tube-color-primary, #9EE54A) 85%,
            var(--tube-color-dark, #7FD121) 100%);
    position: absolute;
    top: 4%;
    left: 0;
    bottom: 4%;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2),
        inset -15px 0 30px rgba(255, 255, 255, 0.3),
        inset 15px 0 30px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--tube-color-primary, #9EE54A);
    border-right: 4px solid var(--tube-color-dark, #6BC116);
    z-index: 3;
}

.tube-body::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

.tube-slider {
    width: 80%;
    height: 15%;
    background: linear-gradient(135deg, #000, #333, #000);
    border-radius: 5px;
    position: absolute;
    left: 10%;
    top: calc(100% - 15% - 6%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8),
        inset 0 2px 5px rgba(255, 255, 255, 0.2);
    transition: top 0.6s ease-in-out;
    border: 2px solid #666;
}

.tube-slider::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 60%;
    background: radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.3), transparent 60%);
    border-radius: 48px;
    top: 15%;
    left: 15%;
}

.instruction {
    margin-top: clamp(5px, 2vh, 25px);
    font-size: clamp(1rem, 3vh, 1.6rem);
    color: #ffff00;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        0 0 10px #ffff00;
    animation: bounce 1s ease-in-out infinite;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;

    /* Pre-allocate rigid space to prevent layout shifts */
    height: 4em;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    line-height: 1.2;
}

.instruction.faded {
    opacity: 0;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Controls */
.controls {
    text-align: center;
    margin-bottom: 40px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    border: 4px solid #fff;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.1s;
    font-family: 'Comic Sans MS', cursive;
    text-shadow: 2px 2px 0 #000;
    position: relative;
    box-shadow: 0 6px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.5);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #000, 0 11px 20px rgba(0, 0, 0, 0.6);
}

.btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #000, 0 2px 5px rgba(0, 0, 0, 0.5);
}

.btn-large {
    padding: 20px 50px;
    font-size: 1.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, #ffff00, #ff8800);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.btn-tertiary {
    background: linear-gradient(135deg, #ff00ff, #ff0080);
    color: #fff;
}

.btn-small {
    padding: 10px 20px;
    font-size: 1rem;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 4px 0 #000, 0 6px 10px rgba(0, 0, 0, 0.4);
    text-shadow: 2px 2px 0 #000;
}

/* Global Stats Teaser */
.global-teaser {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 35px;
    border-radius: 25px;
    border: 5px solid #fff;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 8px 0 #000, 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.global-teaser h3 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: #ffff00;
    font-weight: bold;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        0 0 20px #ffff00;
}

.global-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.global-stat {
    text-align: center;
}

.global-stat-value {
    display: block;
    font-size: 3.5rem;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 8px;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        0 0 20px #00ffff;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
            0 0 10px #00ffff;
    }

    50% {
        text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
            0 0 30px #00ffff, 0 0 40px #00ffff;
    }
}

.global-stat-label {
    display: block;
    font-size: 1.2rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}

/* Footer */
footer {
    text-align: center;
    padding: clamp(4px, 1vh, 8px) clamp(8px, 2vw, 15px);
    background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 200% 200%;
    animation: rainbowShift 10s linear infinite;
    border-radius: clamp(10px, 2vw, 15px);
    margin-top: clamp(5px, 1vh, 10px);
    border: 2px solid #fff;
    box-shadow: 0 3px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.5);
}

@keyframes rainbowShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.footer-content p {
    color: #000;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}

footer p {
    color: #000;
    font-size: clamp(0.65rem, 1.5vh, 0.9rem);
    margin-bottom: clamp(2px, 0.5vh, 6px);
    font-weight: bold;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}

.footer-link {
    margin-top: clamp(2px, 0.5vh, 5px);
}

.footer-link a {
    color: #0080ff;
    font-size: clamp(0.6rem, 1.3vh, 0.85rem);
    font-weight: bold;
    text-decoration: none;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
    transition: all 0.2s;
}

.footer-link a:hover {
    color: #00ffff;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
        0 0 10px #00ffff;
    text-decoration: underline;
}

#company-name {
    font-weight: bold;
    color: #ff1493;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
        0 0 8px #ff1493;
}



/* Animations */


/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }



    .groan-section {
        order: 1;
    }

    .stats-bar {
        gap: 10px;
    }

    .stat {
        padding: 15px;
        flex: 1 1 140px;
        /* Allow shrinking and growing, min-width 140px */
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .privacy-banner-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .privacy-banner-text {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .privacy-banner-option {
        margin: 5px;
        display: inline-block;
    }
}

/* Global Comparison Box */
.my-stats-global-comparison {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    border: 2px solid #4facfe;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Tube Shaker Wrapper */
.groan-tube-shaker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}

/* Custom Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 30px;
    border-radius: 20px;
    max-width: 90%;
    width: 450px;
    text-align: center;
    border: 2px solid #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    color: #fff;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-title {
    color: #00ff88;
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.modal-message {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #ddd;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 12px 25px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-btn-confirm {
    background: #00ff88;
    color: #000;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.modal-input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    margin-top: 5px;
}


/* Data Management Buttons */
.data-mgmt-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 2px rgba(0, 255, 255, 0.5);
    margin: 5px;
}

.data-mgmt-btn:hover {
    background: #00ffff;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.data-mgmt-btn.restore {
    border-color: #ff00ff;
    color: #ff00ff;
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
    text-shadow: 0 0 2px rgba(255, 0, 255, 0.5);
}

.data-mgmt-btn.restore:hover {
    background: #ff00ff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

.data-mgmt-btn.reset {
    border-color: #ff3333;
    color: #ff3333;
    box-shadow: 0 0 8px rgba(255, 50, 50, 0.3);
    text-shadow: 0 0 2px rgba(255, 50, 50, 0.5);
}

.data-mgmt-btn.reset:hover {
    background: #ff3333;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}