/* Simple Game UI - Alyssa's Adventure */

:root {
    --primary-color: #6366f1;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --font-family-display: Georgia, 'Times New Roman', Times, serif;
    --font-family-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-body);
    background: var(--background-gradient);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.game-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

/* Simple Header */
.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-title {
    font-family: var(--font-family-display);
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Game Canvas */
.game-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.canvas-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.game-canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: calc(var(--border-radius) - 6px);
    overflow: hidden;
    background: #f8fafc;
    min-height: 400px;
}

/* Game Canvas Enhancements */
canvas {
    border-radius: calc(var(--border-radius) - 6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    max-width: 100%;
    height: auto;
    touch-action: manipulation; /* Prevents zoom on double tap */
    user-select: none; /* Prevents text selection */
}

canvas:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .canvas-container {
        padding: 0.5rem;
        margin: 0;
        width: 100%;
        max-width: 100vw;
    }
    
    .game-container {
        padding: 0.5rem 0.25rem;
    }
    
    .game-canvas {
        min-height: auto;
    }
    
    /* Scale down canvas on mobile while keeping game logic intact */
    canvas {
        width: 100% !important;
        height: auto !important;
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 576px) {
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-header {
        margin-bottom: 1rem;
    }
    
    .canvas-container {
        padding: 0.25rem;
        border-radius: 8px;
    }
    
    .game-canvas {
        border-radius: 4px;
    }
    
    /* Smaller mobile devices */
    canvas {
        max-width: calc(100vw - 1rem);
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-title,
.canvas-container {
    animation: fadeIn 0.8s ease-out;
}

.canvas-container {
    animation-delay: 0.2s;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}