/*
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/css.css to edit this template
*/
/* 
    Created on : Jun 22, 2026, 1:31:26 PM
    Author     : etoile
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Comic Sans MS", "Trebuchet MS", Arial, sans-serif;
    color: #2e6b28;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,.05)),
        url("images/plants-bg.webp") center / cover no-repeat fixed;
}

.game-page {
    width: 100%;
    min-height: 100vh;
    padding: 18px 14px 28px;
}

.top-panel {
    width: min(1320px, 94%);
    margin: 0 auto 20px;
    padding: 18px 24px;
    border-radius: 28px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 12px 30px rgba(50, 110, 55, .20);
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
}


.question-img {
    width: 170px;
    max-width: 80%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 10px auto;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,.18));
}

.visual-question {
    font-size: 0;
}
.left-tools,
.right-tools {
    display: flex;
    gap: 12px;
}

.right-tools {
    justify-content: flex-end;
}

.tool-btn {
    border: 0;
    min-width: 76px;
    min-height: 70px;
    border-radius: 18px;
    background: #fff;
    color: #4b9f35;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(0,0,0,.12);
    cursor: pointer;
    font-size: 25px;
}

.tool-btn span,
.tool-btn b {
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.tool-btn b {
    color: #10a84a;
}

.title-box {
    text-align: center;
    position: relative;
}

.lily-badge {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,.15);
}

h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    color: #45a843;
    text-shadow: 0 4px 0 #fff;
}

.title-box p {
    display: inline-block;
    margin: 8px 0 0;
    padding: 8px 32px;
    border-radius: 999px;
    background: #58bd48;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.game-wrap {
    width: min(1050px, 94%);
    margin: auto;
}

.stats-row {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 18px;
    margin-bottom: 18px;
    align-items: center;
}

.stat-card,
.progress-card {
    background: rgba(255,255,255,.88);
    border-radius: 20px;
    min-height: 78px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 34px;
}

.stat-card span {
    display: block;
    font-size: 14px;
    color: #58bd48;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    color: #159c38;
}

.progress-card strong {
    font-size: 22px;
    color: #3a7c2b;
}

.progress-bar {
    height: 17px;
    margin-top: 12px;
    background: #e7e7e7;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #27c04b, #a6ef3b);
}

.levels-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.level-card {
    border: 0;
    border-radius: 24px;
    padding: 22px;
    background: rgba(255,255,255,.84);
    color: #2e6b28;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    cursor: pointer;
    font-weight: 900;
    font-size: 22px;
}

.level-card.active {
    outline: 5px solid #70d85b;
    background: rgba(240,255,235,.94);
}

.level-icon {
    font-size: 30px;
}

.level-card strong,
.level-card span {
    display: block;
}

.level-card span {
    margin-top: 8px;
    font-size: 15px;
}

.play-panel {
    min-height: 390px;
    padding: 34px;
    border-radius: 30px;
    border: 4px solid rgba(91, 207, 125, .75);
    background: rgba(255,255,255,.38);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 35px rgba(0,0,0,.20);
    position: relative;
    overflow: hidden;
}

.start-screen,
.game-screen {
    min-height: 310px;
    display: grid;
    place-items: center;
    text-align: center;
}

.lily-large {
    width: 200px;
    max-width: 70%;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0,0,0,.18));
}

.start-screen h2 {
    font-size: 36px;
    margin: 10px 0;
}

.start-screen p {
    font-size: 22px;
    font-weight: 900;
}

.main-btn,
.restart-btn,
.hint-btn,
.home-btn {
    border: 0;
    border-radius: 22px;
    padding: 16px 36px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 7px 0 rgba(0,0,0,.18);
}

.main-btn {
    background: linear-gradient(#77db6a, #28a948);
}

.restart-btn {
    background: linear-gradient(#ff9d46, #ff6b22);
}

.hint-btn {
    background: #fff;
    color: #4b9f35;
}

.home-btn {
    background: linear-gradient(#9d73ff, #6c3bd5);
}

.game-screen {
    grid-template-columns: 230px 1fr;
    gap: 25px;
}

.lily-side {
    width: 230px;
    max-width: 100%;
    align-self: end;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(0,0,0,.18));
}

.question-area {
    width: 100%;
    min-height: 220px;
    border-radius: 28px;
    padding: 30px;
    background: rgba(255, 253, 220, .94);
    display: grid;
    place-items: center;
}

.question-area h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    color: #2e6b28;
}

.visual-question {
    font-size: 84px;
    margin-top: 18px;
    font-weight: 900;
}

.answers {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.answer-btn {
    min-width: 160px;
    min-height: 76px;
    border-radius: 24px;
    border: 6px solid #fff;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 0 rgba(0,0,0,.18);
    text-shadow: 0 2px 0 rgba(0,0,0,.16);
    padding: 10px 14px;
}

.answer-btn:nth-child(1) {
    background: #4caf50;
}

.answer-btn:nth-child(2) {
    background: #2196f3;
}

.answer-btn:nth-child(3) {
    background: #ff9800;
}

.answer-btn:nth-child(4) {
    background: #9c27b0;
}

.bottom-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 18px;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(30,70,30,.48);
    z-index: 20;
}

.modal-card {
    width: min(520px, 94vw);
    padding: 34px;
    border-radius: 32px;
    background: #fffbea;
    text-align: center;
    color: #2e6b28;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    border: 0;
    background: #ff934d;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

.how-list {
    text-align: start;
    font-weight: 900;
    line-height: 1.8;
}

.result-emoji {
    font-size: 90px;
}

.result-score {
    margin: 18px auto;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    font-size: 30px;
    font-weight: 900;
    color: #189c42;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .close-btn {
    right: auto;
    left: 18px;
}

/* Celebration */

