/* Robin Hood Archery Game - Medieval Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a4d2e 0%, #2d5016 100%);
    color: #f5e6d3;
    min-height: 100vh;
    overflow-x: hidden;
}

.layout-wrapper {
    display: flex;
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
}

.ad-sidebar {
    flex: 0 0 160px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background: linear-gradient(135deg, #3d2817 0%, #5a4a3a 100%);
    padding: 2rem;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid #8b7355;
}

.header-content h1 {
    font-size: 3em;
    margin-bottom: 0.5rem;
    color: #f4d03f;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: 800;
}

.subtitle {
    font-size: 1.2em;
    color: #d4af37;
    opacity: 0.9;
}

/* Screens */
.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

/* Welcome Content */
.welcome-content {
    background: linear-gradient(135deg, #3d2817 0%, #5a4a3a 100%);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid #8b7355;
}

/* Title Screen */
.title-screen-content {
    background: linear-gradient(135deg, #3d2817 0%, #5a4a3a 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid #8b7355;
}

.title-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-title {
    font-size: 3em;
    color: #f4d03f;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
    font-weight: 900;
}

.game-subtitle {
    font-size: 1.3em;
    color: #d4af37;
    font-weight: 600;
}

#title-canvas {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    display: block;
    cursor: crosshair;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid #654321;
    background: linear-gradient(180deg, #87ceeb 0%, #b0d9f7 50%, #90d490 100%);
    margin-bottom: 1.5rem;
}

.title-instructions {
    text-align: center;
    margin-bottom: 1.5rem;
}

.instruction-text {
    font-size: 1.5em;
    color: #f4d03f;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.instruction-hint {
    font-size: 1em;
    color: #d4af37;
}

.game-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #8b7355;
    text-align: center;
    color: #f5e6d3;
    font-weight: 600;
    font-size: 0.95em;
}

.welcome-icon {
    font-size: 5em;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

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

.welcome-content h2 {
    font-size: 2.5em;
    margin-bottom: 1rem;
    color: #f4d03f;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.welcome-description {
    font-size: 1.2em;
    margin-bottom: 2rem;
    color: #d4af37;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #8b7355;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(244, 208, 63, 0.3);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 0.5rem;
}

.feature-card h4 {
    color: #f4d03f;
    margin-bottom: 0.5rem;
    font-size: 1.2em;
}

.feature-card p {
    color: #d4af37;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    padding: 1rem 3rem;
    font-size: 1.3em;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #3d2817;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(244, 208, 63, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Game Arena */
#game-arena {
    background: linear-gradient(180deg, #87ceeb 0%, #d4f1f9 50%, #8b7355 100%);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid #8b7355;
    position: relative;
    min-height: 600px;
}

/* HUD */
.arena-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(61, 40, 23, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    border: 2px solid #8b7355;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: #d4af37;
    font-size: 1.1em;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #f4d03f;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.timer-value {
    transition: color 0.3s ease;
    font-weight: 900;
}

.wind-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.wind-indicator.hidden {
    display: none;
}

.wind-label {
    font-weight: 600;
    color: #e0e0e0;
}

.wind-value {
    font-weight: bold;
    color: #fff;
    font-size: 1.2em;
}

/* Question */
.question-container {
    background: rgba(61, 40, 23, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    border: 2px solid #8b7355;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#question-text {
    color: #f5e6d3;
    font-size: 1.3em;
    text-align: center;
    line-height: 1.5;
}

/* Canvas */
#game-canvas {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    display: block;
    cursor: crosshair;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid #654321;
    background: #87ceeb;
}

/* Controls Hint */
.controls-hint {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(61, 40, 23, 0.8);
    border-radius: 10px;
    border: 2px solid #8b7355;
}

.controls-hint p {
    color: #f5e6d3;
    font-size: 1em;
}

.controls-hint strong {
    color: #f4d03f;
}

/* Final Stats */
.final-stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border: 2px solid #8b7355;
}

.final-stats h3 {
    font-size: 2.5em;
    color: #f4d03f;
    margin-bottom: 0.5rem;
}

.final-stats p {
    font-size: 1.3em;
    color: #d4af37;
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Notification */
.notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: 800;
    color: #f4d03f;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(244, 208, 63, 0.5);
    z-index: 1000;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2em;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    #game-canvas {
        height: 400px;
    }

    .arena-hud {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-group {
        justify-content: space-between;
    }
}
