/* ==========================================
   OFFICE PLANT ASCENSION - Idle Growth Game
   ========================================== */

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8AA 100%);
    color: #2d4a3e;
    overflow-x: hidden;
}

.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    color: rgba(45, 74, 62, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.back-link:hover {
    color: #2d4a3e;
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(-5px);
}

.reset-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.2);
    color: rgba(220, 53, 69, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.reset-btn:hover {
    background: rgba(220, 53, 69, 0.8);
    color: #fff;
    transform: rotate(-180deg);
}

/* ==========================================
   Game Container
   ========================================== */
.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* ==========================================
   Header Stats
   ========================================== */
.game-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 15px 25px;
    text-align: center;
    min-width: 140px;
    backdrop-filter: blur(10px);
}

.stat-box.water {
    border-color: rgba(100, 181, 246, 0.6);
    background: rgba(100, 181, 246, 0.2);
}

.stat-box.sunlight {
    border-color: rgba(255, 193, 7, 0.6);
    background: rgba(255, 193, 7, 0.2);
}

.stat-box.growth {
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(76, 175, 80, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(45, 74, 62, 0.7);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #2d4a3e;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   Plant Area
   ========================================== */
.plant-area {
    position: relative;
    height: 300px;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 60%, #8B4513 60%, #654321 100%);
}

.sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
}

.sun {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    animation: sun-pulse 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sun:hover {
    transform: scale(1.2);
}

@keyframes sun-pulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.6)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 193, 7, 0.9)); }
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cloud {
    position: absolute;
    font-size: 2rem;
    opacity: 0.8;
    animation: cloud-drift 30s linear infinite;
}

@keyframes cloud-drift {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
}

.plant-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.plant {
    font-size: 5rem;
    transition: all 0.5s ease;
    animation: plant-sway 4s ease-in-out infinite;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
    cursor: pointer;
}

.plant:hover {
    transform: scale(1.1);
}

@keyframes plant-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.pot {
    font-size: 3rem;
    margin-top: -20px;
}

.resource-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.resource-particle {
    position: absolute;
    font-size: 1.5rem;
    animation: resource-float 2s ease-out forwards;
    pointer-events: none;
}

@keyframes resource-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5);
    }
}

/* ==========================================
   Evolution Display
   ========================================== */
.evolution-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.evolution-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d4a3e;
    margin-bottom: 15px;
}

.evolution-progress {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 10px;
}

.evolution-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 50px;
    transition: width 0.3s ease;
}

.evolution-next {
    font-size: 0.9rem;
    color: rgba(45, 74, 62, 0.7);
}

/* ==========================================
   Action Buttons
   ========================================== */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 40px;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.action-btn:active {
    transform: scale(0.95);
}

.water-btn {
    background: linear-gradient(135deg, #64B5F6, #42A5F5);
    color: #fff;
    box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
}

.water-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 181, 246, 0.5);
}

.sunlight-btn {
    background: linear-gradient(135deg, #FFD54F, #FFC107);
    color: #5d4037;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.sunlight-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.5);
}

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

.btn-text {
    font-weight: 600;
    font-size: 1rem;
}

.btn-resource {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* ==========================================
   Upgrades Panel
   ========================================== */
.upgrades-panel {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.panel-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: rgba(45, 74, 62, 0.6);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #2d4a3e;
    background: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
    color: #2d4a3e;
    background: rgba(76, 175, 80, 0.2);
    border-bottom: 2px solid #4CAF50;
}

.tab-content {
    display: none;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Upgrades List */
.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upgrade-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-item:hover:not(.locked) {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    transform: translateX(5px);
}

.upgrade-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.upgrade-item.maxed {
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(76, 175, 80, 0.2);
}

.upgrade-icon {
    font-size: 2.5rem;
    width: 60px;
    text-align: center;
}

.upgrade-info {
    flex: 1;
}

.upgrade-name {
    font-weight: 700;
    font-size: 1rem;
    color: #2d4a3e;
    margin-bottom: 4px;
}

.upgrade-desc {
    font-size: 0.85rem;
    color: rgba(45, 74, 62, 0.6);
    margin-bottom: 4px;
}

.upgrade-owned {
    font-size: 0.8rem;
    color: #4CAF50;
}

.upgrade-cost {
    text-align: right;
}

.upgrade-price {
    display: block;
    font-weight: 700;
    color: #2d4a3e;
    font-size: 1rem;
}

.upgrade-production {
    font-size: 0.8rem;
    color: rgba(45, 74, 62, 0.6);
}

/* Achievements */
.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.achievement-item {
    text-align: center;
    padding: 20px 10px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.achievement-item.locked {
    opacity: 0.3;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.achievement-item.locked .achievement-icon {
    filter: grayscale(100%);
}

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

/* Transcend */
.transcend-info {
    text-align: center;
    padding: 40px 20px;
}

.transcend-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: transcend-glow 2s ease-in-out infinite;
}

@keyframes transcend-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(76, 175, 80, 0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(76, 175, 80, 0.8)); }
}

.transcend-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4CAF50;
}

.transcend-info p {
    color: rgba(45, 74, 62, 0.7);
    margin-bottom: 10px;
}

.transcend-bonus {
    color: #4CAF50 !important;
    font-size: 0.9rem;
}

.transcend-current {
    margin-top: 20px;
    font-size: 1.1rem;
}

.transcend-current span {
    color: #4CAF50;
    font-weight: 700;
}

.btn-transcend {
    margin-top: 25px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-transcend:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
}

.btn-transcend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #888;
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 25px;
    background: rgba(76, 175, 80, 0.9);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.achievement {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ==========================================
   Scrollbar
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.5);
    border-radius: 10px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 600px) {
    .game-header {
        flex-direction: column;
        align-items: center;
    }

    .stat-box {
        width: 100%;
        max-width: 200px;
    }

    .plant {
        font-size: 4rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 100%;
        max-width: 200px;
    }

    .panel-tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .tab-btn.active {
        border-bottom: 1px solid #4CAF50;
    }
}
