* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;  /* Safari / iOS */
    -ms-user-select: none;      /* Old Edge */
    user-select: none;
}

html {
    height: 100%;
    overflow: hidden;
}

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --x-color: #818cf8;
    --o-color: #f472b6;
    --bg-dark: #0a0a0a;
    --bg-light: #111111;
    --card-bg: rgba(17, 17, 17, 0.95);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    height: 100vh;
    max-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(4px, min(2vh, 2vw), 20px);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    margin: 0;
}

/* Minimal dark background with white dots */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: -1;
    overflow: hidden;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

/* White dots container */
.dots-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Individual white dot */
.white-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0.4;
}

/* Shooting star container */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Shooting star animation for X (top-left to bottom-right) */
.shooting-star-x {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 1),
                0 0 16px rgba(129, 140, 248, 0.8),
                0 0 24px rgba(129, 140, 248, 0.6),
                0 0 32px rgba(129, 140, 248, 0.4);
    animation: shootStarX 2s linear forwards;
    opacity: 0;
    will-change: transform, opacity, filter;
}

/* Shooting star animation for O (top-right to bottom-left) */
.shooting-star-o {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 1),
                0 0 16px rgba(244, 114, 182, 0.8),
                0 0 24px rgba(244, 114, 182, 0.6),
                0 0 32px rgba(244, 114, 182, 0.4);
    animation: shootStarO 2s linear forwards;
    opacity: 0;
    will-change: transform, opacity, filter;
}

@keyframes shootStarX {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        filter: brightness(1);
    }
    20% {
        opacity: 1;
        transform: translate(100px, 100px) scale(1.6);
        filter: brightness(1.2);
    }
    30% {
        opacity: 1;
        transform: translate(150px, 150px) scale(2);
        filter: brightness(1);
    }
    60% {
        opacity: 0.8;
        transform: translate(300px, 300px) scale(1.3);
        filter: brightness(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(500px, 500px) scale(0);
        filter: brightness(0);
    }
}

@keyframes shootStarO {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        filter: brightness(1);
    }
    20% {
        opacity: 1;
        transform: translate(-100px, 100px) scale(1.6);
        filter: brightness(1.2);
    }
    30% {
        opacity: 1;
        transform: translate(-150px, 150px) scale(2);
        filter: brightness(1);
    }
    60% {
        opacity: 0.8;
        transform: translate(-300px, 300px) scale(1.3);
        filter: brightness(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-500px, 500px) scale(0);
        filter: brightness(0);
    }
}

/* Burst effect */
.star-burst {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    animation: burstAnimation 0.6s ease-out forwards;
}

@keyframes burstAnimation {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(2);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: clamp(16px, min(3vw, 3vh), 32px);
    padding: clamp(12px, min(3vh, 4vw), 48px) clamp(12px, min(3vw, 4vh), 40px);
    box-shadow: var(--shadow-xl);
    max-width: min(560px, min(95vw, calc(95vh * 1.2)));
    max-height: min(95vh, calc(95vw * 1.1));
    width: 100%;
    text-align: center;
    position: relative;
    animation: slideUp 0.6s ease-out;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    z-index: 1;
}

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

header {
    margin-bottom: clamp(8px, min(2vh, 2vw), 24px);
    flex-shrink: 0;
}

.logo {
    margin-bottom: clamp(4px, min(1vh, 1vw), 12px);
    display: inline-block;
    animation: rotateIn 0.8s ease-out;
}

.logo svg {
    width: clamp(28px, min(5vw, 5vh), 40px);
    height: clamp(28px, min(5vw, 5vh), 40px);
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

header h1 {
    font-size: clamp(1.5rem, min(5vw, 5vh), 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: clamp(2px, min(0.5vh, 0.5vw), 8px);
    letter-spacing: -1px;
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(0.65rem, min(2vw, 2vh), 0.95rem);
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.game-info {
    margin-bottom: clamp(8px, min(2vh, 2vw), 20px);
    flex-shrink: 0;
}

.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, min(1.5vw, 1.5vh), 12px);
    margin-bottom: clamp(8px, min(2vh, 2vw), 16px);
    padding: clamp(8px, min(1.5vh, 2vw), 14px) clamp(10px, min(3vw, 2vh), 20px);
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(10px, min(2vw, 2vh), 16px);
    border: 1px solid var(--card-border);
}

.status-indicator {
    width: clamp(8px, min(1.5vw, 1.5vh), 12px);
    height: clamp(8px, min(1.5vw, 1.5vh), 12px);
    border-radius: 50%;
    background: var(--x-color);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.5);
    flex-shrink: 0;
}

