/* Game Container Styles */
.game-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Game Loading State */
.game-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #4a5568;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.125rem;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.loading-subtext {
    font-size: 0.875rem;
    color: #718096;
}

/* Game Error State */
.game-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    background: linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%);
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #f56565;
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.error-message {
    color: #fed7d7;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.retry-button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #c53030;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.game-controls .btn {
    min-width: 150px;
}

/* Fullscreen Styles */
.game-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    background: #000;
}

.game-wrapper.fullscreen .game-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
}

/* Game Instructions */
.game-instructions {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.game-instructions h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
}

.game-instructions li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.game-instructions li:before {
    content: "🎮";
    position: absolute;
    left: 0;
    top: 0;
}

/* Game Stats */
.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #718096;
    font-size: 0.875rem;
}

/* Responsive Game Styles */
@media (max-width: 768px) {
    .game-wrapper {
        height: 400px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-controls .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .game-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .game-wrapper {
        height: 300px;
    }
    
    .game-instructions {
        padding: 1rem;
    }
    
    .game-instructions h3 {
        font-size: 1.125rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}

/* Game Performance Indicators */
.game-performance {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 1000;
}

.fps-indicator {
    color: #48bb78;
}

.fps-indicator.low {
    color: #f56565;
}

/* Game Accessibility */
.game-wrapper:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Game Loading Animation */
.game-loading-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(45deg, #1a202c, #2d3748, #4a5568);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
