/* Copyright (c) 2024-2026. Jericho Crosby (Chalwk) */

.fatpoly-panel {
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.fatpoly-title {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.fatpoly-description {
    color: var(--gray);
}

.fatpoly-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(203, 213, 225, 0.1);
    border-radius: var(--radius);
}

.instructions-title {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.fatpoly-game-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

#gameCanvas:focus {
    outline: none;
}

#gameCanvas {
    display: block;
    background: var(--darker);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    user-select: none;
    -webkit-user-select: none;
}

.fatpoly-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(203, 213, 225, 0.1);
    border-radius: var(--radius);
}

.top-stats {
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
}

.stat-label {
    color: var(--primary);
}

.stat-value {
    font-family: var(--font-mono);
    font-weight: 600;
    margin-left: 0.5rem;
}

.stat-divider {
    color: var(--gray);
    margin: 0 0.5rem;
}

.fatpoly-health-bar {
    display: inline-block;
    width: 100px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-left: 0.5rem;
}

.bar {
    height: 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--success), var(--accent));
    transition: width 200ms linear;
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
    z-index: 60;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 28px;
    border-radius: 12px;
    min-width: 320px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.overlay h1 {
    font-size: 36px;
    margin: 6px 0 12px;
    color: var(--light);
}

.overlay p {
    opacity: 0.9;
    margin-bottom: 14px;
    color: var(--light);
}

@media (max-width: 768px) {
    #gameCanvas {
        width: 100%;
        height: 400px;
    }

    .fatpoly-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    #gameCanvas {
        height: 300px;
    }
}