/* DriveWin - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --success-color: #51CF66;
    --warning-color: #FFD93D;
    --danger-color: #FF6B6B;
    --dark-bg: #1a1a1a;
    --dark-card: #2a2a2a;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-light);
    margin: 0;
    padding: 0;
}

/* Auto-prepend tether icon before standalone USDT tokens */
.usdt-badge:before { content: "\f20b"; font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands"; font-weight:900; margin-right:4px; }
.usdt-inline i.fab.fa-tether { margin-right:4px; }

/* Navigation */
.navbar {
    background: #1a1a1a;
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    width: 100%;
}

.navbar .container {
    max-width: none;
    margin: 0;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: all 0.3s;
    text-decoration: none;
}

.nav-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Mobile nav toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.6rem;
    padding: .25rem .5rem;
    border-radius: 8px;
}
.nav-toggle:focus { outline: 2px solid var(--secondary-color); }

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.btn.active {
    box-shadow: 0 0 0 2px var(--primary-color);
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 600;
}

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

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #3dbdb5;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #40c057;
}

.btn-warning {
    background: var(--warning-color);
    color: var(--dark-bg);
}

.btn-warning:hover {
    background: #ffc107;
}

.btn-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.btn-hero-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

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

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
    gap: 5rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15), transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.15), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    flex: 1;
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 25%, #FF6B6B 50%, #667eea 75%, #2bbfa5 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8)) 
            drop-shadow(0 0 60px rgba(102, 126, 234, 0.6))
            drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
    letter-spacing: -2px;
    line-height: 1.05;
    animation: titleWave 4s ease-in-out infinite, titleGlow 2s ease-in-out infinite alternate;
    position: relative;
}

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

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8)) 
                drop-shadow(0 0 60px rgba(102, 126, 234, 0.6))
                drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 50px rgba(255, 215, 0, 1)) 
                drop-shadow(0 0 90px rgba(102, 126, 234, 0.9))
                drop-shadow(0 6px 30px rgba(0, 0, 0, 0.7));
    }
}

.hero-subtitle {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #00FFF0 0%, #2bbfa5 30%, #FFD700 60%, #FF6B6B 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    filter: drop-shadow(0 4px 20px rgba(43, 191, 165, 0.9)) 
            drop-shadow(0 0 40px rgba(255, 215, 0, 0.6));
    letter-spacing: 0.5px;
    animation: subtitleFlow 3s ease-in-out infinite, subtitlePulse 2s ease-in-out infinite alternate;
}

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

@keyframes subtitlePulse {
    0% {
        filter: drop-shadow(0 4px 20px rgba(43, 191, 165, 0.9)) 
                drop-shadow(0 0 40px rgba(255, 215, 0, 0.6));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 6px 30px rgba(43, 191, 165, 1)) 
                drop-shadow(0 0 60px rgba(255, 215, 0, 0.9));
        transform: scale(1.02);
    }
}

.hero-description {
    font-size: 1.3rem;
    line-height: 2;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 600;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7), 
                 0 0 30px rgba(102, 126, 234, 0.5),
                 0 0 50px rgba(43, 191, 165, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(43, 191, 165, 0.15));
    backdrop-filter: blur(15px);
    padding: 1.8rem 2.2rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: descriptionFloat 3s ease-in-out infinite alternate;
}

@keyframes descriptionFloat {
    0% {
        transform: translateY(0);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    100% {
        transform: translateY(-5px);
        box-shadow: 0 15px 45px rgba(102, 126, 234, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.hero-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 215, 0, 0.3), 
        rgba(102, 126, 234, 0.3), 
        transparent);
    animation: descriptionShimmer 2.5s infinite;
}

@keyframes descriptionShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.hero-description::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: descriptionGlow 4s ease-in-out infinite;
}

@keyframes descriptionGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-animation {
    flex: 1;
    max-width: 500px;
}

#heroCanvas {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Game Preview Section */
.game-preview {
    padding: 4rem 2rem;
    background: rgba(20, 20, 20, 0.9);
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.preview-video {
    text-align: center;
}

.preview-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.preview-info ul {
    list-style: none;
    padding-left: 0;
}

.preview-info li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    #previewCanvas {
        width: 100%;
        height: auto;
    }
}

/* Features Section */
.features {
    padding: 7rem 2rem;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, rgba(26, 26, 26, 0.9) 100%);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(43, 191, 165, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 4rem;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 2px 30px rgba(102, 126, 234, 0.6);
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #2bbfa5);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.feature-icon {
    font-size: 3.5rem;
    color: #2bbfa5;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(43, 191, 165, 0.4));
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.feature-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* How to Play Section */
.how-to-play {
    padding: 7rem 2rem;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(20, 20, 20, 0.95) 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.step-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #2bbfa5);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.step-card:hover::before {
    opacity: 0.3;
}

.step-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.35);
}

.step-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.step-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Prize Distribution */
.prize-distribution {
    padding: 7rem 2rem;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    position: relative;
}

.prize-distribution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.05), transparent 70%);
    pointer-events: none;
}

.prize-info {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.prize-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(15px);
    padding: 3rem 2.5rem;
    border-radius: 25px;
    text-align: center;
    min-width: 280px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.prize-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.prize-box:hover::before {
    opacity: 1;
}

.prize-box:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 60px rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.4);
}

.prize-box i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 20px currentColor);
}

.prize-box h3 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.prize-box p {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gold {
    color: var(--gold);
}

.silver {
    color: var(--silver);
}

.bronze {
    color: var(--bronze);
}

.prize-percentage {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2bbfa5, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
    text-shadow: 0 4px 20px rgba(43, 191, 165, 0.5);
}

.prize-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 500;
}

/* CTA Section */
.cta {
    padding: 7rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2), transparent 70%);
    pointer-events: none;
}

.cta h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 4px 30px rgba(102, 126, 234, 0.6);
    position: relative;
    z-index: 1;
}

.cta p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.cta .btn-hero {
    position: relative;
    z-index: 1;
}

/* Custom Modal */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.custom-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2);
    animation: modalSlideIn 0.4s ease;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.modal-header i {
    font-size: 3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    animation: iconPulse 2s infinite;
}

.modal-header h3 {
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-body p {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-deposit {
    background: linear-gradient(135deg, #00f260 0%, #0575e6 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 242, 96, 0.4);
}

.btn-deposit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 96, 0.6);
}

.btn-close-modal {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-body p {
        font-size: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-deposit,
    .btn-close-modal {
        width: 100%;
        justify-content: center;
    }
}

/* Welcome Modal Styles */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.welcome-content {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 30px;
    max-width: 500px;
    width: 92%;
    box-shadow: 
        0 30px 90px rgba(138, 43, 226, 0.5),
        0 0 150px rgba(75, 0, 130, 0.4),
        inset 0 0 100px rgba(138, 43, 226, 0.1);
    animation: welcomeSlideIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    position: relative;
}

.welcome-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dfe6e9, #ff6b6b);
    background-size: 400%;
    border-radius: 30px;
    z-index: -1;
    animation: gradientBorder 3s ease infinite;
}

.close-welcome {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-welcome:hover {
    transform: rotate(90deg) scale(1.2);
    color: #ff6b6b;
}

.welcome-body {
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
}

.welcome-text {
    color: #fff;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.bonus-display {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(75, 0, 130, 0.3) 100%);
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 25px;
    padding: 2.5rem 2rem;
    margin: 2rem 0 0;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(138, 43, 226, 0.4),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
}

.bonus-display::before {
    content: '✨';
    position: absolute;
    font-size: 3rem;
    top: 10px;
    left: 20px;
    animation: sparkle 2s ease-in-out infinite;
    opacity: 0.6;
}

.bonus-display::after {
    content: '✨';
    position: absolute;
    font-size: 3rem;
    bottom: 10px;
    right: 20px;
    animation: sparkle 2s ease-in-out infinite 1s;
    opacity: 0.6;
}

.bonus-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bonus-value {
    font-size: 6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: numberGlow 2s infinite, scaleUp 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.6));
}

