/* Blink & Bloom - Pixel Art Garden Game Styles */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    background: linear-gradient(180deg, #A8D5E2 0%, #F0EBD8 100%);
    min-height: 100vh;
    width: 100vw;
    color: #7A5840;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Screen Management */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.screen.hidden {
    display: none;
}

/* Main Menu Styles */
#main-menu {
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background-image: url('./assets/backgrounds/main_menu_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.menu-panel {
    background: rgba(216, 197, 160, 0.95);
    border: 4px solid #BCA37F;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 8px 8px 0px #8C6A89;
    text-align: center;
    max-width: 500px;
    backdrop-filter: blur(2px);
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.game-logo {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.game-logo-full {
    height: 200px;
    image-rendering: pixelated;
    max-width: 400px;
}

.menu-panel h1 {
    font-size: 24px;
    color: #6B8F71;
    text-shadow: 2px 2px 0px #F0EBD8;
    margin: 0;
}

.header-logo {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    margin-right: 8px;
}

.header-logo-full {
    height: 62px;
    /* image-rendering: pixelated; */
    max-width: 400px;
}

.subtitle {
    font-size: 10px;
    color: #7A5840;
    margin-bottom: 24px;
    opacity: 0.8;
}

.menu-description {
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
}

.menu-description p {
    margin: 4px 0;
    font-size: 8px;
    line-height: 1.4;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.menu-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 12px 24px;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    background: #F0EBD8;
    color: #7A5840;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px #8C6A89;
}

.menu-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #8C6A89;
    background: #EAC8CA;
}

.menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #8C6A89;
}

.menu-btn.primary {
    background: #6B8F71;
    color: #F0EBD8;
    border-color: #7A5840;
}

.menu-btn.primary:hover {
    background: #7FBF7F;
}

.health-info {
    background: rgba(166, 200, 226, 0.4);
    border: 2px solid #6b8f71;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    font-size: 9px;
    line-height: 1.4;
}

.health-info p {
    margin: 4px 0;
}

.health-info strong {
    color: #6B8F71;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(122, 88, 64, 0.8), rgba(107, 143, 113, 0.8)),
        url('assets/backgrounds/main_menu_background.png');
    background-size: auto, cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #D8C5A0;
    border: 4px solid #BCA37F;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 8px 8px 0px #8C6A89;
    text-align: center;
    max-width: 500px;
}

.modal-content h2 {
    font-size: 16px;
    color: #6B8F71;
    margin-bottom: 16px;
}

.modal-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

/* Symphony Results Modal */
#symphony-final-stats {
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.symphony-stat {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 10px;
}

.stat-label {
    color: #7A5840;
}

.stat-value {
    color: #6B8F71;
    font-weight: bold;
}

.symphony-rating {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #EAC8CA;
    border: 2px solid #A6C8E2;
    border-radius: 6px;
}

#performance-rating {
    font-size: 11px;
    color: #6B8F71;
    font-weight: bold;
}

/* Debug Panel Styles */
#debug-panels {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: #D8C5A0;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 20px;
    font-size: 8px;
    max-width: 350px;
    z-index: 999;
    box-shadow: 4px 4px 0px #8C6A89;
    color: #7A5840;
}

#debug-panels.hidden {
    display: none;
}

#debug-panels h4 {
    color: #6B8F71;
    margin-bottom: 12px;
    font-size: 9px;
}

#debug-panels button {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 8px 12px;
    margin: 4px 8px 4px 0;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    background: #F0EBD8;
    color: #7A5840;
    cursor: pointer;
}

#debug-panels button:hover {
    background: #EAC8CA;
}

.close-button {
    position: absolute;
    top: 16px;
    right: 8px;
    background: #8C6A89 !important;
    color: #F0EBD8 !important;
    padding: 4px 8px !important;
    font-size: 8px !important;
    border-radius: 4px !important;
}

.close-button:hover {
    background: #7A5840 !important;
}

#camera-controls {
    margin: 16px 0;
    padding: 12px;
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 6px;
}

#camera-controls > div {
    margin: 8px 0;
}

#camera-controls label {
    display: inline-block;
    margin-right: 12px;
    font-size: 8px;
    min-width: 80px;
}

#camera-select {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 4px 4px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    background: #F0EBD8;
    color: #7A5840;
    margin-right: 8px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#camera-status {
    font-size: 9px;
    color: #6B8F71;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(107, 143, 113, 0.1);
    border-radius: 4px;
}

#camera-diagnostics {
    font-size: 6px;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-family: monospace;
}

#audio-controls {
    margin: 16px 0;
    padding: 12px;
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 6px;
}

#audio-controls > div {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#audio-controls label {
    font-size: 8px;
    min-width: 80px;
    color: #7A5840;
}

#audio-controls input[type="range"] {
    flex: 1;
    max-width: 120px;
    height: 16px;
    background: #BCA37F;
    border-radius: 8px;
    outline: none;
    -webkit-appearance: none;
}

#audio-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #6B8F71;
    border-radius: 50%;
    cursor: pointer;
}

#audio-controls input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #6B8F71;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#audio-controls span {
    font-size: 8px;
    color: #6B8F71;
    min-width: 35px;
    text-align: right;
}

#gaze-info {
    margin: 16px 0;
    padding: 12px;
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 6px;
}

#gaze-debug {
    font-size: 6px;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
}

/* === WIND DIRECTION SYSTEM STYLES === */

/* Wind Warning Overlay */
.wind-warning {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 235, 200, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    animation: windWarningPulse 1s ease-in-out infinite alternate;
}

.wind-warning-content {
    text-align: center;
    color: #7A5840;
}

.wind-direction-arrow {
    font-size: 32px;
    margin-bottom: 8px;
    animation: arrowBounce 0.8s ease-in-out infinite alternate;
}

