@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600&family=Comic+Neue:wght@400;700&display=swap');

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

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #F0E68C 50%, #DEB887 70%, #B22222 100%);
    min-height: 100vh;
    padding: 20px;
    color: #4A4A4A;
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 3px solid #8B4513;
}

.game-title {
    font-family: 'Comic Neue', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, #B22222, #CD853F, #FFD700, #32CD32, #9370DB);
    background-size: 400% 400%;
    animation: australianGradientShift 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

@keyframes australianGradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

#canvas {
    border: 4px solid #8B4513;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(139, 69, 19, 0.3);
    margin-bottom: 20px;
    max-width: 100%;
    height: auto;
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.1) 0%, rgba(205, 133, 63, 0.1) 100%);
}

.controls-panel {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.9), rgba(245, 222, 179, 0.8));
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #CD853F;
}

.species-info {
    text-align: center;
    margin-bottom: 15px;
}

.species-badge {
    background: linear-gradient(45deg, #B22222, #CD853F);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(178, 34, 34, 0.3);
}

.control-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.plant-button {
    background: linear-gradient(45deg, #32CD32, #90EE90);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.3);
    font-family: 'Fredoka', sans-serif;
    border: 2px solid #228B22;
}

.plant-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(50, 205, 50, 0.4);
}

.action-button {
    background: linear-gradient(45deg, #9370DB, #DA70D6);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(147, 112, 219, 0.3);
    font-family: 'Fredoka', sans-serif;
    border: 2px solid #8A2BE2;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(147, 112, 219, 0.4);
}

.variant-button {
    background: linear-gradient(45deg, #CD853F, #DEB887);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(205, 133, 63, 0.3);
    font-family: 'Fredoka', sans-serif;
    border: 2px solid #A0522D;
}

.variant-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(205, 133, 63, 0.4);
}

.progress-section {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.stage-text {
    font-weight: 600;
    color: #2E8B57;
    font-size: 1.1rem;
    flex: 1;
}

.timer {
    color: #8B4513;
    font-weight: 500;
}

.progress-container {
    width: 100%;
    height: 22px;
    background: linear-gradient(90deg, #E0E0E0, #D3D3D3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.15);
    border: 2px solid #A0522D;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #32CD32, #FFD700, #CD853F, #9370DB);
    background-size: 300% 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
    position: relative;
    animation: progressShimmer 3s infinite;
}

@keyframes progressShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.care-hearts {
    color: #2E8B57;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #90EE90;
}

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

.reset-button, .screenshot-button {
    background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
    font-family: 'Fredoka', sans-serif;
    border: 2px solid #FF4500;
}

.screenshot-button {
    background: linear-gradient(45deg, #4ECDC4, #6FDBDB);
    box-shadow: 0 3px 10px rgba(78, 205, 196, 0.3);
    border: 2px solid #20B2AA;
}

.reset-button:hover, .screenshot-button:hover {
    transform: translateY(-2px);
}

.reset-button:hover {
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.screenshot-button:hover {
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.instructions {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.8), rgba(245, 222, 179, 0.6));
    font-size: 1.1rem;
    color: #2E8B57;
    font-weight: 500;
    border-top: 2px solid #CD853F;
}

.lore-text {
    font-size: 0.95rem;
    color: #8B4513;
    font-style: italic;
    margin-top: 10px;
    font-weight: 400;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .game-title {
        font-size: 1.8rem;
        padding: 15px;
    }
    
    #canvas {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    
    .control-row {
        flex-direction: column;
        align-items: center;
    }
    
    .plant-button, .action-button, .variant-button {
        width: 100%;
        max-width: 250px;
    }
    
    .progress-info {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .reset-button, .screenshot-button {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
    }
    
    .controls-panel {
        padding: 15px;
        margin: 0 10px;
    }
    
    .instructions {
        font-size: 1rem;
        padding: 15px;
    }
    
    .species-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Button press animation */
.plant-button:active, .action-button:active, .reset-button:active, .screenshot-button:active, .variant-button:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Glow effect for active states */
.controls-panel button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.5);
}

/* Australian celebration animation */
@keyframes australianCelebrate {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(2deg); }
    50% { transform: scale(1.1) rotate(-2deg); }
    75% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.celebrating {
    animation: australianCelebrate 0.8s ease-in-out;
}

/* Outback dust effect */
@keyframes dustFloat {
    0% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-10px) rotate(180deg); opacity: 0.6; }
    100% { transform: translateY(0px) rotate(360deg); opacity: 0.3; }
}

/* Australian bear themed hover effects */
.plant-button:hover::before {
    content: "🐻";
    position: absolute;
    left: -25px;
    animation: dustFloat 1s infinite;
}

.variant-button:hover::after {
    content: "🇦🇺";
    position: absolute;
    right: -25px;
    animation: dustFloat 1.5s infinite;
}