.bonus-currency {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.bonus-subtitle {
    color: #ffd700;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

@keyframes welcomeSlideIn {
    from {
        transform: translateY(-100px) scale(0.7) rotateX(20deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

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

@keyframes numberGlow {
    0%, 100% {
        filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: drop-shadow(0 8px 30px rgba(255, 215, 0, 1)) drop-shadow(0 0 50px rgba(255, 255, 255, 0.8));
    }
}

@keyframes scaleUp {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Welcome Modal Mobile Responsive */
@media (max-width: 768px) {
    .welcome-content {
        width: 95%;
        margin: 1rem;
        max-width: 400px;
    }
    
    .welcome-body {
        padding: 2rem 1.5rem;
    }
    
    .welcome-text {
        font-size: 1.1rem;
    }
    
    .bonus-display {
        padding: 2rem 1.5rem;
    }
    
    .bonus-value {
        font-size: 4rem;
    }
    
    .bonus-currency {
        font-size: 2.2rem;
    }
    
    .bonus-subtitle {
        font-size: 1.1rem;
    }
}

/* Footer */
.footer {
    background: var(--dark-bg);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--text-light);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.social-icons a {
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--text-light);
    transition: transform .3s, box-shadow .3s, background .3s;
    text-decoration: none;
}
.social-icons a:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.12);
}
.social-youtube i { color: #FF0000; }
.social-tiktok i { color: #ffffff; }

@media (max-width: 480px) {
    .social-icons a { font-size: 1.6rem; width: 42px; height: 42px; }
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: var(--dark-card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-gray);
    font-size: 1.2rem;
}

.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
}

.auth-footer {
    text-align: center;
    color: var(--text-gray);
}

.auth-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer p {
    margin: 0.5rem 0;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert i {
    font-size: 1.5rem;
}

.alert-error {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid var(--danger-color);
    color: #ffaaaa;
}

.alert-success {
    background: rgba(81, 207, 102, 0.2);
    border: 2px solid var(--success-color);
    color: #88ff88;
}

/* Info alert variant and stacked layout for notices */
.alert-info {
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary-color);
    color: #a8fff6;
    flex-direction: column;
    align-items: flex-start;
}

.alert-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.alert-info ul {
    margin-left: 1.25rem;
}

.alert-info li {
    list-style: disc;
}

/* Game Page */
.game-container {
    display: flex;
    min-height: calc(100vh - 70px);
    height: calc(100vh - 70px);
    background: #000;
    overflow: hidden;
}

.game-sidebar {
    width: 300px;
    background: #1a1a1a;
    padding: 1.5rem;
    overflow-y: hidden;
    height: calc(100vh - 70px);
}

.user-info-card,
.stats-card,
.game-info-card,
.controls-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.user-info-card h3,
.stats-card h3,
.game-info-card h3,
.controls-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.balance-display {
    background: rgba(78, 205, 196, 0.2);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-label {
    color: var(--text-gray);
}

.stat-value {
    font-weight: bold;
    color: var(--text-light);
}

.game-info-card ul,
.controls-card ul {
    list-style: none;
}

.game-info-card li,
.controls-card li {
    margin-bottom: 0.75rem;
    color: var(--text-gray);
}

.game-info-card i,
.controls-card i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
    width: 20px;
}

/* ========================================
   MODERN GAME PAGE STYLES
   ======================================== */
.modern-game-sidebar .modern-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.modern-card h3 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-card h3 i {
    color: var(--secondary-color);
}

/* User Profile Card */
.user-profile-card {
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.user-profile-card .card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
}

.user-profile-card h3 {
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.balance-showcase {
    background: rgba(78, 205, 196, 0.15);
    border: 2px solid rgba(78, 205, 196, 0.3);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    min-height: 55px;
    overflow: hidden;
}

.usdt-icon-game {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    min-width: 24px;
    display: block;
}

.balance-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: #26A17B;
    text-shadow: 0 2px 10px rgba(38, 161, 123, 0.5);
    line-height: 1;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive font size based on balance length */
.balance-value[data-length="long"] {
    font-size: 1.1rem;
}

.balance-value[data-length="very-long"] {
    font-size: 0.95rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 12px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.games {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.best {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
}

.stat-icon.weekly {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
}

.stat-info {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 3px;
}

/* Game Info Modern */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid var(--secondary-color);
    transition: all 0.3s ease;
}

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

.info-item i {
    font-size: 1.1rem;
}

.info-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Controls Modern */
.controls-grid {
    display: grid;
    gap: 12px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.control-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.control-item kbd {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 38px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.control-item span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.game-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #000;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.game-status {
    text-align: center;
}

.game-ready i,
.insufficient-balance i {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.insufficient-balance i {
    color: var(--warning-color);
}

.game-ready h2,
.insufficient-balance h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.game-ready p,
.insufficient-balance p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

#gameCanvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(42, 42, 42, 0.9);
    padding: 1rem 2rem;
    border-radius: 12px 12px 0 0;
    max-width: 800px;
    width: 100%;
}

.game-score {
    font-size: 1.5rem;
}

.score-value {
    color: var(--gold);
    font-weight: bold;
    font-size: 2rem;
    font-variant-numeric: tabular-nums; /* prevent width jitter when digits grow */
}

.game-stats {
    display: flex;
    gap: 2rem;
    font-size: 1.2rem;
    flex-wrap: nowrap;
}

.game-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#gameBoard {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    display: block;
}



.game-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    z-index: 100;
    padding: 2rem;
}

.overlay-content {
    text-align: center;
    padding: 2rem;
}

.overlay-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.overlay-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-gray);
}

#overlayButtons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Wallet Page */
.page-container {
    min-height: calc(100vh - 70px);
    padding: 3rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #2bbfa5 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 30px rgba(102, 126, 234, 0.5);
    position: relative;
    padding-bottom: 1rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #2bbfa5);
    border-radius: 2px;
}

.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-label {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance-amount-large {
    font-size: 4rem;
    font-weight: bold;
}

.usdt-icon-large, .usdt-icon {
    color: #26A17B; /* Tether green (fallback for FA) */
    margin-right: 8px;
}

/* Robust USDT logo: use local SVG so it always shows, even if FA is blocked */
.usdt-icon,
.fab.fa-tether { /* apply to FA tether too */
        position: relative;
        display: inline-block;
        width: 1.1em;
        height: 1.1em;
        vertical-align: -0.15em;
        background: 
            url('../assets/images/tether.svg') no-repeat center / contain,
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 2000'%3E%3Cdefs%3E%3ClinearGradient id='usdtGrad' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%2353AE94;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%2326A17B;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='1000' cy='1000' r='1000' fill='url(%23usdtGrad)'/%3E%3Cg fill='%23FFFFFF'%3E%3Cpath d='M1275.5 667.5h-551.2v133.4H877.5v88.8c-151.8 9.2-264 40.2-264 77.4 0 37 112.2 68.2 264 77v213.4h246.2v-213.2c150.4-8.8 261-40 261-77.2s-110.6-68.4-261-77.2v-88.8h151.8V667.5zm-151.8 330.8c-14.8 2.8-47.6 8.4-116.6 14-69.2 5.6-153.4 8.4-218.8 8.4-25,0-61-1.2-105.6-3.8-44.4-2.4-79.6-5.6-103.6-9v-355.2c24-3.4 59.2-6.6 103.6-11 44.6-4.4 80.6-6.6 105.6-6.6 65.4 0 149.6 3.2 218.8 10.4s101.8 14 116.6 17.4v335.4z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
        /* hide font glyph if FA loads */
        color: transparent !important;
}
.usdt-icon::before,
.usdt-icon-large::before,
.fab.fa-tether::before { content: '' !important; }
.usdt-icon-large {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 30px;
    vertical-align: -0.2em;
    background: 
      url('../assets/images/tether.svg') no-repeat center / contain,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 2000'%3E%3Cdefs%3E%3ClinearGradient id='usdtGrad2' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%2353AE94;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%2326A17B;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='1000' cy='1000' r='1000' fill='url(%23usdtGrad2)'/%3E%3Cg fill='%23FFFFFF'%3E%3Cpath d='M1275.5 667.5h-551.2v133.4H877.5v88.8c-151.8 9.2-264 40.2-264 77.4 0 37 112.2 68.2 264 77v213.4h246.2v-213.2c150.4-8.8 261-40 261-77.2s-110.6-68.4-261-77.2v-88.8h151.8V667.5zm-151.8 330.8c-14.8 2.8-47.6 8.4-116.6 14-69.2 5.6-153.4 8.4-218.8 8.4-25,0-61-1.2-105.6-3.8-44.4-2.4-79.6-5.6-103.6-9v-355.2c24-3.4 59.2-6.6 103.6-11 44.6-4.4 80.6-6.6 105.6-6.6 65.4 0 149.6 3.2 218.8 10.4s101.8 14 116.6 17.4v335.4z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
    color: transparent !important;
}

/* Bigger, nicely aligned logo next to balance */
.wallet-balance-card .usdt-icon-large {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

.deposit-address-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border-left: 4px solid var(--secondary-color);
}
.deposit-address-box code {
    font-family: monospace;
    background: rgba(0,0,0,0.4);
    padding: .6rem .8rem;
    border-radius: 8px;
    display: inline-block;
    word-break: break-all;
}
.address-row { display:flex; align-items:center; gap:.6rem; margin:.5rem 0 1rem; }
.btn-small { padding: .5rem .75rem; font-size:.85rem; }
.deposit-guidelines { list-style: none; margin-left:0; padding-left:0; font-size:.95rem; color: var(--text-gray); display:grid; gap:.4rem; }
.deposit-guidelines li { display:flex; align-items:center; gap:.45rem; }
.deposit-guidelines li .usdt-icon { margin-right:.45rem; }
.deposit-form .form-group { margin-bottom:1rem; }

.wallet-actions {
    display: flex;
    gap: 1rem;
}

/* ========================================
   MODERN WALLET STYLES
   ======================================== */
.wallet-header {
    text-align: center;
    margin-bottom: 3rem;
}

.wallet-header .page-title {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wallet-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin: 0;
}

.modern-wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.modern-balance-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-balance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.modern-balance-card:hover::before {
    opacity: 1;
}

.modern-balance-card .card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.currency-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.currency-icon.usdt {
    background: linear-gradient(135deg, #26A17B 0%, #1c7a5f 100%);
}

.currency-icon.dc {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    padding: 8px;
}

.currency-icon.dc img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.currency-icon .usdt-icon-large {
    width: 35px;
    height: 35px;
}

.card-title h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #fff;
}

.network-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    margin-top: 5px;
}

.network-badge.gold {
    background: rgba(255, 215, 0, 0.3);
}

.balance-display {
    text-align: center;
    margin: 2rem 0;
}

.balance-amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.balance-currency {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-weight: 600;
}

.balance-usd {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.modern-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modern-btn i {
    font-size: 1.1rem;
}

.modern-btn span {
    position: relative;
    z-index: 1;
}

.deposit-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.deposit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.withdraw-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.withdraw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

.buy-btn {
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    color: #FFA500;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    border: 2px solid rgba(255, 165, 0, 0.3);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.5);
    border-color: #FFA500;
}

.wallet-actions {
    display: flex;
    gap: 1rem;
}

.card {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-responsive {
    overflow-x: auto;
}

/* Scroll limiter for large admin tables */
.table-scroll {
    max-height: 520px;
    overflow-y: auto;
}

/* Wallet and Profile specific scroll helpers */
.wallet-scroll { max-height: 420px; overflow-y: auto; }
.profile-scroll { max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }

/* Apply scroll to all admin tables by default */
.admin-page .table-responsive { max-height: 520px; overflow-y: auto; }

/* Long hashes/addresses inside tables should wrap nicely */
.addr code {
    display: inline-block;
    max-width: 100%;
    white-space: normal;          /* allow wrapping */
    word-break: break-all;        /* break long continuous strings */
    overflow-wrap: anywhere;      /* modern wrap hint */
}

table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
}

table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    padding: 1.2rem;
    text-align: left;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

table td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

table tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: scale(1.01);
    transition: all 0.3s;
}

table tr:last-child td {
    border-bottom: none;
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--secondary-color);
}

.text-gold {
    color: var(--gold);
}

.text-silver {
    color: var(--silver);
}

.text-bronze {
    color: var(--bronze);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

/* Open modal when targeted via anchor (#buyDCModal) */
.modal:target {
    display: block;
}

.modal-content {
    background: var(--dark-card);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: var(--text-gray);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-light);
}

.modal-note {
    background: rgba(78, 205, 196, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Profile Page */
/* Profile Hero Section */
.profile-hero {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15) 0%, rgba(114, 137, 218, 0.15) 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.profile-hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.4);
    flex-shrink: 0;
}

.profile-header-info {
    flex: 1;
    min-width: 250px;
}

.profile-username {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-light);
}

.profile-email,
.profile-joined {
    color: var(--text-gray);
    margin: 0.25rem 0;
    font-size: 1rem;
}

.profile-email i,
.profile-joined i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.profile-quick-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 150px;
}