.status-indicator.active-o {
    background: var(--o-color);
    box-shadow: 0 0 0 0 rgba(244, 114, 182, 0.5);
}

.status {
    font-size: clamp(0.85rem, min(2.5vw, 2.5vh), 1.2rem);
    font-weight: 600;
    color: var(--text-primary);
    min-height: clamp(20px, min(3vh, 3vw), 32px);
    transition: all 0.3s ease;
    line-height: 1.3;
}

.status.winner {
    color: var(--x-color);
    font-weight: 600;
    font-size: clamp(0.95rem, min(3vw, 3vh), 1.4rem);
}

.status.draw {
    color: var(--text-muted);
    font-weight: 500;
}

.scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(6px, min(2vw, 2vh), 12px);
}

.score-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(10px, min(2.5vw, 2.5vh), 16px);
    padding: clamp(8px, min(2vh, 2vw), 14px) clamp(10px, min(2vw, 2vh), 16px);
    display: flex;
    align-items: center;
    gap: clamp(6px, min(2vw, 2vh), 12px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--x-color);
    transition: width 0.3s ease;
    opacity: 0.6;
}

.score-card.score-x::before {
    background: var(--x-color);
}

.score-card.score-o::before {
    background: var(--o-color);
}

.score-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.score-icon {
    font-size: clamp(1.1rem, min(3.5vw, 3.5vh), 1.75rem);
    font-weight: 700;
    width: clamp(28px, min(8vw, 8vh), 40px);
    height: clamp(28px, min(8vw, 8vh), 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: clamp(6px, min(1.5vw, 1.5vh), 10px);
    flex-shrink: 0;
}

.score-x .score-icon {
    color: var(--x-color);
    background: rgba(129, 140, 248, 0.1);
}

.score-o .score-icon {
    color: var(--o-color);
    background: rgba(244, 114, 182, 0.1);
}

.score-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(2px, min(0.5vh, 0.5vw), 4px);
    flex: 1;
}

