/* CSS Variables for gaming theme */
:root {
    --primary-blue: #3b82f6;
    --primary-blue: #4a90e2;
    --primary-cyan: #50e3c2;
    --primary-green: #4a90e2; /* Changed to blue for consistency */
    --primary-red: #ef4444;
    --bg-dark: #0a0e1a;
    --bg-darker: #050810;
    --card-bg: rgba(15, 20, 35, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --transition: 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile-responsive grid for play choice modal */
@media (max-width: 1000px) {
    .play-options-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Reorder cards on mobile: Sign up first, Guest second */
    .signup-option {
        order: 1 !important;
    }

    .guest-option {
        order: 2 !important;
    }

    .play-option-card {
        padding: 1rem !important;
        min-height: 240px !important;
    }

    .play-option-card h3 {
        font-size: 1rem !important;
        margin-bottom: 0.4rem !important;
    }

    .play-option-card p {
        font-size: 0.8rem !important;
    }

    /* Reduce icon size on mobile */
    .play-option-card > div:first-child {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0.75rem !important;
    }

    .play-option-card > div:first-child i {
        font-size: 1.5rem !important;
    }

    /* Ensure consistent button positioning */
    .play-option-card button {
        margin-top: auto !important;
        padding: 0.6rem !important;
    }

    /* Disable hover effects on mobile */
    .play-option-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Reduce modal content spacing on mobile */
    .modal-content h2 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Fix recommended badge on mobile */
    .play-option-card div[style*="position: absolute"] {
        top: -8px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        padding: 0.1rem 0.35rem !important;
        font-size: 0.55rem !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: auto !important;
        display: inline-block !important;
        height: auto !important;
        line-height: 1.2 !important;
    }
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000; /* Default black base */
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Apply gradient only when NOT in game to avoid affecting game canvas */
body:not(.in-game) {
    background: radial-gradient(ellipse at center, #0f1922 0%, #000000 100%);
}

/* On mobile, allow vertical scrolling */
@media (max-width: 1000px) {
    html, body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Animated Background - Neon Grid */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #2d1b4e 0%, #000000 100%);
}

.neon-grid-background {
    perspective: 1000px;
}

.grid-plane {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(80, 227, 194, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.5) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center bottom;
    transform: rotateX(60deg) translateY(-100px) translateZ(-200px);
    transform-origin: center top;
    animation: gridMove 10s linear infinite;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 10%, rgba(0,0,0,0.7) 30%, black 50%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 10%, rgba(0,0,0,0.7) 30%, black 50%, black 100%);
    filter: drop-shadow(0 0 3px rgba(255, 0, 255, 0.3));
    will-change: background-position;
}

.horizon-glow {
    position: absolute;
    top: 30%;
    left: 0;
    width: 100%;
    height: 150px;
    background: radial-gradient(ellipse at bottom,
        rgba(80, 227, 194, 0.3) 0%,
        rgba(189, 0, 255, 0.15) 40%,
        transparent 70%
    );
    filter: blur(25px);
    z-index: 1;
    opacity: 0.8;
}

/* Glowing Sun/Moon */
.background-animation::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #50e3c2, #bd00ff);
    filter: blur(60px);
    opacity: 0.4;
    z-index: 0;
}

@keyframes gridMove {
    0% {
        background-position: center 0;
    }
    100% {
        background-position: center 600px; /* Smooth scrolling with multiple grid repetitions */
    }
}

/* Old floating cell styles removed */


/* Landing container */
.landing-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Top Navigation */
.top-nav {
    padding: 1.25rem 2.5rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    position: relative;
    z-index: 10;
    min-height: 60px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Welcome Container */
.welcome-container {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Welcome Message - Aligned with Neon Grid */
.welcome-message {
    padding: 0.5rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(80, 227, 194, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(80, 227, 194, 0.1);
    transition: all 0.3s ease;
}

.welcome-message:hover {
    border-color: rgba(80, 227, 194, 0.5);
    background: rgba(80, 227, 194, 0.05);
}

/* User Action Buttons */
.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: transparent;
    border: 2px solid rgba(80, 227, 194, 0.4);
    color: #50e3c2;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 10px rgba(80, 227, 194, 0.1);
    position: relative;
    overflow: hidden;
}

.user-action-btn:hover {
    background: rgba(80, 227, 194, 0.1);
    border-color: #50e3c2;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 20px rgba(80, 227, 194, 0.3);
}

.user-action-btn i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    text-shadow: 0 0 10px rgba(80, 227, 194, 0.4);
}

.user-action-btn:active {
    transform: translateY(0);
}

.welcome-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#welcomeUsername {
    color: #50e3c2;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(80, 227, 194, 0.3), 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

/* Wallet Display (Desktop) - Aligned with Neon Grid */
.wallet-display {
    position: absolute;
    top: 1.5rem;  /* Fixed position with margin from top */
    right: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: 2px solid rgba(74, 144, 226, 0.4);
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.15);
}

.wallet-display:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: #4a90e2;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 25px rgba(74, 144, 226, 0.3);
}

/* Add Funds Button in Desktop Wallet - Aligned with Neon Grid */
.wallet-add-funds-btn {
    background: linear-gradient(90deg, #50e3c2, #4a90e2);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    white-space: nowrap;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(74, 144, 226, 0.3);
    padding-left: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(80, 227, 194, 0.2);
}

.wallet-add-funds-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 20px rgba(80, 227, 194, 0.4);
    filter: brightness(1.1);
}

.wallet-add-funds-btn i {
    font-size: 0.85rem;
}

.wallet-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-icon i {
    color: white;
    font-size: 0.9rem;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wallet-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #50e3c2;  /* Matching the Play to Earn cyan color */
    letter-spacing: 0.5px;
}

/* Mobile Wallet Nav Item */
.wallet-nav-item {
    position: relative;
}

.wallet-nav-item .wallet-nav-amount {
    position: absolute;
    right: 1.5rem;
    color: #50e3c2;  /* Matching the Play to Earn cyan color */
    font-weight: 700;
    font-size: 1rem;
}

/* Main Content */
.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    position: relative;
    overflow: visible;
    min-height: 0;
}