.quick-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.quick-stat-icon.balance {
    background: linear-gradient(135deg, #26A17B, #1c7a5f);
    color: white;
}

.quick-stat-icon.games {
    background: linear-gradient(135deg, #7289da, #5a6fb8);
    color: white;
}

.quick-stat-icon.rank {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: white;
}

.quick-stat-info {
    text-align: left;
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
}

.quick-stat-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-action-btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(114, 137, 218, 0.2));
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.profile-action-btn:hover {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.3), rgba(114, 137, 218, 0.3));
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
}

.profile-action-btn i {
    font-size: 1.2rem;
}

/* Modern Card Styling */
.modern-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modern-card h2 {
    color: var(--text-light);
    border-bottom: 2px solid rgba(78, 205, 196, 0.3);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.modern-stats .stat-box {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(114, 137, 218, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.2);
    transition: all 0.3s ease;
}

.modern-stats .stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
    border-color: var(--primary-color);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-info,
.stats-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1rem;
    flex-wrap: wrap;
}

.info-label {
    color: var(--text-gray);
    flex-shrink: 0;
    min-width: 150px;
}

.info-value {
    font-weight: 600;
    flex: 1;
    text-align: right;
    word-break: break-word;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.stat-box i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    display: block;
}

.stat-box .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    display: block;
    margin: 0.5rem 0;
    line-height: 1.2;
}

