* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #FFA500 0%, #FF69B4 100%);
    color: #333;
    transition: background 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
}

body.dark-mode .container {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

h1 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFA500 0%, #FF69B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
} 

body.dark-mode h1 {
    background: linear-gradient(135deg, #FFA500 0%, #FF69B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
} 

.dark-mode-btn {
    padding: 10px 16px;
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid #FFA500;
    color: #FFA500;
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.dark-mode-btn:hover {
    background: #FFA500;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 165, 0, 0.3);
}

body.dark-mode .dark-mode-btn {
    background: rgba(255, 184, 0, 0.2);
    border-color: #ffb800;
    color: #ffb800;
}

body.dark-mode .dark-mode-btn:hover {
    background: #ffb800;
    color: #1e1e1e;
    box-shadow: 0 8px 16px rgba(255, 184, 0, 0.3);
}

.scoreboard-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
}

body.dark-mode .scoreboard-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.score-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

body.dark-mode .score-item {
    background: rgba(60, 60, 80, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .score-item:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.score-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

body.dark-mode .score-label {
    color: #aaa;
}

.score-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reset-form {
    grid-column: 1 / -1;
}

.reset-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.6);
}

.reset-btn:active {
    transform: translateY(0);
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    width: 100%;
}

body.dark-mode .board {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.cell {
    width: 100%;
    aspect-ratio: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    user-select: none;
}

.cell:hover:not(.filled) {
    background: #f5f5f5;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.cell:active:not(.filled) {
    transform: translateY(-2px);
}

.cell.filled {
    cursor: not-allowed;
}

.cell.ram.filled {
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE0B2 100%); /* light orange background */
    color: #FFA500; /* orange letter */
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.4);
}

.cell.vibha.filled {
    background: linear-gradient(135deg, #FFE5F7 0%, #FFCCE9 100%); /* light pink background */
    color: #FF69B4; /* pink letter */
    box-shadow: 0 8px 20px rgba(255, 20, 147, 0.4);
}

body.dark-mode .cell {
    background: rgba(60, 60, 80, 0.6);
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .cell:hover:not(.filled) {
    background: rgba(80, 80, 100, 0.8);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

body.dark-mode .cell.filled {
    background: linear-gradient(135deg, #00D4FF 0%, #00CED1 100%);
    color: #000;
    box-shadow: 0 8px 20px rgba(0, 206, 209, 0.5);
}

.status {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #667eea;
    min-height: 28px;
    transition: all 0.3s ease;
}

.status.celebrate {
    animation: pop 0.6s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

body.dark-mode .status {
    color: #764ba2;
}

@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
        gap: 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .scoreboard-card {
        padding: 12px;
    }

    .board {
        padding: 12px;
        grid-gap: 8px;
    }

    .cell {
        font-size: 2rem;
    }
}