.wind-warning-text {
    font-size: 10px;
    margin-bottom: 4px;
    font-weight: bold;
}

.wind-instruction {
    font-size: 8px;
    opacity: 0.8;
}

@keyframes windWarningPulse {
    0% { background: rgba(255, 235, 200, 0.7); }
    100% { background: rgba(255, 235, 200, 0.9); }
}

@keyframes arrowBounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

/* Active Wind Effects */
.wind-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 40;
    background: linear-gradient(transparent 0%, rgba(200, 220, 240, 0.3) 50%, transparent 100%);
}

/* Directional Wind Styles */
.wind-north {
    background: linear-gradient(0deg, transparent 0%, rgba(166, 200, 226, 0.4) 30%, rgba(166, 200, 226, 0.1) 100%);
    animation: windNorth 2s ease-in-out infinite;
}

.wind-south {
    background: linear-gradient(180deg, transparent 0%, rgba(166, 200, 226, 0.4) 30%, rgba(166, 200, 226, 0.1) 100%);
    animation: windSouth 2s ease-in-out infinite;
}

.wind-east {
    background: linear-gradient(90deg, transparent 0%, rgba(166, 200, 226, 0.4) 30%, rgba(166, 200, 226, 0.1) 100%);
    animation: windEast 2s ease-in-out infinite;
}

.wind-west {
    background: linear-gradient(270deg, transparent 0%, rgba(166, 200, 226, 0.4) 30%, rgba(166, 200, 226, 0.1) 100%);
    animation: windWest 2s ease-in-out infinite;
}

/* Wind animations */
@keyframes windNorth {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes windSouth {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes windEast {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes windWest {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Alignment Feedback */
.wind-effect.aligned {
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(127, 191, 127, 0.5) 30%, 
        rgba(127, 191, 127, 0.2) 100%);
    animation: alignedGlow 1s ease-in-out infinite alternate;
}

.wind-effect.misaligned {
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(191, 127, 127, 0.4) 30%, 
        rgba(191, 127, 127, 0.1) 100%);
}

@keyframes alignedGlow {
    0% { filter: brightness(1.0); }
    100% { filter: brightness(1.3); }
}

/* Plant Swaying Effects */
.plant-slot.sway-north .plant-sprite {
    animation: swayNorth 1.5s ease-in-out infinite;
}

.plant-slot.sway-south .plant-sprite {
    animation: swaySouth 1.5s ease-in-out infinite;
}

.plant-slot.sway-east .plant-sprite {
    animation: swayEast 1.5s ease-in-out infinite;
}

.plant-slot.sway-west .plant-sprite {
    animation: swayWest 1.5s ease-in-out infinite;
}

/* Swaying animations for plants */
@keyframes swayNorth {
    0%, 100% { transform: rotate(0deg) translateY(0px); }
    50% { transform: rotate(-2deg) translateY(-1px); }
}

@keyframes swaySouth {
    0%, 100% { transform: rotate(0deg) translateY(0px); }
    50% { transform: rotate(2deg) translateY(1px); }
}

@keyframes swayEast {
    0%, 100% { transform: rotate(0deg) translateX(0px); }
    50% { transform: rotate(2deg) translateX(1px); }
}

@keyframes swayWest {
    0%, 100% { transform: rotate(0deg) translateX(0px); }
    50% { transform: rotate(-2deg) translateX(-1px); }
}

/* Wind Success Effect */
.wind-success-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFD700;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    animation: successPop 2s ease-out forwards;
    pointer-events: none;
    z-index: 70;
    text-shadow: 2px 2px 0px #7A5840;
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* === MOLE GUIDE SYSTEM === */

/* Mole character in main menu */
.mole-menu-character {
    position: absolute;
    bottom: 20px;
    left: 20px;
    text-align: center;
    z-index: 100;
}

.mole-menu-image {
    width: 100px;
    height: 100px;
    image-rendering: pixelated;
    margin-bottom: 8px;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
    animation: moleMenuIdle 3s ease-in-out infinite alternate;
}

@keyframes moleMenuIdle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-5px); }
}

.mole-menu-speech {
    background: #F0EBD8;
    border: 3px solid #BCA37F;
    border-radius: 16px;
    padding: 12px 16px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #7A5840;
    min-width: 300px;
    max-width: 480px;
    position: absolute;
    bottom: 20px;
    left: 120px;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.4;
}

.mole-menu-speech::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #BCA37F;
}

.mole-menu-speech::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #F0EBD8;
}

.mole-speech-buttons {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mole-btn {
    background: #6B8F71;
    border: 2px solid #4E7C23;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mole-btn:hover {
    background: #7FBF7F;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

.mole-btn:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Mole character in minigame */
.mole-minigame-character {
    position: absolute;
    bottom: 20px;
    left: 20px;
    text-align: left;
    z-index: 100;
    pointer-events: none;
}

.mole-minigame-image {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    margin-bottom: 8px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
    animation: moleMinigameIdle 4s ease-in-out infinite alternate;
}

@keyframes moleMinigameIdle {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-3px) scale(1.05); }
}

.mole-minigame-speech {
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #7A5840;
    min-width: 300px;
    max-width: 480px;
    position: absolute;
    left: 100px;
    bottom: 20px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.mole-minigame-speech::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #BCA37F;
}

.mole-minigame-speech::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 32px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #F0EBD8;
}

/* In-game mole guide */
.mole-guide-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 200;
    pointer-events: all;
}

.mole-character {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.mole-image {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.mole-image:hover {
    transform: scale(1.1);
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.5));
}

.mole-image.talking {
    animation: moleTalk 0.5s ease-in-out infinite alternate;
}

@keyframes moleTalk {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-3px); }
}