.stat-box .stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    margin-top: 0.5rem;
}

/* Referrals in Profile */
.referral-section .copy-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.referral-section code {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-light);
    word-break: break-all;
    font-size: 0.9rem;
    display: block;
    min-width: 200px;
}

.referral-section .btn-small {
    flex-shrink: 0;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.achievement.achieved {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.25), rgba(78, 205, 196, 0.15));
    border-color: rgba(81, 207, 102, 0.4);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(0.7);
}

.achievement.locked .ach-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

.achievement.locked .ach-title,
.achievement.locked .ach-desc {
    color: rgba(255, 255, 255, 0.4);
}

.locked-reward {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.locked-reward i {
    color: rgba(255, 255, 255, 0.4) !important;
}



.achievement.achieved {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.25), rgba(78, 205, 196, 0.15));
    border-color: rgba(81, 207, 102, 0.4);
}
.achievement.locked {
    opacity: 0.7;
}

.achievement.achieved .ach-icon {
    background: rgba(81, 207, 102, 0.25);
    color: var(--success-color);
    width: 30px;
    height: 30px;
}
.ach-title {
    font-weight: 700;
}

.ach-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.ach-reward {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(81, 207, 102, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--success-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.ach-reward i {
    color: #FFD700;
}

/* Achievements Hero Section */
.achievements-hero {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 107, 107, 0.1) 50%, rgba(78, 205, 196, 0.1) 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.achievements-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.5);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-text {
    flex: 1;
    min-width: 250px;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-light);
    background: linear-gradient(135deg, #FFD700, #4ECDC4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin: 0;
}

.hero-progress-summary {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
}

.circular-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circular-progress-text .percentage {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1;
}

.circular-progress-text .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.progress-numbers {
    display: flex;
    gap: 2rem;
}

.progress-number {
    text-align: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-number .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.progress-number .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Achievement Info Card */
.achievement-info-card .info-box {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05), rgba(114, 137, 218, 0.05));
}

/* Achievement Progress */
.achievement-progress {
    padding: 1rem 0;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.progress-stat .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.progress-stat .stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-wrapper {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

/* Info Box for Achievement Info */
.info-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-box p {
    margin: 0.75rem 0;
    color: var(--text-gray);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.6;
}

.info-box p i {
    color: var(--primary-color);
    margin-top: 0.2rem;
    font-size: 1rem;
}

.difficulty-4,
.difficulty-5 {
    background: rgba(255, 107, 107, 0.3);
    color: var(--danger-color);
}

/* Leaderboard */
.week-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.week-selector .btn-secondary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.4);
    color: #ffffff;
    font-weight: 700;
    padding: 0.9rem 1.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.week-selector .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
}

.current-week {
    font-size: 1.6rem;
    font-weight: 900;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.prize-pool-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 25px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.prize-pool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.8s;
}

.prize-pool-card:hover::before {
    left: 100%;
}

.prize-pool-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 1;
}

.pool-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.pool-stat {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pool-stat:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.4);
}

.pool-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pool-value {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    text-shadow: 0 4px 15px rgba(43, 191, 165, 0.5);
}

.prize-breakdown {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
}

.prize-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}

.prize-item:hover {
    transform: scale(1.05);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.prize-item i {
    font-size: 1.8rem;
    filter: drop-shadow(0 4px 8px currentColor);
}

.prize-item span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Countdown styling - elegant, no boxes */
.countdown-wrapper {
    padding: 1rem;
    background: transparent;
    text-align: center;
}
.countdown-wrapper h2 {
    margin-bottom: 18px;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}
.countdown-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.countdown-grid .countdown-item {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.15), rgba(46, 125, 50, 0.1));
    padding: 2rem 2.5rem;
    border: 2px solid transparent;
    border-radius: 20px;
    min-width: 130px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 
        0 10px 30px rgba(76, 175, 80, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background-clip: padding-box;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.countdown-grid .countdown-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.5), rgba(46, 125, 50, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.countdown-grid .countdown-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(76, 175, 80, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.countdown-grid .countdown-item:hover::before {
    opacity: 1;
}

.countdown-grid .countdown-item span {
    display: block;
    font-size: 5rem;
    font-weight: 800;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    color: #fff;
    line-height: 1;
    margin-bottom: 12px;
    letter-spacing: -3px;
    text-shadow: 0 4px 16px rgba(255, 255, 255, 0.3), 0 2px 8px rgba(76, 175, 80, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 4px 16px rgba(255, 255, 255, 0.3), 0 2px 8px rgba(76, 175, 80, 0.4);
    }
    50% {
        text-shadow: 0 6px 24px rgba(255, 255, 255, 0.5), 0 4px 16px rgba(76, 175, 80, 0.6);
    }
}

.countdown-grid .countdown-item small {
    display: block;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.countdown-note {
    margin-top: 12px;
    opacity: .6;
    font-size: .88rem;
}

/* Compact countdown version */
.countdown-compact .countdown-item {
    padding: 0.9rem 1.25rem;
    min-width: 80px;
}

.countdown-compact .countdown-item span {
    font-size: 2.8rem;
    letter-spacing: -1.5px;
}

.countdown-compact .countdown-item small {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

@media (max-width: 600px) {
  .countdown-grid { gap: 20px; }
  .countdown-grid .countdown-item { 
    min-width: 110px;
    padding: 1.5rem 2rem;
  }
  .countdown-grid .countdown-item span { font-size: 4rem; }
  .countdown-grid .countdown-item small { font-size: 0.9rem; letter-spacing: 2px; }
  
  .countdown-compact .countdown-item { 
    min-width: 85px;
    padding: 1rem 1.25rem;
  }
  .countdown-compact .countdown-item span { font-size: 2.8rem; }
  .countdown-compact .countdown-item small { font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .countdown-grid { gap: 14px; }
  .countdown-grid .countdown-item { 
    min-width: 90px;
    padding: 1.25rem 1.75rem;
  }
  .countdown-grid .countdown-item span { font-size: 3.2rem; letter-spacing: -2px; }
  .countdown-grid .countdown-item small { font-size: 0.8rem; letter-spacing: 1.5px; }
  
  .countdown-compact .countdown-item { 
    min-width: 70px;
    padding: 0.85rem 1rem;
  }
  .countdown-compact .countdown-item span { font-size: 2.3rem; }
  .countdown-compact .countdown-item small { font-size: 0.65rem; }
}

.prize-item {
    background: var(--dark-card);
    padding: 1rem 2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.prize-item i {
    font-size: 1.8rem;
}

/* Top Winners */
.top-winners {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    padding-top: 20px;
}

.winner-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.8rem 1.5rem;
    padding-top: 2.8rem;
    text-align: center;
    min-width: 240px;
    max-width: 260px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    margin-top: 25px;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.winner-card:hover::before {
    opacity: 1;
}

.winner-card:hover {
    transform: translateY(-15px) scale(1.05);
}

.first-place {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
    border: 3px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 25px 70px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2);
}

.first-place:hover {
    transform: translateY(-15px) scale(1.12);
    box-shadow: 0 30px 80px rgba(255, 215, 0, 0.5), 0 0 80px rgba(255, 215, 0, 0.3);
}

.second-place {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.25), rgba(192, 192, 192, 0.1));
    border: 3px solid rgba(192, 192, 192, 0.6);
    box-shadow: 0 20px 60px rgba(192, 192, 192, 0.3);
}

.second-place:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 70px rgba(192, 192, 192, 0.4);
}

.third-place {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(205, 127, 50, 0.1));
    border: 3px solid rgba(205, 127, 50, 0.6);
    box-shadow: 0 20px 60px rgba(205, 127, 50, 0.3);
}

.third-place:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 70px rgba(205, 127, 50, 0.4);
}

