/* ============================================
   GAME PLAYER STYLES - Pixel Art Retro
   ============================================ */

/* Game Section */
.game-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
}

/* Game Player Container */
.game-player {
    position: relative;
    background: #000;
    border: 4px solid var(--accent-primary);
    box-shadow: 
        8px 8px 0 0 #000,
        0 0 0 4px var(--bg-secondary);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
}

#unity-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background: 
        linear-gradient(180deg, #1a0a2e 0%, #0a1a3e 50%, #0f1a30 100%);
    overflow: hidden !important;
}

/* Unity Canvas */
#unity-canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    image-rendering: pixelated;
}

/* ============================================
   PLAY OVERLAY - Pixel Art Style
   ============================================ */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.2s steps(3);
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-overlay-bg {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.3) 2px,
            rgba(0, 0, 0, 0.3) 4px
        ),
        linear-gradient(
            180deg,
            rgba(10, 10, 18, 0.9) 0%,
            rgba(26, 10, 46, 0.85) 50%,
            rgba(10, 26, 62, 0.9) 100%
        );
}

.play-overlay-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

/* Play Button - Pixel Style */
.play-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--accent-primary);
    border: 4px solid var(--text-primary);
    box-shadow: 
        6px 6px 0 0 #000,
        inset -4px -4px 0 0 #006b1a,
        inset 4px 4px 0 0 #50ff7d;
    color: #000;
    transition: all 0.1s steps(2);
    animation: pixelPulse 1s steps(4) infinite;
}

.play-btn svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
    filter: drop-shadow(2px 2px 0 #006b1a);
}

.play-btn-ring {
    position: absolute;
    inset: -12px;
    border: 4px solid var(--accent-primary);
    animation: pixelRingPulse 1s steps(4) infinite;
}

.play-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 
        8px 8px 0 0 #000,
        inset -4px -4px 0 0 #006b1a,
        inset 4px 4px 0 0 #50ff7d;
}

.play-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 
        2px 2px 0 0 #000,
        inset -4px -4px 0 0 #006b1a,
        inset 4px 4px 0 0 #50ff7d;
}

.play-text {
    font-size: 10px;
    font-weight: 400;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 0 #000;
    animation: textBlink 0.5s steps(1) infinite;
}

@keyframes pixelPulse {
    0%, 100% {
        box-shadow: 
            6px 6px 0 0 #000,
            inset -4px -4px 0 0 #006b1a,
            inset 4px 4px 0 0 #50ff7d;
    }
    50% {
        box-shadow: 
            6px 6px 0 0 #000,
            inset -4px -4px 0 0 #006b1a,
            inset 4px 4px 0 0 #50ff7d,
            0 0 0 4px rgba(0, 228, 54, 0.3);
    }
}

@keyframes pixelRingPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes textBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   LOADING BAR - Pixel Style
   ============================================ */
#unity-loading-bar {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.2) 2px,
            rgba(0, 0, 0, 0.2) 4px
        ),
        linear-gradient(180deg, #0a0a12 0%, #1a0a2e 100%);
    z-index: 15;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.loading-logo {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    animation: pixelFloat 0.5s steps(4) infinite;
}

.loading-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 2px 0 #006b1a);
}

@keyframes pixelFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.loading-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    text-shadow: 2px 2px 0 #000;
}

.loading-progress {
    width: 200px;
    height: 16px;
    background: var(--bg-primary);
    border: 3px solid var(--text-primary);
    box-shadow: var(--pixel-shadow-sm);
    overflow: hidden;
    padding: 2px;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        90deg,
        #00e436 0px,
        #00e436 8px,
        #50ff7d 8px,
        #50ff7d 16px
    );
    transition: width 0.1s steps(10);
}

.loading-text {
    font-size: 8px;
    color: var(--accent-cyan);
    animation: textBlink 0.3s steps(1) infinite;
}

/* ============================================
   WARNING MESSAGES
   ============================================ */
#unity-warning {
    position: absolute;
    top: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: none;
    flex-direction: column;
    gap: var(--spacing-xs);
    max-width: 90%;
}

.warning-message {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-primary);
    border: 3px solid var(--accent-yellow);
    box-shadow: var(--pixel-shadow-sm);
    font-size: 8px;
    color: var(--text-primary);
}

.warning-message.error {
    border-color: var(--error);
    background: #3d0000;
}

.warning-message.warning {
    border-color: var(--warning);
    background: #3d3d00;
}

/* ============================================
   UNITY FOOTER CONTROLS
   ============================================ */
#unity-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    z-index: 8;
}

.unity-footer-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.game-title {
    font-size: 8px;
    font-weight: 400;
    color: var(--accent-yellow);
    text-shadow: 1px 1px 0 #000;
}

.unity-footer-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: white;
    border: 2px solid var(--text-secondary);
    background: var(--bg-elevated);
    transition: all var(--transition-fast);
}

.fullscreen-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: var(--bg-hover);
}

.fullscreen-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   GAME INFO BAR
   ============================================ */
.game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 3px solid var(--border-light);
    box-shadow: var(--pixel-shadow-sm);
}

.game-info-left {
    flex: 1;
    min-width: 0;
}

.game-title-main {
    font-size: 12px;
    font-weight: 400;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 4px;
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-xs);
}

.game-badge {
    padding: 4px 8px;
    background: var(--bg-elevated);
    border: 2px solid var(--accent-cyan);
    font-size: 6px;
    font-weight: 400;
    color: var(--accent-cyan);
    text-shadow: 1px 1px 0 #000;
}

.game-badge:nth-child(2) {
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

.game-badge:nth-child(3) {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.game-info-right {
    display: flex;
    align-items: center;
}

.btn-fullscreen-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 8px 12px;
    background: var(--accent-cyan);
    border: 3px solid var(--text-primary);
    box-shadow: var(--pixel-shadow-sm);
    font-size: 8px;
    font-weight: 400;
    color: #000;
    text-shadow: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-fullscreen-link svg {
    width: 12px;
    height: 12px;
}

.btn-fullscreen-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #000;
}

.btn-fullscreen-link:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 #000;
}

/* ============================================
   GAME DESCRIPTION
   ============================================ */
.game-description {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 3px solid var(--border-light);
    box-shadow: var(--pixel-shadow-sm);
}

.game-description p {
    font-size: 8px;
    color: var(--text-secondary);
    line-height: 2;
    margin: 0;
}

.game-description strong {
    color: var(--accent-primary);
    text-shadow: 1px 1px 0 #7e0026;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 540px) {
    .game-player {
        border-width: 3px;
        box-shadow: 4px 4px 0 0 #000;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }
    
    .play-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .play-btn-ring {
        inset: -8px;
        border-width: 3px;
    }
    
    .play-text {
        font-size: 8px;
    }
    
    .game-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-info-right {
        width: 100%;
    }
    
    .btn-fullscreen-link {
        width: 100%;
        justify-content: center;
    }
    
    .loading-progress {
        width: 160px;
    }
    
    .game-title-main {
        font-size: 10px;
    }
    
    .game-description {
        padding: var(--spacing-sm);
    }
    
    .game-description p {
        font-size: 7px;
    }
}