.mole-speech-bubble {
    position: absolute;
    bottom: 85px;
    left: 0;
    min-width: 280px;
    max-width: 320px;
    background: #F0EBD8;
    border: 3px solid #BCA37F;
    border-radius: 12px;
    padding: 0;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: all;
}

.mole-speech-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

.mole-speech-bubble.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.speech-content {
    padding: 12px 16px;
    position: relative;
}

.speech-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    line-height: 1.4;
    color: #7A5840;
    margin: 0;
    word-wrap: break-word;
}

.speech-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    background: #EAC8CA;
    color: #7A5840;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.speech-close:hover {
    background: #D8A8AA;
}

.speech-tail {
    position: absolute;
    bottom: -12px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid #BCA37F;
}

.speech-tail::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: -9px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #F0EBD8;
}

/* Responsive Design */
@media (max-width: 900px) {
    #main-game-area {
        flex-direction: column;
    }
    
    #game-sidebar {
        width: 100%;
        flex-direction: row;
        gap: 8px;
    }
    
    #controls-panel, #info-panel, #tips-panel {
        flex: 1;
    }
    
    #camera-container {
        position: relative;
        bottom: auto;
        right: auto;
        width: 160px;
        height: 120px;
        margin: 16px auto 0;
    }
    
    .mole-guide-container {
        bottom: 10px;
        left: 10px;
    }
    
    .mole-image {
        width: 64px;
        height: 64px;
    }
    
    .mole-speech-bubble {
        min-width: 240px;
        max-width: 280px;
        bottom: 70px;
    }
    
    .speech-text {
        font-size: 9px;
    }
    
    .mole-menu-character {
        bottom: 10px;
        left: 10px;
    }
    
    .mole-menu-image {
        width: 80px;
        height: 80px;
    }
    
    .mole-menu-speech {
        font-size: 7px;
        max-width: 160px;
        left: 100px;
        bottom: 10px;
    }
    
    .mole-minigame-character {
        bottom: 10px;
        left: 10px;
    }
    
    .mole-minigame-image {
        width: 64px;
        height: 64px;
    }
    
    .mole-minigame-speech {
        font-size: 6px;
        max-width: 140px;
    }
}

/* Mini-Game Styles */
#mini-game-screen {
    background-image: url('assets/backgrounds/minigame_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 40px;
    min-height: 100vh;
}

.mini-game-panel {
    background: #D8C5A0;
    border: 4px solid #BCA37F;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 8px 8px 0px #8C6A89;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.mini-game-panel h2 {
    font-size: 16px;
    color: #6B8F71;
    margin-bottom: 16px;
}

.mini-game-description {
    font-size: 9px;
    color: #7A5840;
    margin-bottom: 24px;
    line-height: 1.4;
}

#symphony-game-area {
    background: #F0EBD8;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

#rhythm-bar {
    height: 40px;
    background: #7A5840;
    border: 2px solid #6B8F71;
    border-radius: 4px;
    position: relative;
    margin-bottom: 16px;
    overflow: hidden;
}

#beat-indicator {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.2s ease;
}

#beat-indicator.blink-detected {
    background: #FF6B6B;
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.8);
}

@keyframes beat-pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

#rhythm-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.beat-marker {
    position: absolute;
    top: 10px;
    left: 0;
    width: 30px;
    height: 20px;
    background: #6B8F71;
    animation: beat-slide 2s linear forwards;
}

@keyframes beat-slide {
    0% { left: 0%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

#rain-meter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 8px;
}

#rain-fill {
    height: 20px;
    background: linear-gradient(90deg, #6B8F71, #A6C8E2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    flex: 1;
    border: 2px solid #7A5840;
}

#symphony-canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

#raindrop-canvas {
    border: 3px solid #6B8F71;
    border-radius: 8px;
    background: linear-gradient(180deg, #A8D5E2, #F0EBD8);
}

#symphony-camera {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 80px;
    height: 60px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    overflow: hidden;
}

#symphony-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#symphony-detection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#symphony-score {
    display: flex;
    justify-content: space-around;
    font-size: 8px;
    margin-top: 16px;
    background: #EAC8CA;
    border: 2px solid #BCA37F;
    border-radius: 6px;
    padding: 8px;
}

.mini-game-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Enhanced Visual Effects */
.water-effect {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    animation: waterDrop 1s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes waterDrop {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1.2);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(-5px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(5px) scale(0.8);
    }
}

.growing {
    animation: plantGrow 0.5s ease-out;
}

@keyframes plantGrow {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.rain-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 0%, rgba(166, 200, 226, 0.3) 20%, rgba(166, 200, 226, 0.1) 100%);
    animation: rain 2s ease-in-out;
    pointer-events: none;
    z-index: 50;
}

@keyframes rain {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Sparkle effects for perfect timing */
.sparkle-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFD700;
    font-size: 16px;
    animation: sparkle 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 20;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(360deg);
    }
}

/* Garden Status Panel */
#garden-status-panel {
    background: rgba(216, 197, 160, 0.95);
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 3px 3px 0px #8C6A89;
    backdrop-filter: blur(2px);
}

#garden-status-panel h3 {
    font-size: 9px;
    color: #6B8F71;
    margin-bottom: 8px;
    text-align: center;
}

#garden-status-text {
    font-size: 9px;
    line-height: 1.4;
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 6px;
    padding: 8px;
    color: #7A5840;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button press feedback */
.menu-btn:active,
.small-btn:active,
#controls-panel button:active {
    transform: translate(2px, 2px) !important;
    box-shadow: 1px 1px 0px #8C6A89 !important;
}

