/* Feed Mama Duck Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 50%, #191970 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.game-nav {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #FFD700;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #FFD700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 25px;
}

.nav-link:hover, .nav-link.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Banner Section */
.game-banner {
    position: relative;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.banner-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.game-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #FFD700;
    text-shadow: 3px 3px 0px #8B0000, 0 0 30px rgba(255, 215, 0, 0.5);
    margin-bottom: 15px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 3px 3px 0px #8B0000, 0 0 30px rgba(255, 215, 0, 0.5); }
    100% { text-shadow: 3px 3px 0px #8B0000, 0 0 50px rgba(255, 215, 0, 0.8); }
}

.game-subtitle {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

/* Game Controls */
.game-controls {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px 0;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.game-controls .game-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Game Buttons */
.game-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B0000;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.game-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-btn.primary {
    background: linear-gradient(135deg, #32CD32, #228B22);
    color: white;
    animation: primaryPulse 3s ease-in-out infinite alternate;
}

@keyframes primaryPulse {
    0% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
    100% { box-shadow: 0 5px 15px rgba(50, 205, 50, 0.4), 0 0 20px rgba(50, 205, 50, 0.3); }
}

.game-btn.secondary {
    background: linear-gradient(135deg, #4682B4, #191970);
    color: white;
}

/* Game Canvas */
.game-area {
    padding: 40px 0;
}

/* Gameplay Layout - Stats on left, Canvas center, Energy on right */
.gameplay-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left Side Stats */
.left-stats {
    flex: 0 0 200px;
    display: flex;
    justify-content: flex-start;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.stat-value {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #FFD700;
    font-weight: bold;
    text-align: right;
}

/* Right Side Energy Meter */
.right-stats {
    flex: 0 0 80px;
    display: flex;
    justify-content: flex-end;
}

.energy-meter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.energy-meter label {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

.energy-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.energy-bar {
    width: 25px;
    height: 400px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.energy-fill {
    width: 100%;
    background: linear-gradient(to top, #FF4444, #FFAA00, #44FF44);
    height: 100%;
    border-radius: 15px;
    transition: height 0.3s ease, background 0.3s ease;
    animation: energyPulse 2s ease-in-out infinite alternate;
    position: absolute;
    bottom: 0;
}

@keyframes energyPulse {
    0% { box-shadow: 0 0 10px rgba(68, 255, 68, 0.5); }
    100% { box-shadow: 0 0 20px rgba(68, 255, 68, 0.8); }
}

.energy-fill.low {
    background: linear-gradient(to top, #FF4444, #FF6666);
    animation: energyWarning 1s ease-in-out infinite alternate;
}

@keyframes energyWarning {
    0% { box-shadow: 0 0 10px rgba(255, 68, 68, 0.5); }
    100% { box-shadow: 0 0 20px rgba(255, 68, 68, 1); }
}

.energy-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 400px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.energy-max {
    align-self: flex-start;
}

.energy-mid {
    align-self: center;
}

.energy-min {
    align-self: flex-end;
}

.game-container {
    position: relative;
    flex: 1;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #87CEEB, #4682B4);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(to bottom, #87CEEB 0%, #4682B4 50%, #2E8B57 100%);
    cursor: crosshair;
}

#gameCanvas.paused {
    filter: blur(2px) brightness(0.7);
}

/* Game Overlay */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

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

.overlay-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

#overlay-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 20px;
}

#overlay-message {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Game Instructions */
.game-instructions {
    background: rgba(0, 0, 0, 0.3);
    padding: 60px 0;
    backdrop-filter: blur(10px);
}

.instructions-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #FFD700;
    text-align: center;
    margin-bottom: 40px;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.instruction {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.instruction:hover {
    transform: translateY(-10px);
    border-color: #FFD700;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.instruction-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
}

.instruction h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 15px;
}

.instruction p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Game Modal */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.game-modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B0000;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: modalAppear 0.5s ease-out;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

@keyframes modalAppear {
    0% { 
        transform: scale(0.5);
        opacity: 0;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
}

.final-stats {
    background: rgba(139, 0, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(139, 0, 0, 0.2);
}

.stat-row:last-child {
    border-bottom: none;
}

.achievement {
    background: linear-gradient(135deg, #32CD32, #228B22);
    color: white;
    padding: 15px;
    border-radius: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
    animation: achievementGlow 2s ease-in-out infinite alternate;
}

@keyframes achievementGlow {
    0% { box-shadow: 0 0 10px rgba(50, 205, 50, 0.5); }
    100% { box-shadow: 0 0 20px rgba(50, 205, 50, 0.8); }
}

.achievement-icon {
    font-size: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
}

.sound-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: white;
    padding: 12px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sound-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

.sound-btn.muted {
    color: #FF6347;
    background: rgba(255, 99, 71, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav-links {
        margin-top: 15px;
        gap: 15px;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 8px 15px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-subtitle {
        font-size: 1.1rem;
    }
    
    .banner-overlay {
        padding: 20px;
    }
    
    .gameplay-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .left-stats, .right-stats {
        flex: none;
        width: 100%;
    }
    
    .left-stats {
        order: 1;
    }
    
    .game-container {
        order: 2;
        width: 100%;
        max-width: 500px;
    }
    
    .right-stats {
        order: 3;
    }
    
    .stat-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 10px 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .energy-meter {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    
    .energy-bar {
        height: 25px;
        width: 200px;
    }
    
    .energy-fill {
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, #FF4444, #FFAA00, #44FF44);
        left: 0;
        bottom: auto;
    }
    
    .energy-labels {
        height: auto;
        width: 200px;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 5px;
    }
    
    .game-container {
        margin: 0 10px;
    }
    
    #gameCanvas {
        height: 400px;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 30px;
        margin: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
    }
    
    .stat-group {
        gap: 10px;
    }
    
    .stat-item {
        min-width: 70px;
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .hunger-meter {
        max-width: 300px;
    }
    
    #gameCanvas {
        height: 300px;
    }
    
    .overlay-content {
        padding: 20px;
    }
    
    #overlay-title {
        font-size: 1.5rem;
    }
    
    #overlay-message {
        font-size: 1rem;
    }
}