/* Game Branding */
.game-branding {
    text-align: center;
    margin-top: -4.5rem;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 5;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2.5px;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.game-title {
    font-size: clamp(2.7rem, 6.3vw, 5.4rem);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 4px;
    line-height: 1;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    padding: 10px;
    margin-bottom: 0.5rem;
    
    /* Chrome/Glassy Effect */
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    
    /* Metallic/Chrome Gradient */
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #e0f7ff 35%,
        #87cefa 48%,
        #2196f3 50%,    /* Horizon Line Top */
        #0d47a1 50%,    /* Horizon Line Bottom */
        #1565c0 70%,
        #0d47a1 100%
    );
        
    -webkit-background-clip: text;
    background-clip: text;

    /* Static Glassy Glow - No animation to prevent flashing */
    filter: drop-shadow(0 0 12px rgba(135, 206, 250, 0.7))
            drop-shadow(0 0 25px rgba(33, 150, 243, 0.5))
            drop-shadow(0 0 45px rgba(13, 71, 161, 0.45));

    /* Smooth transition for hover */
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Hover effect - Smoother without conflicting animations */
.game-title:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 15px rgba(135, 206, 250, 0.85))
            drop-shadow(0 0 30px rgba(33, 150, 243, 0.65))
            drop-shadow(0 0 60px rgba(13, 71, 161, 0.55));
}