.winner-rank {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid currentColor;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.winner-rank i {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 12px currentColor);
}

.winner-info {
    margin-top: 1.5rem;
}

.winner-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.winner-score {
    font-size: 1.7rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2bbfa5, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
    text-shadow: 0 4px 20px rgba(43, 191, 165, 0.5);
}

.winner-games {
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.winner-prize {
    font-size: 1.4rem;
    color: #2bbfa5;
    font-weight: 900;
    margin-top: 0.8rem;
    text-shadow: 0 4px 15px rgba(43, 191, 165, 0.5);
}

/* Leaderboard Table */
.rank-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 900;
    min-width: 50px;
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 215, 0, 0.2));
    color: var(--gold);
    border: 2px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.4), rgba(192, 192, 192, 0.2));
    color: var(--silver);
    border: 2px solid rgba(192, 192, 192, 0.6);
    box-shadow: 0 4px 20px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.4), rgba(205, 127, 50, 0.2));
    color: var(--bronze);
    border: 2px solid rgba(205, 127, 50, 0.6);
    box-shadow: 0 4px 20px rgba(205, 127, 50, 0.3);
}

.current-user {
    background: linear-gradient(135deg, rgba(43, 191, 165, 0.2), rgba(43, 191, 165, 0.1));
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 4px 20px rgba(43, 191, 165, 0.3);
}

