/* ABOUTME: Styling for the hidden tic-tac-toe game modal
/* ABOUTME: Designed to match the site's dark theme and existing styling conventions */

.game-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: gameOverlayFadeIn 0.3s ease-out;
}

@keyframes gameOverlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.game-modal {
    background: linear-gradient(160deg, var(--c-surface) 0%, var(--c-surface-alt) 100%);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-glow);
    padding: 2rem;
    max-width: 400px;
    width: 90vw;
    color: var(--c-text);
    animation: gameModalSlideIn 0.4s ease-out;
}

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

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.game-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--c-text);
}

.game-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--c-text-soft);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.game-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--c-text);
}

.game-info {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--c-text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.circle-demo {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--c-accent);
    border-radius: 50%;
}

.cross-demo {
    font-size: 1.2rem;
    color: #ff6b6b;
    font-weight: bold;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 1.5rem;
    aspect-ratio: 1;
}

.game-cell {
    background: linear-gradient(135deg, var(--c-bg-alt), var(--c-surface));
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
    min-height: 80px;
}

.game-cell:hover {
    background: linear-gradient(135deg, var(--c-surface), var(--c-surface-alt));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.game-cell:active {
    transform: translateY(0);
}

.game-marker {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.circle-marker {
    width: 50px;
    height: 50px;
    border: 3px solid var(--c-accent);
    border-radius: 50%;
    animation: circleDrawIn 0.5s ease-out;
}

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

.cross-marker {
    font-size: 3rem;
    color: #ff6b6b;
    font-weight: bold;
    line-height: 1;
    animation: crossDrawIn 0.4s ease-out;
}

@keyframes crossDrawIn {
    from {
        transform: scale(0) rotate(-90deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.game-result {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    backdrop-filter: blur(4px);
}

.game-result-content {
    text-align: center;
    padding: 2rem;
}

.game-result-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--c-text);
}

.game-play-again {
    background: var(--gradient-accent);
    color: var(--c-bg);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.game-play-again:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.game-play-again:active {
    transform: translateY(0);
}

/* Game trigger styling */
.game-trigger {
    color: var(--c-text-soft);
    font-size: 0.8rem;
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.game-trigger:hover {
    opacity: 1;
    color: var(--c-accent-alt);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .game-modal {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .game-cell {
        min-height: 60px;
    }
    
    .circle-marker {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }
    
    .cross-marker {
        font-size: 2rem;
    }
    
    .game-result-text {
        font-size: 1.2rem;
    }
}