:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --x-color: #ef4444;
    --o-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Dynamic Animated Background */
.background {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(59, 130, 246, 0.4);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.4);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

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

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

header {
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Game Styles */
.game-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.game-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

.cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cell:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.cell.x {
    color: var(--x-color);
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.cell.o {
    color: var(--o-color);
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#statusText {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

#restartBtn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

#restartBtn:hover {
    background: var(--accent-hover);
}
