/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', cursive;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
}

/* Header styles */
.game-header {
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid #FFF;
}

.title-section h1 {
    font-size: 2.5rem;
    color: #2E8B57;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

.level-display {
    background: #FFD700;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: #8B4513;
    border: 2px solid #FFA500;
    margin-bottom: 10px;
}

.xp-progress-container {
    max-width: 200px;
}

.xp-progress-bar {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    height: 8px;
    border: 2px solid #FFA500;
    overflow: hidden;
    margin-bottom: 4px;
}

.xp-progress-fill {
    background: linear-gradient(90deg, #32CD32, #228B22);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.xp-text {
    font-size: 0.8rem;
    color: #8B4513;
    font-weight: 600;
    text-align: center;
}

.stats-section {
    display: flex;
    gap: 20px;
}

.stat-item {
    background: rgba(255,255,255,0.9);
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: 600;
    color: #2E8B57;
    border: 2px solid #90EE90;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 1.2rem;
}

/* Main game layout */
.game-main {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 15px;
    height: calc(100vh - 120px);
}

/* Sidebar styles */
.left-sidebar, .right-sidebar {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    border: 3px solid #90EE90;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    color: #2E8B57;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #FFF;
}

/* Shop tabs */
.shop-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 8px 5px;
    border: none;
    background: #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    color: #2E8B57;
    border: 2px solid #FFF;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Shop content */
.shop-content {
    max-height: 300px;
    overflow-y: auto;
}

.shop-item {
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #4169E1;
}

.shop-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-item-icon {
    font-size: 1.5rem;
}

.shop-item-details h4 {
    color: #2E8B57;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.shop-item-details p {
    color: #666;
    font-size: 0.8rem;
}

.shop-item-price {
    background: #FFD700;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 600;
    color: #8B4513;
    border: 1px solid #FFA500;
}

/* Inventory grid */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.inventory-slot {
    aspect-ratio: 1;
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.inventory-slot:hover {
    border-color: #4169E1;
    transform: scale(1.05);
}

.inventory-slot.empty {
    opacity: 0.5;
}

.inventory-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #FF6347;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Garden area */
.garden-area {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    border: 3px solid #90EE90;
    display: flex;
    flex-direction: column;
}

.garden-header {
    text-align: center;
    margin-bottom: 20px;
}

.garden-header h2 {
    color: #2E8B57;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.garden-info {
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-weight: 600;
    color: #2E8B57;
    border: 2px solid #FFF;
}

/* Garden grid */
.garden-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    flex: 1;
    padding: 20px;
    justify-content: center;
    align-content: center;
}

.garden-plot {
    aspect-ratio: 1;
    background: linear-gradient(45deg, #DEB887, #F4A460);
    border: 3px solid #8B4513;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    font-size: 3rem;
}

.garden-plot:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.garden-plot.empty {
    background: linear-gradient(45deg, #DEB887, #F4A460);
}

.garden-plot.growing {
    background: linear-gradient(45deg, #90EE90, #98FB98);
}

.garden-plot.ready {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    animation: glow 2s ease-in-out infinite alternate;
}

.garden-plot.spoiled {
    background: linear-gradient(45deg, #8B4513, #A0522D);
    border-color: #654321 !important;
}

@keyframes glow {
    from { box-shadow: 0 0 10px #FFD700; }
    to { box-shadow: 0 0 20px #FFA500; }
}

.plot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.crop-stage {
    font-size: 3rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.growth-progress {
    width: 80%;
    height: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    position: absolute;
    bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #32CD32, #00FF00);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.garden-plot.watered {
    border-color: #00BFFF !important;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
}

.garden-plot.fertilized {
    border-color: #32CD32 !important;
    box-shadow: 0 0 15px rgba(50, 205, 50, 0.4);
}

.water-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1rem;
    animation: waterDrop 2s ease-in-out infinite;
}

.fertilizer-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 1rem;
    animation: fertilizerGlow 2s ease-in-out infinite;
}

@keyframes waterDrop {
    0%, 100% { 
        transform: translateY(0); 
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-3px); 
        opacity: 1;
    }
}

@keyframes fertilizerGlow {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
    }
}

.spoiled-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF4444;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: bold;
    animation: spoiledPulse 1s ease-in-out infinite alternate;
}

@keyframes spoiledPulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Garden tips */
.garden-tips {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: rgba(135, 206, 235, 0.2);
    border-radius: 10px;
    border: 2px solid rgba(135, 206, 235, 0.5);
}

.garden-tips small {
    color: #2E8B57;
    font-weight: 500;
}

/* Garden actions */
.garden-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    background: linear-gradient(45deg, #32CD32, #90EE90);
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 600;
    color: #2E8B57;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #FFF;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pets area */
.pets-area {
    min-height: 150px;
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.no-pets {
    color: #666;
    text-align: center;
    width: 100%;
    margin-top: 50px;
    font-style: italic;
}

.pet {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.8);
    border: 2px solid #FFB6C1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pet-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.pet-upgrades {
    font-size: 0.6rem;
    color: #FFD700;
    font-weight: bold;
    margin-top: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.pet:hover {
    transform: scale(1.1);
    border-color: #FF69B4;
}

.pet.working {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Achievements */
.achievements-list {
    max-height: 200px;
    overflow-y: auto;
}

.achievement {
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement.unlocked {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-color: #FF8C00;
}

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

.achievement-info h4 {
    color: #2E8B57;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.achievement-info p {
    color: #666;
    font-size: 0.8rem;
}

/* Notifications */
.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}

.notification {
    background: linear-gradient(45deg, #32CD32, #90EE90);
    color: #2E8B57;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid #FFF;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: slideIn 0.5s ease-out;
    font-weight: 600;
}

.notification.error {
    background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
}

.notification.warning {
    background: linear-gradient(45deg, #FFD93D, #FFF000);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 3px solid #90EE90;
}

.modal-header {
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #90EE90;
}

.modal-header h3 {
    color: #2E8B57;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-content {
    padding: 20px;
}

/* Pet upgrade modal styles */
.pet-upgrade-modal {
    max-width: 400px;
}

.pet-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    border-radius: 10px;
    border: 2px solid #FFF;
}

.pet-emoji {
    font-size: 2rem;
}

.pet-info h3 {
    color: #2E8B57;
    margin-bottom: 5px;
}

.pet-info p {
    color: #4682B4;
    font-size: 0.9rem;
}

.upgrade-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upgrade-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 10px;
}

.upgrade-info h4 {
    color: #2E8B57;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.upgrade-info p {
    color: #666;
    font-size: 0.8rem;
}

.upgrade-btn {
    background: linear-gradient(45deg, #32CD32, #90EE90);
    color: #2E8B57;
    border: 2px solid #228B22;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.upgrade-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.upgrade-btn.maxed {
    background: #FFD700;
    color: #8B4513;
    border-color: #FFA500;
    cursor: not-allowed;
}

.upgrade-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cooking system styles */
.cooking-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    margin-top: 10px;
}

.cooking-tab-btn {
    flex: 1;
    padding: 6px 8px;
    border: none;
    background: #E0E0E0;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.cooking-tab-btn.active {
    background: linear-gradient(45deg, #FFA500, #FFD700);
    color: #8B4513;
    border: 2px solid #FFF;
}

.cooking-tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.recipe-item {
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.recipe-item.can-cook {
    border-color: #32CD32;
    background: linear-gradient(135deg, #F0FFF0, #E0FFE0);
}

.recipe-item.cannot-cook {
    opacity: 0.6;
    border-color: #FF6B6B;
}

.recipe-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

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

.recipe-details h4 {
    color: #2E8B57;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.recipe-ingredients {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.ingredient-ok {
    color: #32CD32;
    font-weight: 600;
}

.ingredient-missing {
    color: #FF6B6B;
    font-weight: 600;
}

.recipe-value {
    color: #666;
    font-size: 0.7rem;
}

.cook-time {
    background: #FFD700;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    color: #8B4513;
    font-size: 0.8rem;
}

.empty-kitchen {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #F5F5F5;
    border-radius: 10px;
    border: 2px dashed #CCC;
}

.cooking-queue {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cooking-item {
    background: #FFF8DC;
    border: 2px solid #DAA520;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.cooking-item.ready {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-color: #FF8C00;
    cursor: pointer;
    animation: cookingReady 2s ease-in-out infinite alternate;
}

.cooking-item.cooking {
    background: linear-gradient(45deg, #FFF8DC, #F0E68C);
}

@keyframes cookingReady {
    from { box-shadow: 0 0 10px #FFD700; }
    to { box-shadow: 0 0 20px #FFA500; }
}

.cooking-visual {
    position: relative;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.recipe-emoji {
    font-size: 1.8rem;
    z-index: 2;
}

.cooking-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(0deg, #32CD32, rgba(50, 205, 50, 0.3));
    transition: width 0.3s ease;
    border-radius: 50%;
}

.ready-indicator {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD700;
    color: #8B4513;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: bold;
    animation: sparkle 1s ease-in-out infinite alternate;
    z-index: 3;
}

@keyframes sparkle {
    from { transform: translateX(-50%) scale(1); }
    to { transform: translateX(-50%) scale(1.1); }
}

.cooking-info h4 {
    color: #8B4513;
    margin-bottom: 4px;
}

.cooking-info p {
    color: #A0522D;
    font-size: 0.8rem;
}

/* Cooking minigame styles */
.cooking-minigame {
    max-width: 500px;
    text-align: center;
}

.recipe-preview {
    background: linear-gradient(45deg, #FFB6C1, #87CEFA);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 3px solid #FFF;
}

.recipe-preview .recipe-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
}

.recipe-preview h3 {
    color: #2E8B57;
    margin-bottom: 8px;
}

.recipe-preview p {
    color: #4682B4;
    font-style: italic;
}

.cooking-actions {
    background: #F0F8FF;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #87CEEB;
}

.action-sequence {
    margin-bottom: 20px;
}

.cooking-step {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2E8B57;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    border: 2px solid #90EE90;
    margin: 10px 0;
}

.cooking-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.cooking-btn {
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.cooking-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.cooking-btn.start {
    grid-column: 1 / -1;
    background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
    color: white;
    opacity: 1;
}

.cooking-btn:not(.start) {
    background: linear-gradient(45deg, #32CD32, #90EE90);
    color: #2E8B57;
}

.cooking-btn.active-step {
    opacity: 1;
    animation: pulse 1s ease-in-out infinite alternate;
    border: 3px solid #FFD700;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.cooking-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cooking-timer {
    position: relative;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #32CD32, #FF6B6B);
    transition: width 0.1s linear;
    border-radius: 10px;
}

#timerText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #2E8B57;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    margin: 0;
    font-size: 0.9rem;
}

/* Item action buttons */
.item-actions {
    margin-top: 15px;
    text-align: center;
}

.sell-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #8B4513;
    border: 2px solid #FF8C00;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* New Endgame System Styles */

/* Mutation indicators */
.mutation-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.8rem;
    animation: mutationSparkle 2s ease-in-out infinite alternate;
}

.mutation-label {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #8B4513;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.5rem;
    font-weight: bold;
    text-shadow: none;
    border: 1px solid #FF8C00;
}

@keyframes mutationSparkle {
    from { transform: scale(1) rotate(0deg); opacity: 0.8; }
    to { transform: scale(1.2) rotate(10deg); opacity: 1; }
}

/* Event display */
.event-display {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    border: 3px solid #FFF;
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    animation: eventGlow 3s ease-in-out infinite alternate;
}

@keyframes eventGlow {
    from { box-shadow: 0 0 15px rgba(255, 107, 107, 0.5); }
    to { box-shadow: 0 0 25px rgba(78, 205, 196, 0.5); }
}

.current-event {
    display: flex;
    align-items: center;
    gap: 15px;
}

.event-icon {
    font-size: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

.event-info h4 {
    color: #2E8B57;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.event-info p {
    color: #4682B4;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.event-timer {
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: bold;
    color: #8B4513;
    font-size: 0.9rem;
}

/* Prestige button */
.prestige-btn {
    background: linear-gradient(45deg, #9932CC, #8A2BE2) !important;
    color: #FFD700 !important;
    border: 3px solid #FFD700 !important;
    animation: prestigePulse 2s ease-in-out infinite alternate;
}

.prestige-btn:hover {
    background: linear-gradient(45deg, #8A2BE2, #9932CC) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(153, 50, 204, 0.4) !important;
}

@keyframes prestigePulse {
    from { box-shadow: 0 0 10px #FFD700; }
    to { box-shadow: 0 0 20px #9932CC; }
}

/* Research & Mastery shop items */
.research-item.can-research {
    border-color: #32CD32;
    background: linear-gradient(135deg, #F0FFF0, #E0FFE0);
}

.research-item.cannot-research {
    opacity: 0.6;
    border-color: #FF6B6B;
}

.research-item.unlocked {
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFFAF0, #FFF8DC);
    opacity: 0.8;
}

.mastery-item.can-afford {
    border-color: #9932CC;
    background: linear-gradient(135deg, #F5F0FF, #E6E6FA);
}

.mastery-item.cannot-afford {
    opacity: 0.6;
    border-color: #FF6B6B;
}

.mastery-item.maxed {
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFFAF0, #FFF8DC);
    opacity: 0.8;
}

/* Prestige info display */
.prestige-info {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, #9932CC, #8A2BE2);
    color: white;
    border-radius: 15px;
    border: 3px solid #FFD700;
}

.prestige-info h4 {
    color: #FFD700;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.prestige-info p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.prestige-benefits {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.prestige-benefits h5 {
    color: #FFD700;
    margin-bottom: 10px;
}

.prestige-benefits ul {
    list-style: none;
    padding: 0;
}

.prestige-benefits li {
    padding: 5px 0;
    font-size: 0.9rem;
}

.prestige-btn-shop {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #8B4513;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin-top: 15px;
    animation: prestigePulse 2s ease-in-out infinite alternate;
}

.prestige-btn-shop:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.prestige-not-ready {
    color: #FFB6C1;
    font-style: italic;
    margin-top: 15px;
}

.unlock-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #F5F5F5;
    border-radius: 10px;
    border: 2px dashed #CCC;
}

/* Mobile-first responsive design */
/* Base styles optimized for mobile */
.game-container {
    max-width: 100%;
    padding: 5px;
}

.game-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 10px 15px;
}

.title-section h1 {
    font-size: 1.8rem;
}

.stats-section {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.stat-item {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Mobile-first main layout */
.game-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: auto;
}

.left-sidebar, .right-sidebar {
    height: auto;
    max-height: none;
    padding: 15px;
    order: 2;
}

.garden-area {
    order: 1;
    padding: 15px;
}

.right-sidebar {
    order: 3;
}

/* Mobile garden grid - start with 3x3 */
.garden-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px 10px;
}

.garden-plot {
    min-height: 80px;
    font-size: 2rem;
    border-width: 2px;
    border-radius: 12px;
    /* Larger touch targets */
    touch-action: manipulation;
}

/* Mobile touch improvements */
.shop-item,
.recipe-item,
.inventory-slot,
.pet,
.tab-btn,
.cooking-tab-btn,
.action-btn,
.cooking-btn {
    min-height: 44px; /* Apple's recommended touch target size */
    touch-action: manipulation;
}

.cooking-btn {
    padding: 15px 10px;
    font-size: 1rem;
}

/* Mobile cooking minigame */
.cooking-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.cooking-minigame {
    padding: 10px;
    width: 95vw;
    max-width: 450px;
}

.cooking-btn.start {
    grid-column: 1 / -1;
    padding: 18px 15px;
    font-size: 1.1rem;
}

.cooking-btn {
    padding: 12px 8px;
    font-size: 0.9rem;
    min-height: 48px;
    border-radius: 8px;
}

.cooking-btn:not(.start) {
    font-size: 0.8rem;
}

/* Improved mobile shop layout */
.shop-tabs {
    gap: 3px;
}

.tab-btn {
    padding: 12px 5px;
    font-size: 0.8rem;
    min-height: 44px;
}

.cooking-tabs {
    gap: 3px;
}

.cooking-tab-btn {
    padding: 10px 6px;
    font-size: 0.75rem;
    min-height: 44px;
}

/* Mobile inventory improvements */
.inventory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.inventory-slot {
    aspect-ratio: 1;
    font-size: 1.5rem;
    min-height: 50px;
}

/* Mobile pet improvements */
.pet {
    width: 70px;
    height: 70px;
    font-size: 2rem;
}

.pet-emoji {
    font-size: 1.8rem;
}

/* Mobile modal improvements */
.modal {
    width: 95%;
    max-width: 400px;
    margin: 10px;
}

.modal-content {
    padding: 15px;
}

/* Garden actions for mobile */
.garden-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.action-btn {
    padding: 15px 20px;
    font-size: 1rem;
    min-height: 50px;
}

/* Tablet styles */
@media (min-width: 600px) and (max-width: 1000px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header {
        flex-direction: row;
        padding: 15px 20px;
    }
    
    .title-section h1 {
        font-size: 2.2rem;
    }
    
    .garden-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 20px 15px;
    }
    
    .garden-plot {
        min-height: 100px;
        font-size: 2.5rem;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .cooking-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .cooking-btn.start {
        grid-column: 1 / -1;
    }
    
    .modal {
        max-width: 500px;
    }
}

/* Desktop styles */
@media (min-width: 1000px) {
    .game-container {
        max-width: 1400px;
        padding: 10px;
    }
    
    .game-header {
        flex-direction: row;
        padding: 15px 25px;
    }
    
    .title-section h1 {
        font-size: 2.5rem;
    }
    
    .game-main {
        display: grid;
        grid-template-columns: 280px 1fr 280px;
        gap: 15px;
        height: calc(100vh - 120px);
        flex-direction: initial;
    }
    
    .left-sidebar, .right-sidebar {
        height: auto;
        max-height: none;
        padding: 20px;
        order: initial;
        overflow-y: auto;
    }
    
    .garden-area {
        order: initial;
        padding: 20px;
    }
    
    .garden-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 20px;
    }
    
    .garden-plot {
        min-height: 120px;
        font-size: 3rem;
        border-width: 3px;
        border-radius: 15px;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .cooking-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .cooking-btn.start {
        grid-column: 1 / -1;
    }
    
    .garden-actions {
        flex-direction: row;
        align-items: center;
    }
    
    .modal {
        max-width: 500px;
        width: 90%;
    }
}

@media (min-width: 1200px) {
    .game-main {
        grid-template-columns: 300px 1fr 300px;
    }
}