/* Blink indicator enhancement */
.blink-flash {
    background: radial-gradient(circle, #FFD700, #FFA500);
    box-shadow: 0 0 10px #FFD700;
}

/* Plant slot hover effects */
/* .plant-slot:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
} */

/* Flower Progress Indicators using pixel art */
.flower-progress {
    width: 24px;
    height: 24px;
    background-image: url('assets/ui/heart.png');
    background-size: 24px 24px;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.flower-progress[data-progress="25"] {
    background-image: url('assets/ui/heart.png');
}

.flower-progress[data-progress="50"] {
    background-image: url('assets/ui/heart.png');
}

.flower-progress[data-progress="75"] {
    background-image: url('assets/ui/heart.png');
}

.flower-progress[data-progress="100"] {
    background-image: url('assets/ui/heart.png');
}

/* Game Screen Layout */
#game-screen {
    background-image: url('./assets/backgrounds/main_menu_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 30px;
    min-height: 100vh;
}

#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(216, 197, 160, 0.95);
    border: 4px solid #BCA37F;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 4px 4px 0px #8C6A89;
    margin-bottom: 8px;
    backdrop-filter: blur(2px);
}

.header-left h1 {
    font-size: 14px;
    color: #6B8F71;
    text-shadow: 1px 1px 0px #F0EBD8;
    margin: 0;
}

.header-stats {
    display: flex;
    gap: 12px;
    font-size: 8px;
}

.header-stats span {
    background: #F0EBD8;
    padding: 6px 10px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    box-shadow: 2px 2px 0px #8C6A89;
    min-width: 70px;
    text-align: center;
}

/* Day Clock Styles */
#day-clock {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #F0EBD8;
    padding: 6px 10px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    box-shadow: 2px 2px 0px #8C6A89;
    min-width: 120px;
}

.sun-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    animation: sunRotate 20s linear infinite;
}

.header-icon {
    width: 12px;
    height: 12px;
    image-rendering: pixelated;
    margin-right: 4px;
    vertical-align: middle;
}

@keyframes sunRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.clock-progress {
    width: 40px;
    height: 8px;
    background: #BCA37F;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #7A5840;
}

#clock-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    width: 100%;
    transition: width 1s ease;
    border-radius: 3px;
}

#session-timer {
    font-size: 7px;
    color: #7A5840;
    font-weight: bold;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: auto !important;
}

.small-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 8px 12px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    background: #F0EBD8;
    color: #7A5840;
    cursor: pointer;
    box-shadow: 2px 2px 0px #8C6A89;
}

.small-btn:hover {
    background: #EAC8CA;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #8C6A89;
}

/* Main Game Area Layout */
#main-game-area {
    display: flex;
    gap: 16px;
    flex: 1;
}

#garden-container {
    flex: 2;
    min-width: 500px;
}

#game-sidebar {
    flex: 1;
    min-width: 400px;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel {
    background: #D8C5A0;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 3px 3px 0px #8C6A89;
}

.panel h3 {
    font-size: 9px;
    color: #6B8F71;
    margin-bottom: 8px;
    text-align: center;
}

#controls-panel, #info-panel, #tips-panel, #daily-quests-panel {
    background: rgba(216, 197, 160, 0.95);
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 3px 3px 0px #8C6A89;
    backdrop-filter: blur(2px);
}

/* Daily Quest Styles */
#daily-quests-panel {
    margin-bottom: 12px;
}

.quest-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 4px 0;
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    font-size: 9px;
}

.quest-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.quest-text {
    flex: 1;
    color: #7A5840;
}

.quest-progress {
    color: #6B8F71;
    font-weight: bold;
}

.quest-item.completed {
    background: #7FBF7F;
    color: #F0EBD8;
}

.quest-item.completed .quest-text,
.quest-item.completed .quest-progress {
    color: #F0EBD8;
}

#controls-panel button {
    width: 100%;
    margin-bottom: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 10px;
    border: 2px solid #BCA37F;
    border-radius: 6px;
    background: #F0EBD8;
    color: #7A5840;
    cursor: pointer;
    box-shadow: 2px 2px 0px #8C6A89;
}

#controls-panel button:hover {
    background: #EAC8CA;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #8C6A89;
}

#controls-panel button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 2px 2px 0px #8C6A89;
}

.controls-separator {
    border: none;
    border-top: 1px solid #BCA37F;
    margin: 12px 0 8px 0;
}

.tutorial-section-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #6B8F71;
    margin: 0 0 8px 0;
    text-align: center;
}

.tutorial-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.tutorial-controls .tutorial-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 4px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    background: #E6D7B8;
    color: #7A5840;
    cursor: pointer;
    box-shadow: 1px 1px 0px #8C6A89;
    margin-bottom: 0;
}

.tutorial-controls .tutorial-btn:hover {
    background: #EAC8CA;
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0px #8C6A89;
}

#mini-stats {
    font-size: 9px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    padding: 4px 8px;
    background: #F0EBD8;
    border: 1px solid #BCA37F;
    border-radius: 4px;
}

.stat-label {
    color: #7A5840;
}

#current-tip {
    font-size: 9px;
    line-height: 1.4;
    background: #F0EBD8;
    border: 2px solid #BCA37F;
    border-radius: 6px;
    padding: 8px;
    color: #7A5840;
}

/* Gaze Interaction Styles */
.gaze-highlight {
    border: 2px solid #F1D88C !important;
    box-shadow: 0 0 4px rgba(241, 216, 140, 0.8) !important;
    transition: all 0.2s ease !important;
    position: relative;
}

.gaze-highlight::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid #EAC8CA;
    border-radius: 2px;
    pointer-events: none;
}

.gaze-targeted {
    border: 2px solid #6B8F71 !important;
    box-shadow: 0 0 6px rgba(107, 143, 113, 1) !important;
    transform: scale(1.05) !important;
    animation: gazeGlow 1s ease-in-out !important;
    z-index: 10 !important;
}

