* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.page-container {
    width: 100%;
    max-width: 500px;
}

.main-content {
    background: rgba(20, 20, 35, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: clamp(15px, 3vw, 25px) clamp(12px, 3vw, 20px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100,200,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: drift 30s linear infinite;
    pointer-events: none;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

h1 {
    font-size: clamp(24px, 6vw, 32px);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 5px;
    background: linear-gradient(135deg, #64c8ff, #a0d8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(12px, 2.5vw, 14px);
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.description {
    color: rgba(255,255,255,0.7);
    font-size: clamp(11px, 2vw, 12px);
    line-height: 1.4;
    margin-bottom: 15px;
}

.game-container {
    background: rgba(30,30,50,0.3);
    border: 1px solid rgba(100,200,255,0.15);
    border-radius: 12px;
    padding: clamp(12px, 3vw, 18px);
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
}

.game-title {
    color: rgba(100,200,255,0.9);
    font-size: clamp(12px, 2.5vw, 13px);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.game-stats {
    display: flex;
    gap: clamp(8px, 2vw, 12px);
    justify-content: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255,255,255,0.05);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(100,200,255,0.2);
    color: rgba(255,255,255,0.8);
    font-size: clamp(10px, 1.8vw, 11px);
}

.stat-value {
    font-size: clamp(14px,2.5vw,16px);
    font-weight: bold;
    color: rgba(100,200,255,0.95);
    display: block;
}

.snake-board {
    background: rgba(10,10,20,0.6);
    border: 2px solid rgba(100,200,255,0.2);
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 1;
    max-width: 200px;
    margin: 0 auto 12px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1.5px;
    padding: 4px;
}

.snake-cell {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    transition: background 0.1s ease;
}

.snake-cell.snake {
    background: linear-gradient(135deg, rgba(100,200,255,0.9), rgba(100,150,255,0.8));
    box-shadow: 0 0 10px rgba(100,200,255,0.5);
}

.snake-cell.snake-head {
    background: #FFD700 !important;
    box-shadow: 0 0 25px rgba(255,215,0,1), 0 0 50px rgba(255,215,0,0.8) !important;
    animation: headGlow 0.5s infinite alternate !important;
}

@keyframes headGlow {
    0% {
        box-shadow: 0 0 25px rgba(255,215,0,1), 0 0 50px rgba(255,215,0,0.8);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 35px rgba(255,215,0,1), 0 0 60px rgba(255,215,0,1);
        transform: scale(1.05);
    }
}

.snake-cell.food {
    background: linear-gradient(135deg, rgba(255,100,100,0.9), rgba(255,150,100,0.8));
    box-shadow: 0 0 10px rgba(255,100,100,0.6);
    animation: pulse 0.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.controls {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

button {
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 2vw, 16px);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(10px, 1.8vw, 11px);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-play {
    background: rgba(100,200,255,0.2);
    color: rgba(100,200,255,0.95);
    border: 1.5px solid rgba(100,200,255,0.4);
    backdrop-filter: blur(5px);
}

.btn-play:hover {
    background: rgba(100,200,255,0.35);
    border-color: rgba(100,200,255,0.7);
    box-shadow: 0 4px 15px rgba(100,200,255,0.2);
    transform: translateY(-2px);
}

.btn-reset {
    background: rgba(255,100,100,0.15);
    color: rgba(255,150,100,0.95);
    border: 1.5px solid rgba(255,100,100,0.3);
    backdrop-filter: blur(5px);
}

.btn-reset:hover {
    background: rgba(255,100,100,0.25);
    border-color: rgba(255,100,100,0.6);
    box-shadow: 0 4px 15px rgba(255,100,100,0.15);
    transform: translateY(-2px);
}

.game-info {
    color: rgba(255,255,255,0.5);
    font-size: clamp(9px, 1.8vw, 10px);
    margin-bottom: 8px;
}

.mobile-controls {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-controls {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 8px;
        max-width: 140px;
        margin: 10px auto;
        width: 100%;
    }

    .arrow-btn {
        background: rgba(100,200,255,0.2) !important;
        border: 1.5px solid rgba(100,200,255,0.4) !important;
        padding: 12px !important;
        font-size: 14px !important;
        color: rgba(100,200,255,0.9) !important;
        width: 100%;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .arrow-btn:active {
        background: rgba(100,200,255,0.5) !important;
        box-shadow: 0 0 10px rgba(100,200,255,0.6) !important;
    }

    .arrow-btn:nth-child(1) { grid-column: 2; grid-row: 1; }
    .arrow-btn:nth-child(2) { grid-column: 2; grid-row: 3; }
    .arrow-btn:nth-child(3) { grid-column: 1; grid-row: 2; }
    .arrow-btn:nth-child(4) { grid-column: 3; grid-row: 2; }
}

.coming-soon {
    color: rgba(255,255,255,0.5);
    font-size: clamp(11px, 2vw, 12px);
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(100,200,255,0.1);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.social-links a {
    color: rgba(100,200,255,0.6);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: rgba(100,200,255,0.95);
    transform: scale(1.2);
}