/* Beta Label Badge */
.beta-label {
    position: absolute;
    top: -8px;
    right: -45px;
    background: linear-gradient(135deg, #ff9a56, #ff7043);
    color: #ffffff;
    font-size: 0.55rem;
    font-weight: 700;
    font-style: normal;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow:
        0 2px 8px rgba(255, 154, 86, 0.4),
        0 0 20px rgba(255, 112, 67, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    animation: betaPulse 2s ease-in-out infinite;
    transform: rotate(12deg);
    transform-origin: center;
    z-index: 10;
    white-space: nowrap;
}

/* Subtle pulse animation for beta badge */
@keyframes betaPulse {
    0%, 100% {
        box-shadow:
            0 2px 8px rgba(255, 154, 86, 0.4),
            0 0 20px rgba(255, 112, 67, 0.2),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow:
            0 2px 12px rgba(255, 154, 86, 0.6),
            0 0 30px rgba(255, 112, 67, 0.3),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
}

/* Action Area */
.action-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    width: 100%;
}

.action-area.tutorial-section {
    margin-top: 1.5rem;
    margin-bottom: -0.5rem;
}

/* Action Buttons */
.action-buttons {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: auto;
}

/* Last Score Box */
.last-score-box {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.last-score-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.last-score-value {
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.how-to-play-btn {
    background: transparent;
    border: 2px solid rgba(80, 227, 194, 0.5);
    color: #50e3c2;
    padding: 0.65rem 1.75rem;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 20px rgba(80, 227, 194, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.how-to-play-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(80, 227, 194, 0.3),
        transparent);
    transform: translateY(-50%);
    transition: left 0.5s ease;
}

.how-to-play-btn:hover {
    background: rgba(80, 227, 194, 0.1);
    border-color: #50e3c2;
    transform: translateY(-2px) scale(1.02);
    color: #fff;
    box-shadow:
        0 0 30px rgba(80, 227, 194, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(80, 227, 194, 0.4);
}

.how-to-play-btn:hover::before {
    left: 100%;
}

.how-to-play-btn i {
    transition: transform 0.3s ease;
}

.how-to-play-btn:hover i:last-child {
    transform: translateX(3px);
}

/* How to Play button in top nav */
.how-to-play-btn.top-nav-btn {
    padding: 0.55rem 1.35rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Discord Floating Button (bottom right) */
.discord-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #5865F2, #4752C4);
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.discord-floating-btn:hover {
    background: linear-gradient(135deg, #6B73F7, #5865F2);
    transform: translateY(-3px) scale(1.05);
    color: white;
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.5);
}

.discord-floating-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.discord-floating-btn i {
    font-size: 1.2rem;
}

.discord-floating-btn span {
    letter-spacing: 0.5px;
}

/* Hide Discord button during gameplay */
body.in-game .discord-floating-btn {
    display: none;
}

/* Responsive - hide text on small screens */
@media (max-width: 480px) {
    .discord-floating-btn span {
        display: none;
    }
    
    .discord-floating-btn {
        padding: 0.75rem;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        justify-content: center;
    }
}

.play-btn {
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    border: none;
    color: white;
    padding: 1.25rem 3.5rem;
    border-radius: 40px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

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

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.4);
}

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

/* USDC Rotating Logo */
.usdc-rotating-logo {
    width: 50px;
    height: 50px;
    animation: flip3D 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes flip3D {
    0% {
        transform: perspective(400px) rotateY(0deg);
    }
    50% {
        transform: perspective(400px) rotateY(180deg);
    }
    100% {
        transform: perspective(400px) rotateY(360deg);
    }
}

/* Arena Buttons Container */
.arena-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

/* Base Arena Button Styles */
.arena-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.35rem;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 240px;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.arena-btn .arena-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.arena-btn .arena-icon i {
    font-size: 1.35rem;
    color: white;
}

.arena-btn .arena-label {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.arena-btn .arena-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    letter-spacing: 0.3px;
    margin-bottom: 0.75rem;
}

.arena-btn .arena-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.arena-btn .arena-description p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0.25rem 0;
    opacity: 0.9;
}

.arena-btn .arena-note {
    font-size: 0.7rem;
    opacity: 0.7;
    font-style: italic;
    margin-top: 0.5rem;
}

.arena-btn .arena-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 0.35rem;
    color: #FFC107;
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

.arena-btn .arena-warning i {
    margin-right: 0.3rem;
}

.arena-btn .arena-features {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    text-align: left;
}

.arena-btn .arena-features li {
    font-size: 0.7rem;
    margin: 0.25rem 0;
    opacity: 0.9;
}

.arena-btn .arena-features i {
    color: #4acfa0;
    margin-right: 0.5rem;
}

/* Free Arena Button */
.free-arena-btn {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.4), rgba(73, 80, 87, 0.3));
    color: white;
    border: 1px solid rgba(108, 117, 125, 0.5);
    backdrop-filter: blur(10px);
}

.free-arena-btn .arena-icon {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.free-arena-btn:hover {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.5), rgba(73, 80, 87, 0.4));
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(108, 117, 125, 0.4);
    border-color: rgba(108, 117, 125, 0.7);
}

/* Paid Arena Button */
.paid-arena-btn {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.4), rgba(80, 227, 194, 0.3));
    color: white;
    border: 1px solid rgba(74, 144, 226, 0.5);
    backdrop-filter: blur(10px);
}