@keyframes gazeGlow {
    0%, 100% { 
        box-shadow: 0 0 6px rgba(107, 143, 113, 1);
        transform: scale(1.05);
    }
    50% { 
        box-shadow: 0 0 8px rgba(107, 143, 113, 1);
        transform: scale(1.1);
    }
}

/* Camera Container - Overlay in Garden - Larger Size */
#camera-container {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 320px;
    height: 240px;
    background: #D8C5A0;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 4px 4px 0px #8C6A89;
    z-index: 100;
}

#camera-feed {
    width: 304px;
    height: 224px;
    border: 2px solid #6B8F71;
    border-radius: 4px;
    background: #F0EBD8;
    image-rendering: pixelated;
}

#detection-canvas {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 304px;
    height: 224px;
    pointer-events: none;
    border-radius: 4px;
    z-index: 10;
}

#gaze-canvas {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 304px;
    height: 224px;
    pointer-events: none;
    border-radius: 4px;
    z-index: 15;
}

#blink-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    z-index: 20;
}

.blink-flash {
    animation: blinkPulse 0.3s ease-out;
}

@keyframes blinkPulse {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Blink Debug Panel - Always visible next to camera */
#blink-debug-info {
    position: absolute;
    bottom: 16px;
    right: 360px; /* Position to the left of larger camera */
    width: 220px;
    background: #D8C5A0;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 4px 4px 0px #8C6A89;
    z-index: 99;
    font-size: 8px;
    color: #7A5840;
}

#blink-debug-info h4 {
    color: #6B8F71;
    margin-bottom: 8px;
    font-size: 9px;
    text-align: center;
}

#blink-debug-content div {
    margin: 4px 0;
    line-height: 1.3;
}

#blink-debug-content .debug-status {
    color: #6B8F71;
    font-weight: bold;
}

#blink-debug-content .debug-error {
    color: #8C6A89;
}

#blink-debug-content .debug-success {
    color: #7FBF7F;
}

#garden-container {
    background: rgba(240, 235, 216, 0.95);
    border: 4px solid #BCA37F;
    border-radius: 8px;
    padding: 16px;
    min-height: 400px;
    box-shadow: 4px 4px 0px #8C6A89;
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

#garden-grid {
    display: grid;
    grid-template-columns: repeat(12, 96px);
    grid-template-rows: repeat(8, 96px);
    gap: 0;
    margin: 0 auto;
    width: 1152px;
    height: 768px;
    background-image: 
        url('./environment/dark_earth.png');
    background-size: 96px 96px;
    background-position: 0 0;
    image-rendering: pixelated;
}