.badge-you {
    background: linear-gradient(135deg, #2bbfa5, #26A17B);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: 0.7rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(43, 191, 165, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */

/* FAQ Page Styles */
.faq-page-content {
    max-width: 900px;
    margin: 0 auto;
}

.faq-category {
    margin-bottom: 4rem;
}

.faq-category-title {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(78, 205, 196, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item-page {
    background: var(--dark-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item-page:hover {
    border-color: rgba(78, 205, 196, 0.4);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.2);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(78, 205, 196, 0.1);
}

.faq-question h3 {
    font-size: 1.2rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.faq-question i {
    color: var(--secondary-color);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item-page.active .faq-answer {
    max-height: 2000px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.faq-answer ul,
.faq-answer ol {
    color: var(--text-gray);
    line-height: 1.8;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer strong {
    color: var(--text-light);
}

.faq-answer kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.faq-cta {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 4rem;
}

.faq-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.faq-cta p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Legal Pages (Privacy Policy, Terms of Service) */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--dark-card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.legal-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(78, 205, 196, 0.1);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-section:last-of-type {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-section h3 {
    font-size: 1.4rem;
    color: var(--text-light);
    margin: 2rem 0 1rem;
}

.legal-section p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol {
    color: var(--text-gray);
    line-height: 1.8;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section li {
    margin-bottom: 0.75rem;
}

.legal-section strong {
    color: var(--text-light);
    font-weight: 600;
}

.legal-section a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.legal-section a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.contact-box {
    background: rgba(78, 205, 196, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    margin: 1.5rem 0;
}

.contact-box p {
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-box i {
    color: var(--secondary-color);
    width: 20px;
}

.legal-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(78, 205, 196, 0.3);
    text-align: center;
}

.legal-footer p {
    color: var(--text-gray);
    margin: 0.5rem 0;
}

.legal-footer strong {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Responsive Design */

/* Small Desktop / Laptop (1024px - 1366px) */
@media (max-width: 1366px) {
    .container {
        max-width: 1140px;
    }
    
    .hero {
        max-width: 1140px;
        padding: 3rem 1.5rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .game-sidebar {
        width: 280px;
    }
    
    .modern-card {
        padding: 1rem;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .hero {
        max-width: 960px;
        padding: 3rem 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .game-sidebar {
        width: 260px;
        padding: 1rem;
    }
    
    .user-profile-card .card-icon {
        font-size: 2.5rem;
    }
    
    .balance-value {
        font-size: 1.2rem;
    }
    
    .modern-card h3 {
        font-size: 1rem;
    }
    
    .controls-grid {
        gap: 10px;
    }
    
    .control-item {
        padding: 8px;
    }
    
    .control-item kbd {
        padding: 5px 8px;
        font-size: 0.9rem;
        min-width: 35px;
    }
    
    .control-item span {
        font-size: 0.8rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .game-container {
        flex-direction: column;
    }
    
    .game-sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        padding: 1rem;
    }
    
    .game-area {
        width: 100%;
        padding: 1rem;
    }
    
    #gameBoard {
        max-width: 100%;
        width: 100%;
    }
    
    .game-header {
        max-width: 100%;
        width: 100%;
    }
    
    .modern-wallet-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    /* Controls visibility on small screens */
    .controls-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .control-item {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 768px) {
    /* Global Mobile Optimizations */
    body {
        font-size: 14px;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .card {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
        border-radius: 10px;
    }
    
    /* Navbar - Compact */
    .navbar {
        height: 55px;
        padding: 0.3rem 0;
    }
    
    .navbar .container { 
        position: relative;
        padding: 0 0.5rem;
    }
    
    .nav-brand img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .nav-brand span {
        font-size: 1rem;
    }
    
    .nav-links {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.4rem 0.6rem;
    }
    
    /* Body Spacing */
    body.has-sidebar {
        margin-left: 0 !important;
        padding-top: 55px !important;
    }
    
    body:not(.has-sidebar) {
        padding-top: 55px !important;
    }
    
    /* Hero Section - Compact */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0.5rem !important;
        min-height: auto !important;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        font-weight: 800 !important;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
        font-weight: 400 !important;
    }
    
    /* Hamburger Menu */
    .mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
        padding: 6px 10px;
        border-radius: 6px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Game Container - Ultra Compact */
    .game-container {
        flex-direction: column;
        min-height: auto;
        margin-left: 0 !important;
        padding: 0.3rem;
        gap: 0.3rem;
    }
    
    .game-sidebar {
        width: 100%;
        padding: 0.2rem;
        max-height: none;
        height: auto;
        overflow: visible;
    }
    
    .modern-card {
        margin-bottom: 0.25rem;
        padding: 0.3rem;
        border-radius: 6px;
    }
    
    .user-info-card,
    .stats-card,
    .game-info-card,
    .controls-card,
    .modern-card {
        padding: 0.3rem;
        margin-bottom: 0.25rem;
    }
    
    /* Hide controls card on mobile */
    .controls-modern {
        display: none !important;
    }
    
    /* Card Headers */
    .modern-card h3 {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
        font-weight: 700;
    }
    
    /* User Profile Card */
    .user-profile-card .card-icon {
        font-size: 1rem;
        margin-bottom: 0.1rem;
    }
    
    .user-profile-card h3 {
        font-size: 0.85rem;
        margin-bottom: 0.15rem;
    }
    
    .profile-name {
        font-size: 0.85rem;
    }
    
    /* Balance Display */
    .balance-value {
        font-size: 0.85rem;
        font-weight: 700;
    }
    
    .balance-showcase {
        padding: 0.25rem;
        min-height: 26px;
        background: rgba(78, 205, 196, 0.2);
        border: 1.5px solid rgba(78, 205, 196, 0.4);
        margin-top: 0.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    .usdt-icon-game {
        width: 14px;
        height: 14px;
    }
    
    /* Stats Grid - Ultra Compact */
    .stat-icon {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .stat-number {
        font-size: 0.8rem;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stats-grid {
        gap: 0.25rem;
        display: flex;
        justify-content: space-between;
    }
    
    .stat-box {
        padding: 0.25rem 0.3rem;
        gap: 0.25rem;
        flex: 1;
    }
    
    /* Profile Page - Mobile Compact */
    .profile-hero {
        padding: 1rem 0.5rem;
    }
    
    .profile-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .profile-avatar {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    .profile-username {
        font-size: 1.4rem;
    }
    
    .profile-email {
        font-size: 0.85rem;
    }
    
    .profile-quick-stats {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .quick-stat {
        flex: 1;
        min-width: auto;
        padding: 0.5rem 0.6rem;
    }
    
    .quick-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .quick-stat-value {
        font-size: 1rem;
    }
    
    .quick-stat-label {
        font-size: 0.7rem;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .profile-action-btn {
        min-width: auto;
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    /* Stats grid - 3 columns for symmetry */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Make last item span 2 columns if there are 5 items */
    .stats-grid .stat-box:nth-child(5):last-child {
        grid-column: 2 / 3;
    }
    
    .stat-box {
        padding: 0.7rem 0.4rem !important;
        min-height: auto !important;
        background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(114, 137, 218, 0.1)) !important;
        border: 1px solid rgba(78, 205, 196, 0.2) !important;
        border-radius: 8px !important;
    }
    
    .stat-box i {
        font-size: 1.2rem !important;
        margin-bottom: 0.3rem !important;
        color: var(--secondary-color) !important;
    }
    
    .stat-box .stat-value {
        font-size: 1.1rem !important;
        margin: 0.2rem 0 !important;
        color: var(--text-light) !important;
    }
    
    .stat-box .stat-label {
        font-size: 0.6rem !important;
        color: var(--text-gray) !important;
        line-height: 1.2;
    }
    
    /* Page Titles */
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    /* Tables - Mobile Responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    table th,
    table td {
        padding: 0.4rem;
        white-space: nowrap;
    }
    
    /* Wallet Page */
    .wallet-balance-cards {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .balance-card {
        padding: 0.8rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    /* Modals */
    .modal-content {
        padding: 1rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Mining Page */
    .mining-header {
        padding: 1rem 0.5rem;
    }
    
    .user-mining-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.6rem;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .miners-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    /* Achievements page mobile */
    .achievements-hero {
        padding: 1.5rem 1rem;
    }
    
    .achievements-hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-progress-summary {
        width: 100%;
        justify-content: center;
    }
    
    .circular-progress {
        width: 100px;
        height: 100px;
    }
    
    .circular-progress svg {
        width: 100px;
        height: 100px;
    }
    
    .circular-progress-text .percentage {
        font-size: 1.5rem;
    }
    
    .progress-numbers {
        gap: 1rem;
    }
    
    .progress-number {
        padding: 0.75rem 1rem;
        flex: 1;
        min-width: 100px;
    }
    
    .progress-number .number {
        font-size: 1.5rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement {
        flex-direction: column;
        text-align: center;
    }
    
    .ach-icon {
        margin-bottom: 0.5rem;
    }
    
    /* Leaderboard Mobile */
    .leaderboard-hero {
        padding: 1rem 0.5rem;
    }
    
    .leaderboard-title {
        font-size: 1.6rem;
    }
    
    .week-selector {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .week-selector select {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .prize-pool-card {
        padding: 0.8rem;
    }
    
    .prize-pool-amount {
        font-size: 1.8rem;
    }
    
    .leaderboard-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Boxes Page Mobile */
    .boxes-hero {
        padding: 1rem 0.5rem;
    }
    
    .boxes-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .boxes-title {
        font-size: 1.5rem;
    }
    
    .dc-balance {
        font-size: 0.9rem;
    }
    
    .dc-balance img {
        width: 20px;
        height: 20px;
    }
    
    .boxes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .box-card {
        max-width: 100%;
    }
    
    .box-media {
        height: 140px;
    }
    
    .box-icon {
        font-size: 48px;
    }
    
    .box-body {
        padding: 0.8rem;
    }
    
    .box-name {
        font-size: 1rem;
    }
    
    .box-desc {
        font-size: 0.85rem;
        min-height: auto;
    }
    
    .rewards-card,
    .result-card {
        padding: 1rem;
        width: 95%;
    }
    
    .result-amount {
        font-size: 2.5rem;
    }
    
    /* DriveMining Mobile Enhancements */
    .mining-hero {
        padding: 1rem 0.5rem;
    }
    
    .balance-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .balance-item {
        width: 100%;
        padding: 0.6rem;
    }
    
    .miner-card {
        padding: 0.8rem;
    }
    
    .miner-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .miner-name {
        font-size: 1.1rem;
    }
    
    .miner-specs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .purchase-section {
        padding: 0.8rem;
    }
    
    /* FAQ Mobile */
    .faq-hero {
        padding: 1.5rem 1rem;
    }
    
    .faq-hero h1 {
        font-size: 1.8rem;
    }
    
    .faq-hero p {
        font-size: 0.95rem;
    }
    
    .faq-container {
        padding: 0 0.5rem;
    }
    
    .faq-item {
        padding: 0.8rem;
    }
    
    .faq-question {
        font-size: 0.95rem;
        padding-right: 2rem;
    }
    
    .faq-answer {
        font-size: 0.85rem;
        padding: 0.6rem 0 0 0;
    }
    
    /* Login/Register Forms Mobile */
    .auth-container {
        padding: 1rem 0.5rem;
    }
    
    .auth-card {
        padding: 1.2rem;
        max-width: 100%;
    }
    
    .auth-title {
        font-size: 1.6rem;
    }
    
    .social-login {
        gap: 0.5rem;
    }
    
    .social-btn {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    /* Footer Mobile */
    footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-info-card h3,
    .stats-card h3,
    .game-info-card h3,
    .controls-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    .game-area {
        padding: 0.5rem 0.5rem 1rem 0.5rem;
        width: 100%;
        max-width: 100vw;
        min-height: auto;
        overflow-y: visible;
    }
    
    .game-status {
        padding: 0.5rem;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    
    .game-ready,
    .insufficient-balance {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .game-ready i {
        font-size: 2.5rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .insufficient-balance i {
        font-size: 2.5rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .game-ready h2,
    .insufficient-balance h2 {
        font-size: 1.2rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .game-ready p,
    .insufficient-balance p {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        padding: 0 0.5rem;
        text-align: center;
    }
    
    .insufficient-balance .usdt-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .game-ready form {
        margin-bottom: 0.3rem !important;
    }
    
    .game-ready .btn-hero,
    .insufficient-balance .btn {
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
        width: 90%;
        max-width: 300px;
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .game-header {
        width: 100% !important;
        max-width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 8px 8px 0 0;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .game-stats {
        font-size: 1rem;
        gap: 1rem;
    }
    
    .game-score {
        font-size: 1.2rem;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
    
    #gameBoard {
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        max-height: 70vh;
        object-fit: contain;
        border-radius: 0 0 8px 8px;
    }
    
    /* Mobile: Fullscreen game when playing */
    #gameCanvas[style*="display: block"],
    #gameCanvas[style*="display:block"] {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        z-index: 9999 !important;
        background: #000 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    #gameCanvas[style*="display: block"] #gameBoard,
    #gameCanvas[style*="display:block"] #gameBoard {
        width: 100% !important;
        height: auto !important;
        max-width: 100vw !important;
        max-height: calc(100vh - 60px) !important;
        border-radius: 0 !important;
        margin: auto !important;
    }
    
    #gameCanvas[style*="display: block"] .game-header,
    #gameCanvas[style*="display:block"] .game-header {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        z-index: 10000 !important;
        border-radius: 0 !important;
    }
    
    .game-overlay {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 90vw !important;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 8px;
        z-index: 1000;
    }
    
    /* Ensure overlay is positioned relative to the game area on mobile */
    .game-area { position: relative; }
    #gameCanvas { width: 100%; max-width: 100vw; }
    /* Canvas height managed by aspect-ratio; remove fixed 400px */
    
    .top-winners {
        flex-direction: column;
        align-items: center;
    }
    
    .first-place {
        order: 1;
    }
    
    .second-place {
        order: 2;
    }
    
    .third-place {
        order: 3;
    }
    
    .wallet-balance-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem !important;
    }
    
    /* Stack balance cards vertically on mobile */
    .wallet-balance-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .modern-wallet-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .modern-balance-card {
        height: auto !important;
        min-height: 260px;
    }
    
    .currency-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }
    
    .balance-amount {
        font-size: 2rem !important;
    }
    
    .balance-usd {
        font-size: 0.9rem !important;
    }
    
    .modern-balance-card {
        padding: 1.5rem !important;
    }
    
    .balance-amount {
        font-size: 2.5rem !important;
    }
    
    .currency-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .currency-icon .usdt-icon-large {
        width: 30px !important;
        height: 30px !important;
    }
    
    /* Reduce large balance text on mobile */
    .balance-amount-large {
        font-size: 2rem !important;
    }
    
    .wallet-balance-card .balance-amount-large img {
        width: 50px !important;
        height: 50px !important;
        margin-right: 8px !important;
    }
    
    .usdt-icon-large {
        width: 22px !important;
        height: 22px !important;
    }

    /* Tighter container padding on mobile for more space */
    .navbar .container,
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Brand and nav links scale */
    .nav-brand { font-size: 1.4rem; }
    .nav-link, .btn { padding: 0.6rem 0.9rem; }

    /* Make wallet action buttons stack nicely */
    .wallet-actions { flex-direction: column; width: 100%; }
    .wallet-actions .btn { width: 100%; }

    /* Auth box padding a bit smaller for small screens */
    .auth-box { padding: 2rem; }
    .auth-header h1 { font-size: 2rem; }
    .auth-header i { font-size: 3rem; }

    /* Reduce large headings to avoid wrapping issues */
    .section-title, .page-title { font-size: 2.2rem; }
    .cta h2 { font-size: 2.2rem; }
    .cta p { font-size: 1.1rem; }

    /* Footer stacks naturally but tighten spacing */
    .footer { padding: 2rem 1rem 1rem; }
}

/* Extra-small phones: tighten and hide non-critical table columns */
@media (max-width: 600px) {
    /* Hero animation smaller */
    #heroCanvas { height: 260px; }
    
    .hero {
        padding: 3rem 1rem;
        gap: 2rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.8rem;
        font-weight: 900;
        text-shadow: 0 2px 20px rgba(102, 126, 234, 0.8);
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
        font-weight: 700;
    }
    
    .hero-description {
        font-size: 1.05rem;
        font-weight: 500;
    }
    
    .section-title {
        font-size: 2.2rem;
        font-weight: 900;
        text-shadow: 0 2px 20px rgba(102, 126, 234, 0.7);
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
        font-weight: 800;
    }
    
    .feature-card p {
        font-size: 1rem;
        font-weight: 500;
    }
    
    .step-card h3 {
        font-size: 1.3rem;
        font-weight: 800;
    }
    
    .step-card p {
        font-size: 1rem;
        font-weight: 500;
    }
    
    .prize-box h3 {
        font-size: 1.4rem;
        font-weight: 800;
    }
    
    .prize-percentage {
        font-size: 2.5rem;
        font-weight: 900;
    }
    
    .cta h2 {
        font-size: 2.5rem;
        font-weight: 900;
    }
    
    .cta p {
        font-size: 1.15rem;
        font-weight: 600;
    }

    /* Game: make header compact and overlay positioned relative to canvas */
    .game-header { padding: .75rem 1rem; }
    .game-score { font-size: 1.2rem; }
    .score-value { font-size: 1.5rem; }
    .game-stats { gap: 1rem; font-size: 1rem; }
    


    /* Ensure overlay covers the canvas area properly on phones */
    .game-overlay { 
        position: absolute;
        top: 0; 
        left: 0; 
        right: 0; 
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
    }
    .overlay-content h2 { font-size: 1.5rem; }
    .overlay-content p { font-size: 1rem; }
    .overlay-content { padding: 1rem; }

    /* Tables: smaller font and horizontal scroll container already exists */
    table { font-size: 0.95rem; }

    /* Leaderboard: hide Games (4) and Average (5) on small screens */
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4),
    .leaderboard-table th:nth-child(5),
    .leaderboard-table td:nth-child(5) { display: none; }

    /* Wallet transactions: hide Description on small screens */
    .transactions-table th:nth-child(4),
    .transactions-table td:nth-child(4) { display: none; }
}

@media (max-width: 480px) {
    /* Wallet balance cards even smaller on tiny screens */
    .balance-amount {
        font-size: 2rem !important;
    }
    
    .card-title h3 {
        font-size: 1.1rem !important;
    }
    
    .modern-balance-card {
        padding: 1.2rem !important;
    }
    
    .currency-icon {
        width: 45px !important;
        height: 45px !important;
    }
    
    .currency-icon .usdt-icon-large {
        width: 26px !important;
        height: 26px !important;
    }
    
    .modern-btn {
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .balance-amount-large {
        font-size: 1.8rem !important;
    }
    
    .balance-label {
        font-size: 0.95rem !important;
    }
    
    .wallet-balance-card .balance-amount-large img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .wallet-actions .btn {
        padding: 0.8rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Verification code input even smaller */
    input[name="verification_code"] {
        font-size: 28px !important;
        letter-spacing: 6px !important;
        padding: 12px !important;
    }
    
    /* Card-style rows for tables to improve readability */
    .leaderboard-table thead { display: none; }
    .leaderboard-table tr {
        display: block;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 12px;
        padding: .5rem .75rem;
        margin-bottom: .75rem;
    }
    .leaderboard-table td { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        border: none; 
        padding: .4rem 0; 
    }
    .leaderboard-table td:nth-child(1)::before { content: 'Rank'; color: var(--text-gray); margin-right: 1rem; }
    .leaderboard-table td:nth-child(2)::before { content: 'Player'; color: var(--text-gray); margin-right: 1rem; }
    .leaderboard-table td:nth-child(3)::before { content: 'Score'; color: var(--text-gray); margin-right: 1rem; }
    /* 4 and 5 hidden above */
    .leaderboard-table td:nth-child(6)::before { content: 'Prize'; color: var(--text-gray); margin-right: 1rem; }

    .transactions-table thead { display: none; }
    .transactions-table tr {
        display: block;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 12px;
        padding: .5rem .75rem;
        margin-bottom: .75rem;
    }
    .transactions-table td { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        border: none; 
        padding: .4rem 0; 
    }
    .transactions-table td:nth-child(1)::before { content: 'Type'; color: var(--text-gray); margin-right: 1rem; }
    .transactions-table td:nth-child(2)::before { content: 'Amount'; color: var(--text-gray); margin-right: 1rem; }
    /* 3 (Balance After) hidden on very small */
    .transactions-table td:nth-child(4)::before { content: 'Description'; color: var(--text-gray); margin-right: 1rem; }
    .transactions-table td:nth-child(5)::before { content: 'Date'; color: var(--text-gray); margin-right: 1rem; }
    
    /* Wallet verification modal mobile fixes */
    .modal-content {
        padding: 1.5rem !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Verification code input on mobile */
    input[name="verification_code"] {
        font-size: 32px !important;
        letter-spacing: 8px !important;
        padding: 15px !important;
    }
    
    /* Verification stats grid to single column on mobile */
    div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* Smaller font sizes in verification boxes */
    div[style*="font-size: 24px"],
    div[style*="font-size: 26px"] {
        font-size: 20px !important;
    }
    
    /* Modal close button positioning */
    .modal-content .close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 28px;
        z-index: 10;
    }
    
    /* Global paddings */
    .page-container { padding: 2rem 1rem; }
    .hero { 
        padding: 2.5rem 1rem; 
        gap: 2rem;
        min-height: auto;
        padding-top: 1.5rem !important;
    }
    .features { padding: 4rem 1rem; }
    .how-to-play { padding: 4rem 1rem; }
    .prize-distribution { padding: 4rem 1rem; }
    .cta { padding: 4rem 1rem; }

    .hero-title { 
        font-size: 2.5rem;
        font-weight: 900;
        text-shadow: 0 2px 20px rgba(102, 126, 234, 0.8);
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    .hero-subtitle { 
        font-size: 1.4rem;
        font-weight: 700;
        line-height: 1.3;
    }
    .hero-description { 
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.6;
    }
    #heroCanvas { height: 220px; }
    
    .section-title {
        font-size: 2rem;
        font-weight: 900;
        text-shadow: 0 2px 20px rgba(102, 126, 234, 0.7);
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
        font-weight: 800;
    }
    
    .feature-card p {
        font-size: 0.95rem;
        font-weight: 500;
    }
    
    .step-card h3 {
        font-size: 1.25rem;
        font-weight: 800;
    }
    
    .step-card p {
        font-size: 0.95rem;
        font-weight: 500;
    }
    
    .prize-box h3 {
        font-size: 1.3rem;
        font-weight: 800;
    }
    
    .prize-percentage {
        font-size: 2.2rem;
        font-weight: 900;
    }
    
    .cta h2 {
        font-size: 2.2rem;
        font-weight: 900;
    }
    
    .cta p {
        font-size: 1.05rem;
        font-weight: 600;
    }

    /* Navbar: keep items scannable */
    .nav-link, .btn { font-size: .95rem; }



    /* Overlay buttons: full width on tiny screens */
    #overlayButtons { gap: .5rem; flex-direction: column; }
    #overlayButtons .btn { width: 100%; padding: 0.8rem; font-size: 1rem; }

    /* Tables: further compress; for transactions hide Balance After too */
    .transactions-table th:nth-child(3),
    .transactions-table td:nth-child(3) { display: none; }
    table { font-size: 0.9rem; }

    /* Profile cards grid -> single column min width */
    .profile-grid { grid-template-columns: 1fr; }

    /* Referral input row wraps */
    .referral-section .copy-row { 
        flex-direction: column; 
        align-items: stretch; 
    }
    
    .referral-section code {
        min-width: auto;
        width: 100%;
    }
    
    .referral-section .copy-row .btn { 
        width: 100%; 
    }
    
    /* Info items stack on mobile */
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-label,
    .info-value {
        min-width: auto;
        text-align: left;
    }
}

/* ========================================
   LARGE DESKTOP RESPONSIVE (1400px+)
   ======================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero {
        max-width: 1320px;
        padding: 5rem 2rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* ========================================
   EXTRA LARGE DESKTOP (1920px+)
   ======================================== */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero {
        max-width: 1600px;
        padding: 6rem 3rem;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 2.5rem;
    }
    
    .features-grid,
    .miners-grid {
        gap: 3rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}

/* ========================================
   ULTRA WIDE SCREENS (2560px+)
   ======================================== */
@media (min-width: 2560px) {
    .container {
        max-width: 2000px;
    }
    
    .hero {
        max-width: 2000px;
    }
    
    .hero-title {
        font-size: 6rem;
    }
    
    .section-title {
        font-size: 4rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ultra-small devices */
@media (max-width: 360px) {
    .nav-brand { font-size: 1.2rem; }
    .nav-link, .btn { padding: 0.55rem 0.8rem; font-size: .9rem; }
}