.paid-arena-btn .arena-icon {
    background: transparent;
}

.paid-arena-btn:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.5), rgba(80, 227, 194, 0.4));
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.4);
    border-color: rgba(74, 144, 226, 0.7);
}

/* Shine effect on hover */
.arena-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.arena-btn:hover::before {
    transform: rotate(45deg) translateX(100%);
}

/* Mobile menu styles removed - desktop only app */

/* Bottom Navigation - Hidden on Desktop */
.bottom-nav {
    display: none; /* Hide on desktop */
    justify-content: center;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    width: 100%;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    color: var(--text-secondary);
    width: 120px;
    flex-shrink: 0;
}

.nav-item i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--primary-green);
}

.nav-item.active::before {
    width: 100%;
}

/* Coming Soon styles for nav items */
.nav-item.coming-soon {
    opacity: 0.6;
    cursor: default;
    position: relative;
}

.nav-item.coming-soon:hover {
    color: var(--text-secondary);
    transform: none;
}

.coming-soon-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) scale(0.7);
    background: rgba(100, 100, 100, 0.2);
    color: #888;
    font-size: 0.45rem;
    padding: 0.1rem 0.25rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-transform: uppercase;
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 8px;
    transform-origin: center;
}

/* Exit message styles for different scenarios */
.exit-message {
    padding: 12px 20px;
    margin: 15px auto;
    border-radius: 10px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    width: 280px;  /* Fixed width for consistency */
    min-height: 44px;  /* Consistent height */
    line-height: 20px;
    animation: slideInDown 0.5s ease-out;
    position: relative;
    display: none;  /* Hidden by default */
    align-items: center;
    justify-content: center;
}

/* When visible, use flexbox for centering */
.exit-message:not([style*="display: none"]) {
    display: flex !important;
}

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

.exit-kick {
    background: linear-gradient(135deg, #3d2f1f, #4a3826);
    border: 2px solid #ff9800;
    color: #ffc947;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.exit-death {
    background: linear-gradient(135deg, #3d1f1f, #4a2626);
    border: 2px solid #f44336;
    color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.exit-success {
    background: linear-gradient(135deg, #1f3d2f, #264a35);
    border: 2px solid #4caf50;
    color: #81c784;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.exit-disconnect {
    background: linear-gradient(135deg, #2f2f3d, #35354a);
    border: 2px solid #9e9e9e;
    color: #bdbdbd;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3);
}

.exit-generic {
    background: linear-gradient(135deg, #1f2f3d, #26354a);
    border: 2px solid #2196f3;
    color: #64b5f6;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

/* Modals handled in modals.css now, but keeping base modal structure here as fallback or for ModalManager dependency */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

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

.modal-content {
    background: linear-gradient(135deg, #0f1922, #1a2332);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: slideUp 0.3s;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 2.5rem;
    font-size: 2rem;
    text-align: center;
    padding-top: 0.5rem;
}

.tutorial-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
    overflow-y: hidden;
}

.tutorial-step {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.tutorial-step:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

/* Coming Soon styling for support cards */
.tutorial-step.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
    filter: grayscale(0.8);
}

.tutorial-step.coming-soon:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    filter: grayscale(0.8);
}

.tutorial-step.coming-soon i {
    opacity: 0.5;
}

.tutorial-step.coming-soon h3,
.tutorial-step.coming-soon p {
    opacity: 0.6;
}

.tutorial-step .coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(100, 100, 100, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.6rem;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(4px);
}

.tutorial-step i {
    font-size: 1.75rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.tutorial-step h3 {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.tutorial-step p {
    color: var(--text-secondary);
    line-height: 1.3;
    font-size: 0.8rem;
}

/* Tutorial Carousel Styles */
.tutorial-carousel {
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.carousel-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-title-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    line-height: 1;
}

.carousel-title-wrapper i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.carousel-header h2 {
    margin: 0;
    font-size: 1.6rem;
    background: linear-gradient(90deg, #4a90e2, #50e3c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.3s ease;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    position: relative;
    top: -2px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    min-height: 300px;
    flex: 1;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    transform: translateX(calc(-1 * var(--slide-index, 0) * 100%));
}

.carousel-title-wrapper i.fade-out,
.carousel-header h2.fade-out {
    opacity: 0;
}

.hidden {
    display: none !important;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 1.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(80, 227, 194, 0.15));
    border: 2px solid rgba(74, 144, 226, 0.4);
    border-radius: 50%;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.2);
}

.slide-icon i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carousel-slide h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.slide-content {
    max-width: 480px;
    width: 100%;
    padding: 0;
}

/* Modern list-based layout */
.slide-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.slide-item {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item:hover .item-content {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(74, 144, 226, 0.2);
}

.slide-item:hover {
    transform: translateX(5px);
}

.slide-item.highlight .item-content {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.08), rgba(74, 144, 226, 0.08));
    border-color: rgba(80, 227, 194, 0.3);
}

.slide-item.highlight .item-icon {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.25), rgba(74, 144, 226, 0.25));
}

.slide-item.highlight:hover .item-content {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.12), rgba(74, 144, 226, 0.12));
    border-color: rgba(80, 227, 194, 0.4);
}

/* Icon styling */
.item-icon {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(80, 227, 194, 0.2));
    border-radius: 12px;
    flex-shrink: 0;
    padding: 1rem 0;
}

.item-icon i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Content styling */
.item-content {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    letter-spacing: -0.02em;
}

.item-content p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.3;
}