.plant-slot {
    width: 96px;
    height: 96px;
    /* border: 1px solid transparent; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background-size: 96px 96px;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    image-rendering: pixelated;
}

/* All tiles inherit grass background from garden-grid by default */
/* Create bordered dark earth planting area with directional grass borders */

/* Create bordered dark earth planting area using 96px directional grass tiles */
/* Top border: [corner_downright][down (3 tiles)][corner_downleft] */
/* Top border: down.png → [0, -96, -192] scaled for 96px tiles */
.plant-slot:nth-child(28){ background-image:url('./environment/grass/corner_downright.png'); background-size: 96px 96px; }
.plant-slot:nth-child(29){
  background-image:url('./environment/grass/down.png');
  background-size:288px 96px; background-position:0 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(30){
  background-image:url('./environment/grass/down.png');
  background-size:288px 96px; background-position:-96px 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(31){
  background-image:url('./environment/grass/down.png');
  background-size:288px 96px; background-position:-192px 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(32){ background-image:url('./environment/grass/corner_downleft.png'); background-size: 96px 96px; }

/* Vertical borders: right/left.png → [0, -96, -192] scaled for 96px tiles */
.plant-slot:nth-child(40){
  background-image:url('./environment/grass/right.png');
  background-size:96px 288px; background-position:0 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(52){
  background-image:url('./environment/grass/right.png');
  background-size:96px 288px; background-position:0 -96px; background-repeat:no-repeat;
}
.plant-slot:nth-child(64){
  background-image:url('./environment/grass/right.png');
  background-size:96px 288px; background-position:0 -192px; background-repeat:no-repeat;
}

.plant-slot:nth-child(44){
  background-image:url('./environment/grass/left.png');
  background-size:96px 288px; background-position:0 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(56){
  background-image:url('./environment/grass/left.png');
  background-size:96px 288px; background-position:0 -96px; background-repeat:no-repeat;
}
.plant-slot:nth-child(68){
  background-image:url('./environment/grass/left.png');
  background-size:96px 288px; background-position:0 -192px; background-repeat:no-repeat;
}

/* Bottom border: up.png → [0, -96, -192] scaled for 96px tiles */
.plant-slot:nth-child(76){ background-image:url('./environment/grass/corner_upright.png'); background-size: 96px 96px; }
.plant-slot:nth-child(77){
  background-image:url('./environment/grass/up.png');
  background-size:288px 96px; background-position:0 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(78){
  background-image:url('./environment/grass/up.png');
  background-size:288px 96px; background-position:-96px 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(79){
  background-image:url('./environment/grass/up.png');
  background-size:288px 96px; background-position:-192px 0; background-repeat:no-repeat;
}
.plant-slot:nth-child(80){ background-image:url('./environment/grass/corner_upleft.png'); background-size: 96px 96px; }

/* Central rectangular dark earth area for planting (3x3 rectangle inside the border) */
/* Row 4 (slot 41): 1 tile wide inside the border, centered */
.plant-slot:nth-child(41), .plant-slot:nth-child(42), .plant-slot:nth-child(43) {
    background-image: url('./environment/dark_earth.png');
    cursor: pointer; /* Show these are clickable for planting */
}

/* Row 5 (slot 53): 1 tile wide inside the border, centered */
.plant-slot:nth-child(53), .plant-slot:nth-child(54), .plant-slot:nth-child(55) {
    background-image: url('./environment/dark_earth.png');
    cursor: pointer;
}

/* Row 6 (slot 65): 1 tile wide inside the border, centered */
.plant-slot:nth-child(65), .plant-slot:nth-child(66), .plant-slot:nth-child(67) {
    background-image: url('./environment/dark_earth.png');
    cursor: pointer;
}

/* Add grass.png background to all outer tiles (outside the border area) */
.plant-slot:nth-child(-n+27), /* Rows 1-2 and part of row 3 (slots 1-27) */
.plant-slot:nth-child(33), .plant-slot:nth-child(34), .plant-slot:nth-child(35), .plant-slot:nth-child(36), /* Row 3 after border */
.plant-slot:nth-child(37), .plant-slot:nth-child(38), .plant-slot:nth-child(39), .plant-slot:nth-child(45), .plant-slot:nth-child(46), .plant-slot:nth-child(47), .plant-slot:nth-child(48), /* Row 4 outside border and planting area */
.plant-slot:nth-child(49), .plant-slot:nth-child(50), .plant-slot:nth-child(51), .plant-slot:nth-child(57), .plant-slot:nth-child(58), .plant-slot:nth-child(59), .plant-slot:nth-child(60), /* Row 5 outside border and planting area */
.plant-slot:nth-child(61), .plant-slot:nth-child(62), .plant-slot:nth-child(63), .plant-slot:nth-child(69), .plant-slot:nth-child(70), .plant-slot:nth-child(71), .plant-slot:nth-child(72), /* Row 6 outside border and planting area */
.plant-slot:nth-child(73), .plant-slot:nth-child(74), .plant-slot:nth-child(75), .plant-slot:nth-child(81), .plant-slot:nth-child(82), .plant-slot:nth-child(83), .plant-slot:nth-child(84), /* Row 7 outside border */
.plant-slot:nth-child(n+85) /* Row 8 (slots 85-96) */ {
    background-image: url('./environment/grass/grass.png');
    background-size: 96px 96px;
}

/* Random flower patches on grass tiles - using pseudo-elements for better compatibility */
.plant-slot:nth-child(5) {
    position: relative;
}

.plant-slot:nth-child(5)::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('./environment/flowers/yellow.png');
    background-size: 48px 48px;
    background-repeat: no-repeat;
    top: 25%;
    right: 25%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(8) {
    position: relative;
}

.plant-slot:nth-child(8)::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('./environment/flowers/red.png');
    background-size: 48px 48px;
    background-repeat: no-repeat;
    bottom: 25%;
    left: 25%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(14) {
    position: relative;
}

.plant-slot:nth-child(14)::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('./environment/flowers/blue.png');
    background-size: 48px 48px;
    background-repeat: no-repeat;
    top: 40%;
    right: 40%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(19) {
    position: relative;
}

.plant-slot:nth-child(19)::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('./environment/flowers/orange.png');
    background-size: 48px 48px;
    background-repeat: no-repeat;
    bottom: 30%;
    right: 20%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(23) {
    position: relative;
}

.plant-slot:nth-child(23)::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('./environment/flowers/yellow.png');
    background-size: 48px 48px;
    background-repeat: no-repeat;
    top: 30%;
    left: 30%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(86) {
    position: relative;
}

.plant-slot:nth-child(86)::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('./environment/flowers/red.png');
    background-size: 48px 48px;
    background-repeat: no-repeat;
    top: 20%;
    right: 45%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(10) { position: relative; }
.plant-slot:nth-child(10)::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('./environment/flowers/orange.png');
    background-size: 40px 40px;
    background-repeat: no-repeat;
    top: 60%;
    left: 10%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(17) { position: relative; }
.plant-slot:nth-child(17)::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    background-image: url('./environment/flowers/blue.png');
    background-size: 36px 36px;
    background-repeat: no-repeat;
    bottom: 10%;
    right: 10%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(27) { position: relative; }
.plant-slot:nth-child(27)::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    background-image: url('./environment/flowers/yellow.png');
    background-size: 44px 44px;
    background-repeat: no-repeat;
    top: 60%;
    right: 10%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(38) { position: relative; }
.plant-slot:nth-child(38)::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('./environment/flowers/red.png');
    background-size: 40px 40px;
    background-repeat: no-repeat;
    bottom: 20%;
    left: 20%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(50) { position: relative; }
.plant-slot:nth-child(50)::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    background-image: url('./environment/flowers/orange.png');
    background-size: 36px 36px;
    background-repeat: no-repeat;
    top: 10%;
    left: 60%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(59) { position: relative; }
.plant-slot:nth-child(59)::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('./environment/flowers/blue.png');
    background-size: 40px 40px;
    background-repeat: no-repeat;
    bottom: 15%;
    right: 15%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(70) { position: relative; }
.plant-slot:nth-child(70)::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    background-image: url('./environment/flowers/yellow.png');
    background-size: 44px 44px;
    background-repeat: no-repeat;
    top: 20%;
    left: 50%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(75) { position: relative; }
.plant-slot:nth-child(75)::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    background-image: url('./environment/flowers/orange.png');
    background-size: 36px 36px;
    background-repeat: no-repeat;
    bottom: 10%;
    left: 10%;
    pointer-events: none;
    z-index: 1;
}

.plant-slot:nth-child(90) { position: relative; }
.plant-slot:nth-child(90)::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('./environment/flowers/blue.png');
    background-size: 40px 40px;
    background-repeat: no-repeat;
    top: 60%;
    right: 10%;
    pointer-events: none;
    z-index: 1;
}

/* Grass areas are not plantable - only earth tiles (41, 53, 65) are plantable */
.plant-slot:not(:nth-child(41)):not(:nth-child(53)):not(:nth-child(65)):not(:nth-child(42)):not(:nth-child(43)):not(:nth-child(54)):not(:nth-child(55)):not(:nth-child(66)):not(:nth-child(67)) {
    cursor: not-allowed;
}

.plant-slot:hover {
    filter: brightness(1.1);
    /* transform: scale(1.05); */
}

.plant-slot.planted {
    border: 2px solid #6B8F71;
}

.plant-slot.wilting {
    /* border: 1px solid #8C6A89; */
    animation: wiltShake 0.5s ease-in-out infinite alternate;
    filter: saturate(0.5) brightness(0.8);
}

@keyframes wiltShake {
    0% { transform: rotate(-1deg); }
    100% { transform: rotate(1deg); }
}

.plant-slot.growing {
    animation: growPulse 0.5s ease-out;
}

@keyframes growPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.water-effect {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: #4169E1;
    font-size: 1.5em;
    opacity: 0;
    animation: waterDrop 1s ease-out;
}

@keyframes waterDrop {
    0% { opacity: 1; transform: translateX(-50%) translateY(-20px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

.rain-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="%234169E1" opacity="0.6"/><circle cx="30" cy="20" r="1" fill="%234169E1" opacity="0.6"/><circle cx="50" cy="15" r="1" fill="%234169E1" opacity="0.6"/><circle cx="70" cy="25" r="1" fill="%234169E1" opacity="0.6"/><circle cx="90" cy="5" r="1" fill="%234169E1" opacity="0.6"/></svg>');
    animation: rainFall 1s linear;
}

@keyframes rainFall {
    0% { background-position: 0 -100px; opacity: 1; }
    100% { background-position: 0 100px; opacity: 0; }
}

#controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

button {
    padding: 8px 12px;
    font-size: 8px;
    font-family: 'Press Start 2P', monospace;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px #8C6A89;
    min-height: 32px;
}

#start-btn {
    background: #6B8F71;
    color: #F0EBD8;
}

#start-btn:hover {
    background: #7A5840;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #8C6A89;
}

#pause-btn {
    background: #F1D88C;
    color: #7A5840;
}

#pause-btn:hover {
    background: #EAC8CA;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #8C6A89;
}

#look-away-btn {
    background: #A6C8E2;
    color: #7A5840;
}

#look-away-btn:hover {
    background: #8C6A89;
    color: #F0EBD8;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #7A5840;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#session-summary.hidden {
    display: none;
}

#session-summary .modal-content {
    /* Override modal-content max-width for wider session summary */
    max-width: 700px;
    width: 90vw;
    max-height: 85vh;
    background-image: url('assets/backgrounds/main_menu_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#session-summary h2 {
    color: #6B8F71;
    margin-bottom: 16px;
    font-size: 16px;
    text-shadow: 1px 1px 0px #F0EBD8;
}

#summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.summary-stat {
    background: #EAC8CA;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #BCA37F;
    box-shadow: 2px 2px 0px #8C6A89;
    text-align: center;
    margin-bottom: 4px;
}

.summary-stat h4 {
    color: #7A5840;
    margin-bottom: 6px;
    font-size: 9px;
    line-height: 1.2;
}

.summary-stat .value {
    font-size: 14px;
    font-weight: bold;
    color: #6B8F71;
}

/* Summary section groups */
.summary-section {
    background: #F0EBD8;
    border: 3px solid #BCA37F;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 4px 4px 0px #8C6A89;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-section h3 {
    color: #6B8F71;
    font-size: 12px;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 2px solid #BCA37F;
    padding-bottom: 6px;
}

.summary-section.quest-section {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.quest-header {
    margin-bottom: 12px;
}

.quest-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.quest-item-summary {
    display: flex;
    justify-content: space-between;
    align-items: left;
    text-align: center;
    background: #EAC8CA;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #BCA37F;
    font-size: 9px;
    line-height: 1.2;
}

.quest-item-summary .quest-progress {
    font-weight: bold;
    color: #6B8F71;
}

#new-session-btn {
    background: #6B8F71;
    color: #F0EBD8;
    font-size: 10px;
    padding: 12px 24px;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    box-shadow: 4px 4px 0px #8C6A89;
    transition: all 0.2s ease;
}

#new-session-btn:hover {
    background: #7FBF7F;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #8C6A89;
}

