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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #2C3E50;
    line-height: 1.6;
    background: #FFFFFF;
}

body.app-mode {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.app-mode #landingPage {
    display: none !important;
}

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

/* Navigation */
.navbar {
    background: #FFFFFF;
    padding: 1.2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: #5A6C7D;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5rem 0;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-content .highlight {
    color: #FFD700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    font-weight: 800;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    line-height: 1.8;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

.cta-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background: #FFD700;
    color: #764ba2;
}

.cta-button.large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

.login-link {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.login-link a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 700;
}

.login-link a:hover {
    text-decoration: underline;
    color: #FFF;
}

/* Hero Illustration */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.illustration-circle {
    width: 450px;
    height: 450px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                inset 0 0 40px rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    animation: pulse 3s ease-in-out infinite;
}

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

.players-illustration {
    width: 280px;
    height: 280px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* Coin animations */
.coin {
    animation: coinFloat 3s ease-in-out infinite;
}

.coin-1 {
    animation-delay: 0s;
}

.coin-2 {
    animation-delay: 0.5s;
}

.coin-3 {
    animation-delay: 1s;
}

.coin-4 {
    animation-delay: 1.5s;
}

@keyframes coinFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
    }
}

/* Trophy animation */
.trophy {
    animation: trophyBounce 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes trophyBounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: white;
}

.section-title {
    font-size: 2.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 800;
    position: relative;
}

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

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

.feature-card {
    padding: 2.5rem;
    background: white;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

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

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

.feature-card:hover .feature-icon,
.feature-card:hover h3,
.feature-card:hover p {
    color: white;
    position: relative;
    z-index: 1;
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    color: #2C3E50;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #5A6C7D;
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.steps {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), 
                      linear-gradient(135deg, #667eea, #764ba2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s;
}

.step:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    position: relative;
}

.step-number::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.2;
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.step-content h3 {
    font-size: 1.5rem;
    color: #2C3E50;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #5A6C7D;
    line-height: 1.6;
}

/* Stake Options Section */
.stake-options {
    padding: 5rem 0;
    background: white;
}

.stakes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.stake-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
}

.stake-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: #667eea;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.stake-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    animation: featured-pulse 2s ease-in-out infinite;
}

@keyframes featured-pulse {
    0%, 100% {
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 20px 50px rgba(102, 126, 234, 0.6);
    }
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD700;
    color: #2C3E50;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.stake-amount {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stake-card.featured .stake-amount {
    color: white;
}

.stake-label {
    font-size: 1rem;
    color: #5A6C7D;
    margin-bottom: 1rem;
}

.stake-card.featured .stake-label {
    color: rgba(255,255,255,0.9);
}

.stake-pool {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.5rem;
}

.stake-card.featured .stake-pool {
    color: white;
}

.stake-win {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28A745;
    padding: 0.5rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
}

.stake-card.featured .stake-win {
    background: rgba(255,255,255,0.2);
    color: #FFD700;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move-bg 20s linear infinite;
}

@keyframes move-bg {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

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

.cta-content h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
}

.cta-section .cta-button {
    background: white;
    color: #667eea;
    font-size: 1.3rem;
    padding: 1.3rem 3.5rem;
}

.cta-section .cta-button:hover {
    background: #FFD700;
    color: #764ba2;
}