/* Command-specific styling */
.slide-item.command {
    align-items: stretch;
}

.slide-item.command .item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.key-badge {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    letter-spacing: 0;
    flex-shrink: 0;
    padding: 1rem 0;
}

/* Enhanced Commands slide */
.command-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    text-align: left;
}

.command-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(74, 144, 226, 0.3);
    transform: translateX(5px);
}

.command-item:last-child {
    margin-bottom: 0;
}

.key-highlight {
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    color: white;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(74, 144, 226, 0.4);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.command-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.command-text strong {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.command-text span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.4;
}

.carousel-nav {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    padding-bottom: 0.5rem;
}

.carousel-dots {
    display: flex;
    gap: 0.6rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dot.active {
    width: 24px;
    border-radius: 5px;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
}

.carousel-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.carousel-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.prev-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prev-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.prev-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.play-btn {
    background: linear-gradient(135deg, #50e3c2, #4a90e2);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(80, 227, 194, 0.3);
    padding: 1rem 2rem;
    font-size: 1rem;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 227, 194, 0.4);
}

.modal-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-button:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .play-btn:hover,
    .how-to-play-btn:hover,
    .nav-item:hover,
    .tutorial-step:hover,
    .social-link:hover {
        transform: none;
    }

    .play-btn,
    .how-to-play-btn,
    .modal-button,
    .tab-btn,
    .social-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 44px; /* iOS minimum touch target */
    }

    /* Ensure clickable elements are large enough on touch devices */
    input[type="checkbox"] {
        min-width: 24px;
        min-height: 24px;
    }

    .close-modal {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

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

/* Mobile Modal Styles */
@media (max-width: 1000px) {
    /* Modal specific adjustments */
    .modal-content {
        max-width: 95%;
        width: 95%;
        padding: 1.25rem;
        max-height: 90vh;
        margin: 1rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Profile modal mobile fixes */
    .profile-header {
        flex-direction: column !important;
        text-align: center;
    }

    .profile-avatar {
        width: 70px !important;
        height: 70px !important;
        font-size: 2rem !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .stats-grid > div {
        padding: 1rem !important;
        font-size: 0.9rem;
    }

    .preferences-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    /* Leaderboard tabs mobile */
    .tab-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem !important;
    }

    /* Social links mobile */
    .social-links a {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* Support grid mobile */
    .tutorial-content {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        max-height: 60vh;
        overflow-y: auto;
        padding-right: 0.5rem;
    }

    .tutorial-step {
        padding: 0.75rem !important;
    }

    .tutorial-step i {
        font-size: 1.25rem !important;
    }

    .tutorial-step h3 {
        font-size: 0.85rem !important;
    }

    .tutorial-step p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }

    /* Tutorial Carousel Mobile */
    .tutorial-carousel {
        max-width: 100% !important;
    }

    .carousel-header {
        margin-bottom: 1.5rem !important;
        text-align: center;
    }

    .carousel-title-wrapper {
        flex-wrap: wrap;
    }

    .carousel-title-wrapper i {
        font-size: 1.3rem !important;
    }

    .carousel-header h2 {
        font-size: 1.4rem !important;
    }

    .carousel-container {
        min-height: 280px !important;
    }

    .carousel-slide {
        padding: 1.5rem 0.5rem !important;
    }

    .slide-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 1rem !important;
    }

    .slide-icon i {
        font-size: 1.5rem !important;
    }

    .carousel-slide h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.8rem !important;
    }

    .slide-content {
        max-width: 100% !important;
    }

    .slide-content p {
        font-size: 0.9rem !important;
        margin-bottom: 0.6rem !important;
    }

    .command-item {
        flex-direction: column;
        gap: 0.5rem !important;
        padding: 0.6rem !important;
        text-align: center;
    }

    .key-highlight {
        min-width: 50px !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    .carousel-nav {
        gap: 1rem !important;
    }

    .carousel-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem !important;
    }

    .carousel-btn {
        width: 100% !important;
        padding: 0.8rem 1rem !important;
        justify-content: center;
        font-size: 0.9rem !important;
    }

    .play-btn {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
}

/* Mobile Responsive */
@media (max-width: 1000px) {
    .top-nav {
        padding: 1rem 1.5rem;
        position: relative;
        height: 80px;
    }
    .game-subtitle { font-size: 0.85rem; letter-spacing: 3px; }
    .game-title { font-size: 2.5rem; white-space: normal; }
    /* Adjust beta label for tablet/medium screens */
    .beta-label {
        font-size: 0.5rem;
        padding: 3px 8px;
        right: -40px;
        top: -6px;
    }
    .how-to-play-btn { padding: 0.6rem 1.5rem; font-size: 0.85rem; }
    .play-btn { padding: 1rem 2.5rem; font-size: 1.2rem; }

    /* Arena buttons on mobile */
    .arena-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 300px;
        margin: 0.5rem auto;
    }

    /* Reorder buttons on mobile - Play to Earn first */
    .arena-buttons {
        display: flex;
        flex-direction: column-reverse;
    }

    .arena-btn {
        width: 100%;
        min-width: unset;
        padding: 1rem 1.5rem;
    }

    .arena-btn .arena-label {
        font-size: 1rem;
    }

    .arena-btn .arena-subtitle {
        font-size: 0.75rem;
    }

    /* Hide arena descriptions on mobile to save space */
    .arena-btn .arena-description {
        display: none;
    }

    /* Reduce icon size on mobile */
    .arena-btn .arena-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }

    .arena-btn .arena-icon i {
        font-size: 1.25rem;
    }

    /* Reduce game title size for mobile */
    .game-branding {
        margin-bottom: 1rem;
    }

    .game-title {
        font-size: 2.5rem;
        margin: 0.5rem 0;
    }

    .game-subtitle {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }

    /* Reduce main content padding */
    .main-content {
        padding: 0.5rem 1rem;
    }

    /* Reduce how-to-play button size */
    .how-to-play-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    /* Hide desktop wallet display on mobile */
    .wallet-display {
        display: none !important;
    }


    /* Hide bottom nav on mobile */
    .bottom-nav {
        display: none;
    }

    /* Remove bottom padding since no bottom nav */
    .landing-container {
        padding-bottom: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    /* Tutorial carousel mobile optimization */
    .modal-content.tutorial-carousel,
    .tutorial-carousel {
        max-height: 85vh !important;
        max-width: 95% !important;
        padding: 1rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .carousel-header {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.5rem !important;
        position: static !important;
    }

    .carousel-title-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .carousel-header h2 {
        font-size: 1.2rem !important;
        line-height: 1 !important;
        margin: 0 !important;
        top: 0 !important;
        position: relative !important;
    }

    .carousel-title-wrapper i {
        font-size: 1.1rem !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
    }

    .carousel-container {
        min-height: auto !important;
        margin-bottom: 0.5rem !important;
        overflow: visible !important;
    }

    .carousel-slide {
        padding: 0.5rem !important;
        min-height: auto !important;
    }

    .slide-list {
        gap: 0.5rem !important;
    }

    .slide-item {
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .item-icon,
    .key-badge {
        width: 100% !important;
        min-width: unset !important;
        height: 45px !important;
        padding: 0.5rem !important;
        margin: 0 0 0.5rem 0 !important;
        border-radius: 8px !important;
    }

    .item-icon i {
        font-size: 1.2rem !important;
    }

    .key-badge {
        font-size: 0.8rem !important;
    }

    .item-content {
        padding: 0.75rem !important;
        width: 100% !important;
    }

    .item-content h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.2rem !important;
    }

    .item-content p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }

    .carousel-dots {
        gap: 0.4rem !important;
    }

    .carousel-nav {
        gap: 0.5rem !important;
        padding: 0.5rem 0 !important;
        position: static !important;
        margin-top: auto !important;
    }

    .carousel-buttons {
        gap: 0.5rem !important;
        width: 100%;
    }

    .carousel-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.8rem !important;
    }

    .prev-btn,
    .next-btn {
        min-width: 100px !important;
    }

    .game-subtitle {
        font-size: 0.65rem;
        letter-spacing: 1.5px;
        margin-bottom: 0.25rem;
    }
    .game-title {
        font-size: 1.75rem;
        letter-spacing: 1px;
        margin: 0.25rem 0;
    }
    .game-branding {
        margin-bottom: 0.5rem;
    }
    .action-area {
        margin-top: 0.5rem;
    }
    .how-to-play-btn {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
        gap: 0.3rem;
        margin-bottom: 0.5rem;
    }
    .how-to-play-btn i {
        font-size: 0.85rem;
    }

    /* Further optimize arena buttons for small screens */
    .arena-buttons {
        gap: 0.5rem;
        margin: 0.25rem auto;
    }

    .arena-btn {
        padding: 0.75rem 1.25rem;
    }

    .arena-btn .arena-label {
        font-size: 0.9rem;
    }

    .arena-btn .arena-subtitle {
        font-size: 0.7rem;
    }

    .arena-btn .arena-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 0.4rem;
    }

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

    /* Adjust USDC logo for small screens */
    .usdc-rotating-logo {
        width: 28px;
        height: 28px;
    }

    .landing-container {
        padding-bottom: 20px;
    }
    .nav-item { width: 70px; }
    .nav-item span { font-size: 0.55rem; letter-spacing: 0.5px; }

    /* Modal adjustments for small screens */
    .modal-content {
        padding: 1rem !important;
        border-radius: 15px;
    }

    .modal-content h2 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    /* Profile modal small screen fixes */
    .stats-grid {
        font-size: 0.8rem;
    }

    .stats-grid > div {
        padding: 0.75rem !important;
    }

    .stats-grid i {
        font-size: 1rem !important;
    }

    /* Username edit on small screens */
    #username-edit-container {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    #username-edit-container button {
        width: 100% !important;
    }

    /* Modal buttons */
    .modal-button {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* Close button */
    .close-modal {
        font-size: 1.5rem !important;
        top: 1rem !important;
        right: 1rem !important;
    }
}