.score-label {
    font-weight: 400;
    color: var(--text-muted);
    font-size: clamp(0.6rem, min(1.8vw, 1.8vh), 0.8rem);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value {
    font-size: clamp(1.1rem, min(4vw, 4vh), 1.75rem);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.board-wrapper {
    margin-bottom: clamp(8px, min(2vh, 2vw), 20px);
    padding: clamp(3px, min(1vw, 1vh), 6px);
    background: rgba(255, 255, 255, 0.02);
    border-radius: clamp(12px, min(3vw, 3vh), 20px);
    border: 1px solid var(--card-border);
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    position: relative;
    /* Make wrapper square to ensure board fits */
    aspect-ratio: 1;
    max-width: min(100%, calc(100vh - 200px));
    max-height: min(100%, calc(100vw - 100px));
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(4px, min(1.5vw, 1.5vh), 12px);
    background: transparent;
    padding: 0;
    border-radius: 0;
    /* Board fits within square wrapper */
    width: 100%;
    height: 100%;
    max-width: min(400px, min(70vw, calc(70vh * 0.9)));
    max-height: min(400px, min(70vh, calc(70vw * 0.9)));
    aspect-ratio: 1;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(8px, min(2vw, 2vh), 14px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, min(6vw, 6vh), 3.5rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    max-width: 100%;
    max-height: 100%;
}

.cell:active {
    transform: scale(0.92);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.08);
}

.cell.tapped {
    animation: cellTap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cellTap {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.92);
    }
    100% {
        transform: scale(1);
    }
}

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

.cell:hover::before {
    width: 100%;
    height: 100%;
}

.cell:hover:not(.filled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.cell.filled {
    cursor: not-allowed;
}

.cell.filled::before {
    display: none;
}

.cell.x {
    color: var(--x-color);
}

.cell.o {
    color: var(--o-color);
}

.cell.winning {
    animation: winCelebration 0.8s ease;
    background: rgba(129, 140, 248, 0.15);
    color: var(--x-color);
    box-shadow: 0 8px 24px rgba(129, 140, 248, 0.3);
    border-color: var(--x-color);
}

@keyframes winCelebration {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.cell.place-animation {
    animation: placeMark 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes placeMark {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Setup Modal */
.setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.setup-overlay.hidden {
    display: none;
}

.setup-modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
}

.setup-modal h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setup-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-row label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.setup-row input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
}

.setup-row input[type="text"]::placeholder {
    color: var(--text-muted);
}

.setup-row input[type="text"]:focus {
    outline: none;
    border-color: var(--x-color);
}

.symbol-choice {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.game-mode-choice {
    width: 100%;
}

.game-mode-option {
    flex: 1;
}

.symbol-option {
    cursor: pointer;
}

.symbol-option input {
    display: none;
}

.symbol-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--card-border);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.game-mode-btn {
    width: 100%;
    min-height: 48px;
    height: auto;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    border-width: 1px;
}

.symbol-option input[value="X"]:checked + .symbol-btn {
    border-color: var(--x-color);
    color: var(--x-color);
    background: rgba(129, 140, 248, 0.1);
}

.symbol-option input[value="O"]:checked + .symbol-btn {
    border-color: var(--o-color);
    color: var(--o-color);
    background: rgba(244, 114, 182, 0.1);
}

.symbol-option:hover .symbol-btn {
    border-color: rgba(255, 255, 255, 0.2);
}

.symbol-option input[value="custom"]:checked + .symbol-btn {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.symbol-option input[name="gameMode"][value="human"]:checked + .game-mode-btn,
.symbol-option input[name="gameMode"][value="computer"]:checked + .game-mode-btn {
    border-color: rgba(129, 140, 248, 0.5);
    color: var(--text-primary);
    background: rgba(129, 140, 248, 0.12);
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.15) inset;
}

.custom-symbol-input {
    margin-top: 8px;
    max-width: 140px;
}

.setup-error {
    color: #f472b6;
    font-size: 0.85rem;
    padding: 8px 0;
}

.symbol-assigned {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 8px;
}

.start-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.start-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Game buttons */
.game-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.change-players-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    padding: clamp(10px, min(2vh, 2vw), 14px) clamp(16px, min(4vw, 4vh), 24px);
    font-size: clamp(0.75rem, min(2vw, 2vh), 0.9rem);
    font-weight: 500;
    border-radius: clamp(10px, min(2vw, 2vh), 14px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-players-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    padding: clamp(10px, min(2vh, 2vw), 14px) clamp(20px, min(5vw, 5vh), 32px);
    font-size: clamp(0.8rem, min(2.2vw, 2.2vh), 1rem);
    font-weight: 500;
    border-radius: clamp(10px, min(2vw, 2vh), 14px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: clamp(5px, min(1.5vw, 1.5vh), 8px);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
}

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

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

.reset-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

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

.btn-icon {
    font-size: clamp(0.9rem, min(2.5vw, 2.5vh), 1.15rem);
    display: inline-block;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.reset-btn:hover .btn-icon {
    transform: rotate(180deg);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Responsive design for very small screens */
@media (max-width: 480px) {
    body {
        padding: clamp(2px, min(1vh, 1vw), 4px);
    }

    .container {
        max-height: 100vh;
        padding: clamp(10px, min(2vh, 3vw), 16px) clamp(10px, min(3vw, 2vh), 16px);
    }

    .score-card {
        flex-direction: column;
        gap: clamp(4px, min(1vh, 1vw), 6px);
        padding: clamp(6px, min(1.5vh, 1.5vw), 10px);
    }

    .score-content {
        align-items: center;
    }

    .board-wrapper {
        padding: clamp(2px, min(1vh, 1vw), 4px);
        /* At small screens, ensure wrapper maintains square aspect ratio */
        aspect-ratio: 1;
        max-width: 100%;
        max-height: 100%;
    }

    .board {
        gap: clamp(4px, min(1.5vw, 1.5vh), 6px);
        /* Board fits within square wrapper */
        width: 100%;
        height: 100%;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    header {
        margin-bottom: clamp(2px, min(1vh, 1vw), 8px);
    }

    .logo {
        margin-bottom: clamp(1px, min(0.5vh, 0.5vw), 2px);
    }

    header h1 {
        font-size: clamp(1.25rem, min(4vh, 4vw), 2rem);
        margin-bottom: clamp(1px, min(0.5vh, 0.5vw), 2px);
    }

    .subtitle {
        font-size: clamp(0.6rem, min(1.5vh, 1.5vw), 0.7rem);
    }

    .game-info {
        margin-bottom: clamp(4px, min(1vh, 1vw), 10px);
    }

    .status-container {
        margin-bottom: clamp(2px, min(1vh, 1vw), 8px);
        padding: clamp(4px, min(1vh, 1.5vw), 10px) clamp(8px, min(2vw, 1.5vh), 16px);
    }

    .board-wrapper {
        margin-bottom: clamp(4px, min(1vh, 1vw), 10px);
    }

    .score-card {
        padding: clamp(4px, min(1vh, 1vw), 10px) clamp(6px, min(2vw, 1.5vh), 12px);
    }
}

/* Pulse animation for status indicator */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(129, 140, 248, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(129, 140, 248, 0);
    }
}

.shooting-stars,
.white-dot,
.cell {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}