/* Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif; /* Child-friendly font */
    background-color: #f0f9ff;
    background-image: url('../assets/images/cheerful wilderness background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    transition: all 0.8s ease; /* Slow transitions for autism support */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.game-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 900px;
    overflow: hidden;
    padding: 30px;
    position: relative;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

h1, h2, h3 {
    color: #2c78d4;
    text-align: center;
    margin-bottom: 20px;
}

.btn {
    background-color: #2c78d4;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #1d62b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Game Layout */
#intro-screen, #game-screen, #completion-screen {
    text-align: center;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 1; /* Ensure game content appears above the background */
}

.hidden {
    display: none;
}

/* Add some extra padding to enable scrolling */
body {
    padding: 30px 0;
    min-height: 110vh; /* Ensure there's room to scroll */
}

/* Remove the wilderness scene as it's now the page background */

/* Game content styling */
.game-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Draggable items styling */
.draggable-items {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.draggable-item {
    width: 150px;
    height: 150px;
    cursor: grab;
    transition: all 0.8s ease; /* Slow transitions for autism support */
    position: relative;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.draggable-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 8px;
}

.draggable-item:hover {
    transform: scale(1.05);
}

.draggable-item.correct {
    opacity: 0.6;
    cursor: default;
}

/* Creation box styling */
.creation-box {
    background: linear-gradient(45deg, #ffd700, #f5c71a);
    border: 5px dashed #e6be00;
    border-radius: 15px;
    padding: 25px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
    transition: all 0.8s ease; /* Slow transitions for autism support */
    position: relative;
    overflow: hidden;
}

.creation-box::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: 0;
}

.creation-box h3 {
    color: #8b6b00;
    margin-top: 0;
    font-size: 1.6em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
}

/* Feedback styling */
.feedback-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    min-height: 60px;
}

.feedback-message {
    font-size: 1.2em;
    padding: 10px;
    font-weight: bold;
    color: #333;
}

.feedback-message.correct {
    color: #4CAF50;
}

.feedback-message.incorrect {
    color: #f44336;
}

/* Accessibility styles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.instructions {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #555;
    background-color: #fff7e0;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #ffd700;
}

/* High contrast focus indicators for accessibility */
:focus {
    outline: 3px solid #2c78d4;
    outline-offset: 3px;
}

/* Celebration animation */
.celebration-animation {
    height: 300px;
    position: relative;
    margin: 20px 0;
    background-image: url('../assets/images/celebration.gif');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Drop target highlight */
.highlight {
    background-color: rgba(255, 215, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .draggable-items {
        gap: 15px;
    }
    
    .draggable-item {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .draggable-items {
        gap: 10px;
    }
    
    .draggable-item {
        width: 100px;
        height: 100px;
    }
}