#back-to-menu-btn {
    background: #EAC8CA;
    color: #7A5840;
    font-size: 10px;
    padding: 12px 24px;
    border: 3px solid #BCA37F;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    box-shadow: 4px 4px 0px #8C6A89;
    transition: all 0.2s ease;
}

#back-to-menu-btn:hover {
    background: #F1D88C;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #8C6A89;
}

#instructions {
    background: rgba(255,255,255,0.8);
    border: 2px solid #90EE90;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

#instructions h3 {
    color: #228B22;
    margin-bottom: 15px;
}

#instructions ul {
    list-style: none;
    padding-left: 0;
}

#instructions li {
    margin: 8px 0;
    padding: 8px;
    background: rgba(152, 251, 152, 0.2);
    border-radius: 10px;
}

/* Duplicate .garden-thriving removed - using the one defined earlier */

.fatigue-warning {
    background: rgba(140, 106, 137, 0.3) !important;
    border-color: #8C6A89 !important;
    animation: fatigueWarning 1s ease-in-out infinite alternate;
}

@keyframes fatigueWarning {
    0% { filter: brightness(1); }
    100% { filter: brightness(0.9); }
}



/* Pixel art plant sprites */
.plant-sprite {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    background-size: 96px 96px;
    position: relative;
    z-index: 2;
}