/* Very small mobile */
@media (max-width: 380px) {
    .nav-item span { display: none; }
    .nav-item { width: auto; padding: 0.5rem 0.75rem; }
    .bottom-nav { gap: 1rem; }
    .landing-container {
        padding-bottom: 60px; /* Even smaller space for very small screens */
    }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .landing-container {
        min-height: 100vh;
        padding-bottom: 60px; /* Space for fixed bottom nav in landscape */
    }
    .main-content { padding: 1rem; }
    .game-branding { margin-bottom: 0.5rem; }
    .game-subtitle { font-size: 0.8rem; margin-bottom: 0.5rem; }
    .game-title { font-size: 1.75rem; }
    /* Adjust beta label for small mobile screens */
    .beta-label {
        font-size: 0.45rem;
        padding: 2px 6px;
        right: -32px;
        top: -5px;
        letter-spacing: 1px;
    }
    .action-area { margin-top: 0.5rem; }
    .action-buttons { gap: 1rem; }
    .how-to-play-btn { padding: 0.5rem 1.25rem; font-size: 0.75rem; }
    .play-btn { padding: 0.75rem 2rem; font-size: 1rem; }
    .bottom-nav {
        padding: 0.75rem;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }
    .nav-item { padding: 0.5rem; }
    .nav-item i { font-size: 1rem; }
    .nav-item span { font-size: 0.5rem; }
}