.result-card.win-celebration {
    background: linear-gradient(180deg,#fffdf2,#edffe6);
    border: 6px solid #9ae96d;
    overflow: hidden;
}

.winner-lily,
.sad-lily {
    width: 180px;
    max-width: 72%;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(0,0,0,.18));
}

.winner-lily {
    animation: winnerBounce 1.4s ease-in-out infinite;
}

.sad-lily {
    animation: sadWiggle 1.8s ease-in-out infinite;
}

.stars-row {
    margin-top: 8px;
    font-size: 36px;
    animation: starsGlow 1.1s ease-in-out infinite alternate;
}

.celebration-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 30;
    overflow: hidden;
}

.celebration-item {
    position: absolute;
    top: -40px;
    font-size: 28px;
    animation: fallCelebrate linear forwards;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,.18));
}

@keyframes winnerBounce {
    0%,100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-12px) scale(1.04);
    }
}

@keyframes sadWiggle {
    0%,100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-4deg);
    }
}

@keyframes starsGlow {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 0 gold);
    }

    to {
        transform: scale(1.12);
        filter: drop-shadow(0 0 16px gold);
    }
}

@keyframes fallCelebrate {
    0% {
        transform: translateY(-40px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 800px) {
    
    
    body {
 
    background:
        linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,.05)),
        url("images/plants-bg-mob.webp") center / cover no-repeat fixed;
}

    .game-page {
        padding: 10px;
    }

    .top-panel {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .left-tools,
    .right-tools {
        justify-content: center;
    }

    .tool-btn {
        min-width: 70px;
        min-height: 62px;
        font-size: 22px;
    }

    h1 {
        font-size: 38px;
    }

    .title-box p {
        font-size: 15px;
    }

    .game-wrap {
        width: 100%;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .progress-card {
        grid-column: 1 / -1;
        order: -1;
    }

    .levels-row {
        grid-template-columns: 1fr;
    }

    .level-card {
        padding: 14px;
        font-size: 18px;
    }

    .play-panel {
        padding: 18px;
        min-height: 420px;
    }

    .game-screen {
        grid-template-columns: 1fr;
    }

    .lily-side {
        width: 135px;
        margin: auto;
    }

    .question-area {
        min-height: 170px;
        padding: 22px;
    }

    .visual-question {
        font-size: 62px;
    }

    .answer-btn {
        min-width: 130px;
        min-height: 66px;
        font-size: 18px;
    }

    .bottom-actions {
        flex-direction: column;
    }

    .main-btn,
    .restart-btn,
    .hint-btn {
        width: 100%;
    }
}