/* Footer */
.footer {
    background: #2C3E50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

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

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

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .illustration-circle {
        width: 300px;
        height: 300px;
    }
    
    .players-illustration {
        width: 200px;
        height: 200px;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stakes-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Logo and Branding */
.logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tagline {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.6rem;
    margin: 0;
    font-weight: 800;
}

.logo-small-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-svg-icon {
    flex-shrink: 0;
}

.logo-main {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

.back-link {
    margin-top: 1rem;
    text-align: center;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Auth Box */
.auth-box {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 450px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    width: 100%;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4);
}

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

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

.btn-large {
    font-size: 1.2rem;
    padding: 1.2rem 2rem;
}

/* Navigation - Landing Page */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* App Navbar */
.navbar-app {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.lobby-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.lobby-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.lobby-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

.nav-left, .nav-center, .nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-center {
    justify-content: center;
}

.nav-right {
    justify-content: flex-end;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.user-avatar {
    font-size: 1.5rem;
}

.btn-logout {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.coin-balance {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.3rem;
    color: #333;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.5);
    animation: coinGlow 2s ease-in-out infinite;
}

@keyframes coinGlow {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 5px 30px rgba(255, 215, 0, 0.6);
    }
}

.coin-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.username {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Lobby Content */
.lobby-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s;
}

.panel:hover {
    transform: translateY(-5px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel h3, .panel-header h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.6rem;
    font-weight: 800;
}

.player-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-text {
    flex: 1;
    text-align: center;
}

.btn-action:hover {
    transform: translateX(5px);
}

.warning-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 1rem;
    margin-top: 1rem;
    color: #856404;
    font-weight: bold;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Quick Stats */
.quick-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(102, 126, 234, 0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Active Players */
.active-players-list {
    max-height: 500px;
    overflow-y: auto;
}

.active-players-list::-webkit-scrollbar {
    width: 8px;
}

.active-players-list::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.active-players-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.player-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.3rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.player-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.player-item .player-info {
    font-weight: bold;
    font-size: 1.2rem;
}

.player-item .btn {
    padding: 0.7rem 1.5rem;
    background: white;
    color: #667eea;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
}

.player-item .btn:hover {
    background: #FFD700;
    color: #764ba2;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

/* Notifications */
.notifications {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
}

.notification {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-invite {
    border-left: 5px solid #667eea;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.3rem;
}

.notification-message {
    color: #666;
    font-size: 0.9rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

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

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

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.3s;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content.game-setup {
    max-width: 700px;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

/* Chat Box */
.chat-box {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9f9f9;
}

.chat-message {
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    max-width: 80%;
}

.chat-message.sent {
    background: #667eea;
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.received {
    background: #e0e0e0;
    color: #333;
}

.chat-sender {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.chat-input-group {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
}

.chat-input-group input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

/* Game Settings */
.game-settings {
    margin-top: 1rem;
}

.game-settings h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.stake-options-game {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stake-btn {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.stake-btn:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.stake-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.game-pool {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin: 1.5rem 0;
}

.game-pool h4 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.small-text {
    color: #666;
    font-size: 0.9rem;
}

/* Game Screen */
.game-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.game-info {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-display {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.timer-icon {
    font-size: 2.5rem;
    margin-right: 0.5rem;
}

.pool-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    background: #333;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
}

.game-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.players-score {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.player-card {
    text-align: center;
    flex: 1;
}

.player-name {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 1rem;
}

.player-score {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: #999;
}

.puzzle-area {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.puzzle-area h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.puzzle-question {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 15px;
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 2rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.answer-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.answer-input-group input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
}

.answer-feedback {
    padding: 1rem;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    margin-top: 1rem;
}

.answer-feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.answer-feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Result Modal */
.result-content {
    text-align: center;
    max-width: 600px;
}

.result-display {
    margin: 2rem 0;
}

.final-scores {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-item span:first-child {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: bold;
}

.score-item span:last-child {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
}

.winner-announcement {
    font-size: 2rem;
    font-weight: bold;
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 15px;
}

.winner-announcement.win {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.winner-announcement.lose {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.winner-announcement.tie {
    background: #ffd700;
    color: #333;
}

.earnings {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .lobby-content {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-left, .nav-center, .nav-right {
        justify-content: center;
    }
    
    .stake-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .players-score {
        flex-direction: column;
        gap: 2rem;
    }
    
    .vs {
        transform: none;
    }
}

/* Payment Modal Styling */
.modal-payment {
    max-width: 550px;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

.payment-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.exchange-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.rate-label {
    font-weight: 600;
}

.rate-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
}

.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

.amount-input-wrapper input {
    padding-left: 4rem !important;
    font-size: 1.2rem;
    font-weight: bold;
}

.coin-preview {
    position: absolute;
    right: 1rem;
    color: #FFD700;
    font-weight: bold;
    font-size: 1.1rem;
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quick-amount-btn {
    padding: 0.8rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-amount-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.quick-amount-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.phone-input-wrapper:focus-within {
    border-color: #667eea;
}

.country-code {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1.2rem;
    font-weight: bold;
}

.phone-input-wrapper input {
    border: none !important;
    flex: 1;
}

.payment-simulation-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196F3;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #0d47a1;
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.5rem;
}

/* Payment Processing Overlay */
.payment-processing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

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

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-content h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.processing-content p {
    color: #666;
    margin-bottom: 2rem;
}

.payment-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.payment-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    opacity: 0.4;
    transition: all 0.3s;
}

.payment-step.active {
    opacity: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.step-icon {
    font-size: 1.5rem;
}

/* Panel SVG Icons */
.panel-svg-icon {
    flex-shrink: 0;
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

/* Button SVG icons */
.btn-svg {
    flex-shrink: 0;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Puzzle category tag */
.puzzle-category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.puzzle-text {
    font-size: 1.3rem;
    color: #333;
    font-weight: 500;
}

/* ── Sync Status Panel ─────────────────────────────── */
.sync-status-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0 1rem;
    border: 2px solid rgba(102, 126, 234, 0.15);
}

.sync-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.sync-avatar {
    font-size: 2.5rem;
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.sync-name {
    font-weight: 700;
    color: #2C3E50;
    font-size: 1rem;
}

.sync-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.sync-badge.not-ready {
    background: #f8d7da;
    color: #721c24;
}

.sync-badge.is-ready {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(56, 239, 125, 0.4);
    animation: readyPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes readyPop {
    0% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.sync-detail {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
}

.sync-divider {
    font-size: 1.2rem;
    font-weight: 800;
    color: #aaa;
    padding: 0 0.5rem;
}

.sync-hint {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.8rem;
}

/* Mismatch warnings */
.mismatch-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 0.7rem;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: shake 0.4s;
}

/* ── Countdown Overlay ─────────────────────────────── */
.countdown-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s;
}

.countdown-content {
    text-align: center;
    color: white;
}

.countdown-label {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.9;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.countdown-number {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    margin: 0.5rem 0;
    text-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: countPop 1s ease-in-out;
    color: #FFD700;
    transition: color 0.3s;
}

.countdown-number.urgent {
    color: #ff4757;
    animation: countPop 0.4s ease-in-out, urgentPulse 0.5s infinite alternate;
}

@keyframes countPop {
    0%   { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(1);   opacity: 1; }
}

@keyframes urgentPulse {
    from { text-shadow: 0 0 20px rgba(255, 71, 87, 0.5); }
    to   { text-shadow: 0 0 60px rgba(255, 71, 87, 0.9); }
}

.countdown-sub {
    font-size: 1.2rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.countdown-players {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.cd-vs {
    font-size: 1rem;
    opacity: 0.7;
    font-weight: 400;
}

/* ── WhatsApp Button ───────────────────────────────── */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s;
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-whatsapp:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

/* ── WhatsApp Modal ────────────────────────────────── */
.modal-whatsapp {
    max-width: 520px;
    padding: 0;
    overflow: hidden;
}

.wa-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: white;
}

.wa-header h2 {
    color: white !important;
    margin: 0 0 0.3rem;
    font-size: 1.5rem;
}

.wa-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.modal-whatsapp .close {
    color: white;
    top: 1rem;
    right: 1.5rem;
}

/* Message preview bubble */
.wa-message-preview {
    background: #ECE5DD;
    padding: 1.2rem;
}

.wa-bubble {
    background: white;
    border-radius: 0 12px 12px 12px;
    padding: 1rem 1.2rem;
    max-width: 85%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.wa-bubble::before {
    content: '';
    position: absolute;
    top: 0; left: -8px;
    border: 8px solid transparent;
    border-right-color: white;
    border-top: 0;
}

.wa-bubble p {
    margin: 0;
    color: #333;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* Tabs */
.wa-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: white;
    padding: 0 1.5rem;
}

.wa-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.wa-tab.active {
    color: #25D366;
    border-bottom-color: #25D366;
}

/* Tab content */
.wa-tab-content {
    display: none;
    padding: 1.5rem;
}

.wa-tab-content.active {
    display: block;
}

/* Contacts list */
.wa-search input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s;
}

.wa-search input:focus {
    outline: none;
    border-color: #25D366;
}

.contacts-list {
    max-height: 260px;
    overflow-y: auto;
}

.contacts-list::-webkit-scrollbar { width: 6px; }
.contacts-list::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 10px; }
.contacts-list::-webkit-scrollbar-thumb { background: #25D366; border-radius: 10px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
    background: #f9f9f9;
}

.contact-item:hover {
    background: #f0fff4;
}

.contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 700;
    color: #2C3E50;
    font-size: 0.95rem;
}

.contact-phone {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.1rem;
}

.contact-send-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    border-radius: 50px !important;
    width: auto !important;
    flex-shrink: 0;
}

/* Divider */
.wa-divider {
    display: flex;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    color: #999;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.wa-divider::before,
.wa-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #e0e0e0;
}

.wa-divider span {
    padding: 0 1rem;
}

/* Invite link row */
.wa-link-box {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem 1.5rem;
    align-items: center;
}

.wa-link-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #555;
    background: #f9f9f9;
}

.btn-copy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.btn-copy:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ── Withdrawal Modal ──────────────────────────────── */
.exchange-rate-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid #e0e0e0;
}

.available-balance {
    font-weight: 700;
    color: #764ba2;
    font-size: 0.95rem;
}

.withdrawal-summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    color: #333;
}

.summary-row + .summary-row {
    border-top: 1px solid #bbf7d0;
    margin-top: 0.35rem;
    padding-top: 0.6rem;
}

.summary-highlight {
    font-size: 1.2rem;
    font-weight: 800;
    color: #15803d;
}

/* Step completed state */
.payment-step.completed .step-icon::after {
    content: ' ✓';
}

.payment-step.completed {
    opacity: 0.6;
}

/* ── Withdrawal Fee Note ───────────────────────────── */
.withdraw-fee-note {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #fca5a5;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #b91c1c;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.fee-amount {
    font-weight: 800;
}

.fee-explanation {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
    background: #fff7ed;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    border-left: 3px solid #fb923c;
}
/* ═══════════════════════════════════════════════════════════
   MOBILE FIXES — navbar fixed + responsive layout
   ═══════════════════════════════════════════════════════════ */

/* Fix navbar — always stick to top, never scroll away */
.navbar-app {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0.8rem 1rem;
}

/* Push lobby content below the fixed navbar */
#lobbyScreen .lobby-wrapper {
    padding-top: 80px;
}

/* ── Mobile (≤ 600px) ───────────────────────────────────── */
@media (max-width: 600px) {

    /* Navbar — tighter, no overflow */
    .navbar-app {
        padding: 0.5rem 0.8rem;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    /* Hide logo text, keep icon only */
    .logo-small-text {
        display: none;
    }

    /* Coin balance — compact */
    .coin-balance {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 20px;
        border-width: 2px;
        animation: none; /* reduce animation overhead on mobile */
    }

    .coin-icon {
        font-size: 1rem;
        margin-right: 0.2rem;
    }

    /* Hide username text, keep avatar only */
    .username {
        display: none;
    }

    /* Logout button — smaller */
    .btn-logout {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }

    /* Nav sections — don't grow equally, let center dominate */
    .nav-left  { flex: 0 0 auto; }
    .nav-center { flex: 1 1 auto; justify-content: center; }
    .nav-right  { flex: 0 0 auto; gap: 0.4rem; }

    /* Lobby wrapper — less padding */
    .lobby-wrapper {
        padding: 1rem 0;
        padding-top: 70px;
    }

    .container {
        padding: 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Stack panels vertically */
    .lobby-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .panel {
        padding: 1.2rem;
        border-radius: 16px;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    /* Action buttons — full width */
    .btn-large {
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .btn-action {
        margin-bottom: 0.6rem;
    }

    /* Player cards */
    .player-card {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Modals — full width on mobile */
    .modal-content {
        width: 95vw;
        max-width: 95vw;
        padding: 1.2rem;
        margin: 0.5rem auto;
        border-radius: 16px;
    }

    /* Game setup modal */
    .stake-options-game {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .stake-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Prevent any horizontal overflow on mobile */
@media (max-width: 600px) {
    #lobbyScreen,
    .lobby-wrapper,
    .lobby-content,
    .container {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .panel {
        max-width: calc(100vw - 2rem);
    }
}

/* ═══════════════════════════════════════════════════════════
   CENTRE POPUP — blocking overlay for loading & confirmations
   ═══════════════════════════════════════════════════════════ */

.center-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.25s ease;
}

.center-popup {
    background: white;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 340px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.center-popup-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    line-height: 1;
}

.center-popup-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.6rem;
}

.center-popup-message {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.center-popup-note {
    margin-top: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE FIXES 2 — logo bleed, stat cards, whatsapp modal
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

    /* ── Landing page logo — prevent bleed ── */
    .logo-text {
        font-size: 1.1rem;
        max-width: calc(100vw - 120px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hero heading — prevent overflow */
    .hero-content h1 {
        font-size: 1.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero {
        padding: 3rem 0;
        min-height: auto;
        overflow-x: hidden;
    }

    .hero-container {
        padding: 0 1rem;
    }

    /* ── Stat cards (Games Won / Total Games) — fix cut off ── */
    .quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .stat-item {
        padding: 0.8rem;
        gap: 0.5rem;
        border-radius: 12px;
        min-width: 0; /* allow shrinking */
        overflow: hidden;
    }

    .stat-icon {
        font-size: 1.6rem;
        flex-shrink: 0;
    }

    .stat-info {
        min-width: 0;
        overflow: hidden;
    }

    .stat-label {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    /* ── WhatsApp modal — fit fully on screen ── */
    .modal-whatsapp {
        max-width: 95vw;
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px;
        margin: 5vh auto;
    }

    .wa-header {
        padding: 1rem;
        gap: 0.8rem;
    }

    .wa-header svg {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .wa-header h2 {
        font-size: 1.1rem;
    }

    .wa-header p {
        font-size: 0.82rem;
    }

    .wa-message-preview {
        padding: 0.8rem;
    }

    .wa-bubble {
        max-width: 100%;
        padding: 0.8rem;
    }

    .wa-bubble p {
        font-size: 0.8rem;
    }

    .wa-tabs {
        padding: 0 0.8rem;
    }

    .wa-tab {
        padding: 0.7rem 0.5rem;
        font-size: 0.8rem;
    }

    .wa-tab-content {
        padding: 1rem;
    }

    /* Share link box */
    .wa-link-box {
        padding: 0 1rem 1rem;
    }

    #inviteLink {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   FORGOT PASSWORD
   ═══════════════════════════════════════════════════════════ */

.forgot-link {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.forgot-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.forgot-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.forgot-header h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.forgot-header p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ── Ready Up badge fix ── */
.sync-badge.ready {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    border-color: transparent;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE GAME SCREEN FIXES
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

    /* Game container — no excess padding */
    .game-container {
        padding: 0.8rem;
        margin: 0.5rem auto;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Pool display */
    .game-pool {
        padding: 0.6rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
        margin-bottom: 0.8rem;
    }

    /* Players score row — tighter */
    .players-score {
        padding: 1rem 0.8rem;
        border-radius: 14px;
        margin-bottom: 0.8rem;
        gap: 0.5rem;
    }

    .player-name {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        word-break: break-word;
    }

    /* Score circles — smaller on mobile */
    .player-score {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .vs {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    /* Puzzle area */
    .puzzle-area {
        padding: 1rem;
        border-radius: 14px;
    }

    .puzzle-area h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    /* Question box */
    .puzzle-question {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 10px;
        min-height: 80px;
        margin-bottom: 1rem;
    }

    .puzzle-text {
        font-size: 1rem;
        line-height: 1.5;
    }

    .puzzle-category-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
        margin-bottom: 0.5rem;
    }

    /* Answer input */
    .answer-input-group {
        flex-direction: row;
        gap: 0.5rem;
    }

    .answer-input-group input {
        padding: 0.8rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .answer-input-group button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        border-radius: 8px;
    }

    /* Timer */
    .game-timer {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }

    /* Back to lobby button */
    #backToLobby {
        width: 100%;
        margin-top: 0.8rem;
        padding: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   GAME SCREEN — HORIZONTAL SCOREBOARD ON MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    /* Force horizontal layout for scoreboard */
    .players-score {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-around;
        padding: 0.8rem;
        gap: 0.3rem;
    }

    .player-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .player-name {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .player-score {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }

    .vs {
        font-size: 1rem;
        flex-shrink: 0;
        color: #aaa;
    }

    /* Game header — timer and pool side by side */
    .game-header {
        padding: 0.6rem 0.8rem;
    }

    .game-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .timer-display {
        font-size: 1.1rem;
    }

    .pool-display {
        font-size: 0.9rem;
    }

    /* Result modal on mobile */
    .result-content {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .final-scores {
        display: flex;
        justify-content: space-around;
        margin: 1rem 0;
        gap: 1rem;
    }

    .score-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.9rem;
    }
}
