/* Savannah's Garden - Family Game Styles */

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

body {
    font-family: 'Comic Nesko', cursive, sans-serif;
    background: linear-gradient(135deg, #a8edea 0%, #c2e9ce 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Header */
.game-header {
    text-align: center;
    color: #2d5a27;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 #fff, -3px -3px 0 #8bc34a;
}

.score-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
}

.score strong, .level strong {
    color: #ff9800;
}

/* Account Section */
.account-section {
    margin-top: 15px;
}

/* Garden Area */
.garden-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    min-height: 400px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.plant-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.plant-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.plant-card.growing {
    animation: growPlant 5s ease-in-out infinite;
}

@keyframes growPlant {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.plant-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.plant-name {
    font-weight: bold;
    color: #2d5a27;
    margin-bottom: 5px;
}

.plant-stage {
    font-size: 0.8rem;
    color: #666;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s ease;
}

/* Controls Section */
.controls-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-button {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.action-button.primary {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
}

.action-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.4);
}

.action-button.secondary {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.action-button.secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

/* Progress Section */
.progress-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.progress-container h3 {
    color: #2d5a27;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e8f5e9;
    border-radius: 15px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-fill.full {
    width: 100%;
}

/* Achievements Section */
.achievements-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.achievements-section h2 {
    color: #ff9800;
    text-align: center;
    margin-bottom: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.achievement-item {
    background: linear-gradient(135deg, #fff9c4, #ffecb3);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    opacity: 1;
    animation: unlockAnimation 1s ease-out;
}

@keyframes unlockAnimation {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.achievement-item.unlocked::after {
    content: "✨";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #2d5a27;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    position: relative;
    text-align: center;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff9800;
}

.plant-options, .modal-content img#infoImage {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Plant Options in Modal */
.option-card {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-card:hover {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    transform: translateX(5px);
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.option-name {
    font-weight: bold;
    color: #2d5a27;
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sound-toggle:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }

    .score-section {
        gap: 15px;
        font-size: 1rem;
    }

    .garden-area {
        min-height: 300px;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .plant-card {
        padding: 10px;
    }

    .plant-icon {
        font-size: 2.5rem;
    }

    .action-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .modal-content {
        padding: 20px;
    }
}

/* Animations */
@keyframes seedCollection {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(2); opacity: 0; }
}

/* Particle effect for seed collection */
.particle {
    position: absolute;
    pointer-events: none;
    animation: particleAnimation 1s ease-out;
    z-index: 50;
}

@keyframes particleAnimation {
    to {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}