/* Plant sprites with earth backgrounds preserved */
.plant-sprite.seed { 
    background-image: url('./assets/plants/seed.png'), url('./environment/dark_earth.png');
    background-size: 96px 96px, 96px 96px;
    background-position: center, center;
}
.plant-sprite.sprout { 
    background-image: url('./assets/plants/sprout.png'), url('./environment/dark_earth.png');
    background-size: 96px 96px, 96px 96px;
    background-position: center, center;
}
.plant-sprite.young { 
    background-image: url('./assets/plants/young.png'), url('./environment/dark_earth.png');
    background-size: 96px 96px, 96px 96px;
    background-position: center, center;
}
.plant-sprite.bloom { 
    background-image: url('./assets/plants/bloom.png'), url('./environment/dark_earth.png');
    background-size: 96px 96px, 96px 96px;
    background-position: center, center;
}
.plant-sprite.dead { 
    background-image: url('./assets/plants/dead.png'), url('./environment/dark_earth.png');
    background-size: 96px 96px, 96px 96px;
    background-position: center, center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body { font-size: 6px; }
    
    #game-container {
        padding: 8px;
    }
    
    #stats {
        flex-direction: column;
        gap: 8px;
    }
    
    #camera-feed {
        width: 240px;
        height: 180px;
    }
    
    #garden-grid {
        grid-template-columns: repeat(10, 32px);
        grid-template-rows: repeat(6, 32px);
    }
    
    .plant-slot {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    #controls {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    button {
        width: 80%;
        max-width: 200px;
        padding: 4px 8px;
        font-size: 6px;
    }
}

/* Bug System Styles */
.bug {
    position: absolute;
    width: 96px;
    height: 96px;
    background-image: url('assets/bugs/snail_001.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    z-index: 10;
    pointer-events: none;
    transition: transform 0.2s ease-out;
}



.bug.capturable {
    animation: capturable-pulse 0.6s ease-in-out infinite alternate;
    filter: brightness(1.3) drop-shadow(0 0 8px #FFD700);
}

.bug.fleeing {
    animation: flee-shake 0.1s ease-in-out infinite;
}

@keyframes capturable-pulse {
    0% {
        transform: scale(1);
        filter: brightness(1.3) drop-shadow(0 0 8px #FFD700);
    }
    100% {
        transform: scale(1.1);
        filter: brightness(1.5) drop-shadow(0 0 12px #FFD700);
    }
}

@keyframes flee-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

/* Tutorial System Styles */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-overlay.hidden {
    display: none !important;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.tutorial-panel {
    position: relative;
    background: #D8C5A0;
    border: 4px solid #BCA37F;
    border-radius: 12px;
    box-shadow: 8px 8px 0px #8C6A89;
    max-width: 500px;
    width: 90vw;
    max-height: 80vh;
    z-index: 2001;
    font-family: 'Press Start 2P', monospace;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid #BCA37F;
    background: #EAC8CA;
}

.tutorial-header h3 {
    font-size: 12px;
    color: #6B8F71;
    margin: 0;
}

.tutorial-content {
    padding: 20px;
}

#tutorial-step-title {
    font-size: 10px;
    color: #6B8F71;
    margin-bottom: 12px;
    font-weight: bold;
}

#tutorial-step-text {
    font-size: 9px;
    color: #7A5840;
    line-height: 1.5;
    margin-bottom: 16px;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 2px solid #BCA37F;
    background: #F0EBD8;
}

#tutorial-progress {
    font-size: 8px;
    color: #7A5840;
}

.tutorial-buttons {
    display: flex;
    gap: 12px;
}

.tutorial-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 16px;
    border: 2px solid #BCA37F;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 2px 2px 0px #8C6A89;
    transition: all 0.2s ease;
}

.tutorial-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #8C6A89;
}

.tutorial-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #8C6A89;
}

.tutorial-btn-primary {
    background: #6B8F71;
    color: #F0EBD8;
}

.tutorial-btn-primary:hover {
    background: #7FBF7F;
}

.tutorial-btn-secondary {
    background: #F0EBD8;
    color: #7A5840;
}

.tutorial-btn-secondary:hover {
    background: #EAC8CA;
}

.tutorial-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 2px 2px 0px #8C6A89 !important;
}

/* Tutorial highlight effect */
.tutorial-highlight {
    position: relative;
    z-index: 1500 !important;
    box-shadow: 0 0 0 4px rgba(241, 216, 140, 0.8), 0 0 20px rgba(241, 216, 140, 0.6) !important;
    animation: tutorial-pulse 2s ease-in-out infinite;
}

/* Tutorial content styling */
.tutorial-content img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.tutorial-content em {
    color: #6B8F71;
    font-style: italic;
    font-size: 11px;
}

.tutorial-content strong {
    color: #7A5840;
    font-weight: bold;
}

@keyframes tutorial-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(241, 216, 140, 0.8), 0 0 20px rgba(241, 216, 140, 0.6);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(241, 216, 140, 1), 0 0 30px rgba(241, 216, 140, 0.8);
    }
}

/* Bug capture feedback */
.bug-captured {
    transform-origin: center center !important;
    z-index: 20 !important;
    animation: bug-capture-success 0.8s ease-out forwards !important;
}

.bug-capture-sparkles {
    z-index: 15;
}

@keyframes bug-capture-success {
    0% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1) drop-shadow(0 0 0 transparent);
        opacity: 1;
    }
    50% { 
        transform: scale(1.8) rotate(360deg);
        filter: brightness(2) drop-shadow(0 0 15px #FFD700);
        opacity: 1;
    }
    100% { 
        transform: scale(2) rotate(720deg);
        opacity: 0;
        filter: brightness(3) drop-shadow(0 0 25px #FFD700);
    }
}

/* Rotation Progress Indicator */
.rotation-progress-indicator {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #666;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.rotation-progress-indicator.hidden {
    display: none;
}

.rotation-progress-indicator .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.3s ease-out;
    border-radius: 3px;
}