/* ===================================
   FEEDBACK WIDGET STYLES
   =================================== */

.feedback-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hide feedback widget during gameplay */
#gameView ~ .feedback-widget,
body.in-game .feedback-widget {
    display: none;
}

/* Feedback Button */
.feedback-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: feedbackBtnFloat 3s ease-in-out infinite;
}

.feedback-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 30px rgba(74, 144, 226, 0.6);
}

.feedback-btn:active {
    transform: scale(0.95);
}

/* Pulsing animation for attention */
.feedback-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.6);
    animation: pulse-ring 2s infinite;
    pointer-events: none;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

/* Feedback Panel */
.feedback-panel {
    position: absolute;
    bottom: 75px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #0f1922, #1a2332);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.feedback-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Feedback Header */
.feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.1));
    border-radius: 16px 16px 0 0;
}

.feedback-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-header i {
    color: #50e3c2;
}

.close-feedback {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.close-feedback:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

/* Feedback Body */
.feedback-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 240px);
}

.feedback-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Form Styles */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #4a90e2;
    font-size: 0.9rem;
}

.optional {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #1a2332;
    color: white;
}

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

.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.char-counter.over-limit {
    color: #ff6b6b;
}

/* Submit Button */
.feedback-submit-btn {
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    border: none;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.feedback-submit-btn:active {
    transform: translateY(0);
}

.feedback-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.feedback-submit-btn--success {
    background: linear-gradient(135deg, #22c55e, #10b981) !important;
    color: #ffffff !important;
    border: 2px solid #22c55e !important;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.6), 0 4px 15px rgba(34, 197, 94, 0.4) !important;
    cursor: default !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.02) !important;
}

.feedback-submit-btn.loading {
    pointer-events: none;
}


.feedback-submit-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success Message */
.feedback-success {
    text-align: center;
    padding: 2rem 1rem;
}

.feedback-success i {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    display: block;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.feedback-success h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feedback-success p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.feedback-success-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-success-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Error Message */
.feedback-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: shake 0.5s ease;
}

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

.feedback-error i {
    color: #ff6b6b;
    font-size: 1.25rem;
}

.feedback-error p {
    color: #ff6b6b;
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 1000px) {
    .feedback-widget {
        top: 20px;
        left: 20px;
        bottom: auto;
    }

    .feedback-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .feedback-panel {
        width: calc(100vw - 30px);
        top: 70px;
        bottom: auto;
        max-height: calc(100vh - 100px);
    }

    .feedback-header {
        padding: 1rem 1.25rem;
    }

    .feedback-header h3 {
        font-size: 1rem;
    }

    .feedback-body {
        padding: 1.25rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem;
        font-size: 0.85rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .feedback-widget {
        top: 15px;
        left: 15px;
    }

    .feedback-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .feedback-panel {
        width: calc(100vw - 20px);
        top: 65px;  /* Adjust for smaller button */
        bottom: auto;
        left: 10px;
    }

    .feedback-header {
        padding: 0.875rem 1rem;
    }

    .feedback-body {
        padding: 1rem;
    }
}

/* Hide on very small screens in landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .feedback-widget {
        bottom: 10px;
        left: 10px;
    }

    .feedback-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .feedback-panel {
        max-height: calc(100vh - 60px);
        bottom: 55px;
    }
}

/* Mobile Footer */
.mobile-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 30, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-footer-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

.mobile-footer-btn:hover,
.mobile-footer-btn:active {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-footer-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease;
}

.mobile-footer-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.mobile-footer-btn:active i {
    transform: scale(0.95);
}

/* Special styling for feedback button */
.mobile-footer-btn.feedback-mobile {
    color: #50e3c2;
}

.mobile-footer-btn.feedback-mobile:hover {
    background: rgba(80, 227, 194, 0.1);
}

/* Special styling for Discord button */
.mobile-footer-btn.discord-mobile {
    color: #7289da;
}

.mobile-footer-btn.discord-mobile:hover {
    background: rgba(114, 137, 218, 0.1);
}

/* Show mobile footer on mobile */
@media (max-width: 1000px) {
    .mobile-footer {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
    }

    /* Hide floating feedback button on mobile, but keep the panel accessible */
    .feedback-widget .feedback-btn {
        display: none !important;
    }

    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }

    /* Hide welcome message on mobile */
    .welcome-container {
        display: none !important;
    }

    /* Hide user and settings icons in top nav on mobile */
    #profileBtn,
    #settingsBtn {
        display: none !important;
    }

    /* Adjust main content to account for footer */
    .landing-container {
        padding-bottom: 70px;
    }
}