/* =========================================================
   PETUALANGAN HURUF
   DESIGN SYSTEM
========================================================= */

:root {

    /* Primary Colors */
    --sky: #9EDFEF;
    --grass: #7ED34B;
    --yellow: #FFC83D;
    --orange: #FF9F2F;
    --blue: #3D9FE8;

    /* Secondary Colors */
    --pink: #F58FB4;
    --purple: #9B7FE8;

    /* Neutral */
    --white: #FFFDF7;
    --text: #4A4038;
    --outline: #704C35;

    /* Feedback */
    --success: #65C466;
    --error: #F45151;

    /* Radius */
    --radius-small: 16px;
    --radius-medium: 24px;
    --radius-large: 32px;

    /* Shadow */
    --shadow-soft:
        0 8px 20px rgba(91, 76, 53, 0.12);

    --shadow-button:
        0 7px 0 rgba(112, 76, 53, 0.18);

}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    height: 100%;
}


body {

    font-family: "Nunito", sans-serif;

    background:
        linear-gradient(
            180deg,
            #9EDFEF 0%,
            #C9F2F5 55%,
            #A8E58C 100%
        );

    overflow: hidden;

    color: var(--text);

}


/* =========================================================
   GAME SCREEN
========================================================= */

.game-screen {

    position: relative;

    width: 100vw;
    height: 100vh;

    min-height: 620px;

    overflow: hidden;

    background:

        linear-gradient(
            180deg,
            rgba(158, 223, 239, 0.92),
            rgba(206, 244, 220, 0.95)
        );

}


/* =========================================================
   CLOUDS
========================================================= */

.cloud {

    position: absolute;

    width: 140px;
    height: 50px;

    background: rgba(255, 255, 255, 0.85);

    border-radius: 50px;

    opacity: 0.75;

    z-index: 1;

}


.cloud::before,
.cloud::after {

    content: "";

    position: absolute;

    background: inherit;

    border-radius: 50%;

}


.cloud::before {

    width: 65px;
    height: 65px;

    left: 25px;
    top: -28px;

}


.cloud::after {

    width: 80px;
    height: 80px;

    right: 18px;
    top: -38px;

}


.cloud-1 {

    top: 11%;
    left: -20px;

    animation:
        cloudMove 28s linear infinite;

}


.cloud-2 {

    top: 20%;
    right: -80px;

    transform: scale(0.75);

    animation:
        cloudMoveReverse 35s linear infinite;

}


.cloud-3 {

    top: 7%;
    left: 45%;

    transform: scale(0.5);

    opacity: 0.55;

    animation:
        cloudFloat 8s ease-in-out infinite;

}


@keyframes cloudMove {

    0% {
        transform: translateX(-20px);
    }

    50% {
        transform: translateX(120px);
    }

    100% {
        transform: translateX(-20px);
    }

}


@keyframes cloudMoveReverse {

    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-150px);
    }

    100% {
        transform: translateX(0);
    }

}


@keyframes cloudFloat {

    0%,
    100% {
        transform: translateY(0) scale(0.5);
    }

    50% {
        transform: translateY(-10px) scale(0.5);
    }

}


/* =========================================================
   BUTTERFLY
========================================================= */

.butterfly {

    position: absolute;

    font-size: 28px;

    z-index: 2;

    pointer-events: none;

}


.butterfly-1 {

    top: 30%;
    left: 5%;

    animation:
        butterflyFloat 5s ease-in-out infinite;

}


.butterfly-2 {

    top: 38%;
    right: 5%;

    animation:
        butterflyFloat 6s ease-in-out infinite reverse;

}


@keyframes butterflyFloat {

    0%,
    100% {
        transform:
            translateY(0)
            rotate(-5deg);
    }

    50% {
        transform:
            translateY(-18px)
            rotate(5deg);
    }

}


/* =========================================================
   TOP BAR
========================================================= */

.top-bar {

    position: absolute;

    top: 20px;
    left: 0;
    right: 0;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding:
        0 28px;

    z-index: 20;

}


.icon-button {

    width: 58px;
    height: 58px;

    border: 4px solid var(--white);

    border-radius: 50%;

    background: var(--blue);

    box-shadow: var(--shadow-button);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 26px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.icon-button:hover {

    transform: scale(1.08);

}


.icon-button:active {

    transform:
        scale(0.94)
        translateY(3px);

    box-shadow:
        0 3px 0 rgba(112, 76, 53, 0.18);

}


/* =========================================================
   STAR BADGE
========================================================= */

.game-badge {

    display: flex;

    align-items: center;
    gap: 7px;

    background: rgba(255,255,255,0.92);

    border: 4px solid var(--yellow);

    padding:
        7px 18px;

    border-radius: 40px;

    font-family: "Baloo 2", sans-serif;

    font-size: 24px;
    font-weight: 800;

    box-shadow: var(--shadow-soft);

}


.badge-star {

    animation:
        starPulse 2s ease-in-out infinite;

}


@keyframes starPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }

}


/* =========================================================
   HOME CONTENT
========================================================= */

.home-content {

    position: relative;

    z-index: 5;

    width: min(1100px, 94vw);

    height: 100%;

    margin: auto;

    padding-top: 70px;

    display: flex;

    flex-direction: column;

    align-items: center;

}


/* =========================================================
   TITLE
========================================================= */

.game-title {

    text-align: center;

    margin-top: 10px;

}


.title-small {

    font-size: 14px;

    font-weight: 800;

    letter-spacing: 2px;

    color: #587F8A;

    margin-bottom: 0;

}


.game-title h1 {

    font-family:
        "Baloo 2",
        sans-serif;

    font-size:
        clamp(38px, 5vw, 68px);

    line-height: 0.95;

    font-weight: 800;

    letter-spacing: 1px;

    filter:
        drop-shadow(
            0 4px 0 rgba(112,76,53,0.12)
        );

}


.title-blue {

    color: var(--blue);

}


.title-orange {

    color: var(--orange);

    margin-left: 10px;

}


.title-stars {

    display: flex;

    justify-content: center;

    gap: 12px;

    margin-top: 4px;

    font-size: 18px;

}


.title-stars span:nth-child(2) {

    color: var(--yellow);

    animation:
        sparkle 1.5s ease-in-out infinite;

}


@keyframes sparkle {

    0%,
    100% {
        transform: scale(1)
        rotate(0deg);
    }

    50% {
        transform: scale(1.25)
        rotate(12deg);
    }

}


/* =========================================================
   KIKO
========================================================= */

.kiko-container {

    position: relative;

    display: flex;

    justify-content: center;

    margin-top: 5px;

    height: 190px;

}


.kiko {

    height: 180px;

    width: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 8px 8px rgba(112,76,53,0.12)
        );

    animation:
        kikoFloat 3s ease-in-out infinite;

}


@keyframes kikoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

}


/* =========================================================
   HELLO BUBBLE
========================================================= */

.hello-bubble {

    position: absolute;

    top: 12px;
    left: 125px;

    background: var(--white);

    border: 3px solid var(--orange);

    border-radius:
        22px;

    padding:
        9px 15px;

    display: flex;

    flex-direction: column;

    box-shadow:
        var(--shadow-soft);

    transform:
        rotate(3deg);

    animation:
        bubbleFloat 3s ease-in-out infinite;

}


.hello-bubble::after {

    content: "";

    position: absolute;

    left: 22px;
    bottom: -10px;

    width: 18px;
    height: 18px;

    background: var(--white);

    border-right:
        3px solid var(--orange);

    border-bottom:
        3px solid var(--orange);

    transform:
        rotate(45deg);

}


.hello-bubble span {

    font-family: "Baloo 2", sans-serif;

    color: var(--orange);

    font-size: 20px;

    font-weight: 800;

}


.hello-bubble small {

    font-size: 12px;

    font-weight: 700;

}


@keyframes bubbleFloat {

    0%,
    100% {
        transform:
            rotate(3deg)
            translateY(0);
    }

    50% {
        transform:
            rotate(3deg)
            translateY(-5px);
    }

}


/* =========================================================
   SPARKLES
========================================================= */

.kiko-sparkle {

    position: absolute;

    z-index: 2;

    font-size: 22px;

}


.sparkle-1 {

    left: -30px;
    top: 50px;

    animation:
        sparkleFloat 2s ease-in-out infinite;

}


.sparkle-2 {

    right: -30px;
    top: 80px;

    animation:
        sparkleFloat 2.5s ease-in-out infinite reverse;

}


@keyframes sparkleFloat {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

}


/* =========================================================
   GAME MENU
========================================================= */

.game-menu {

    width: 100%;

    max-width: 850px;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;

    margin-top: 5px;

}


/* =========================================================
   GAME CARD
========================================================= */

.game-card {

    position: relative;

    min-height: 105px;

    border:
        4px solid var(--white);

    border-radius:
        var(--radius-medium);

    box-shadow:
        0 7px 0 rgba(112,76,53,0.18),
        0 10px 20px rgba(91,76,53,0.10);

    display: flex;

    align-items: center;

    padding:
        12px 20px;

    cursor: pointer;

    text-align: left;

    overflow: hidden;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;

}


.game-card::before {

    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.13);

    top: -35px;
    right: 30px;

}


.game-card:hover {

    transform:
        translateY(-6px)
        scale(1.015);

    box-shadow:
        0 12px 0 rgba(112,76,53,0.15),
        0 16px 25px rgba(91,76,53,0.12);

}


.game-card:active {

    transform:
        translateY(3px)
        scale(0.98);

}


.card-blue {

    background:
        linear-gradient(
            135deg,
            #54B6ED,
            #3D9FE8
        );

}


.card-orange {

    background:
        linear-gradient(
            135deg,
            #FFB24C,
            #FF9F2F
        );

}


.card-green {

    background:
        linear-gradient(
            135deg,
            #91DB62,
            #65C447
        );

}


.card-purple {

    background:
        linear-gradient(
            135deg,
            #AE96ED,
            #9175DF
        );

}


/* =========================================================
   CARD ICON
========================================================= */

.card-icon {

    width: 75px;
    height: 75px;

    flex-shrink: 0;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.95);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 8px;

    box-shadow:
        0 4px 0 rgba(112,76,53,0.12);

}


.card-icon img {

    width: 100%;
    height: 100%;

    object-fit: contain;

}


/* =========================================================
   CARD TEXT
========================================================= */

.card-text {

    display: flex;

    flex-direction: column;

    margin-left: 15px;

}


.card-title {

    color: white;

    font-family:
        "Baloo 2",
        sans-serif;

    font-size: 26px;

    font-weight: 800;

    line-height: 0.9;

    text-shadow:
        0 2px 0 rgba(112,76,53,0.12);

}


.card-subtitle {

    color: rgba(255,255,255,0.95);

    font-family:
        "Baloo 2",
        sans-serif;

    font-size: 23px;

    font-weight: 800;

}


/* =========================================================
   CARD ARROW
========================================================= */

.card-arrow {

    margin-left: auto;

    width: 45px;
    height: 45px;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.9);

    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--orange);

    font-size: 27px;

    font-weight: 900;

    transition:
        transform 0.2s ease;

}


.game-card:hover .card-arrow {

    transform:
        translateX(5px);

}


/* =========================================================
   GARDEN
========================================================= */

.garden-bottom {

    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;

    height: 65px;

    background:
        linear-gradient(
            180deg,
            #91DD68,
            #6FC74B
        );

    border-top:
        5px solid rgba(255,255,255,0.5);

    display: flex;

    justify-content:
        space-around;

    align-items:
        flex-start;

    padding-top: 3px;

    z-index: 10;

}


.flower,
.grass {

    font-size: 30px;

    animation:
        plantSway 3s ease-in-out infinite;

}


.flower-2 {
    animation-delay: 0.5s;
}


.flower-3 {
    animation-delay: 1s;
}


.flower-4 {
    animation-delay: 1.5s;
}


@keyframes plantSway {

    0%,
    100% {
        transform:
            rotate(-3deg);
    }

    50% {
        transform:
            rotate(3deg);
    }

}


/* =========================================================
   MODAL
========================================================= */

.modal-overlay {

    position: fixed;

    inset: 0;

    background:
        rgba(62, 73, 65, 0.35);

    backdrop-filter:
        blur(5px);

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 100;

    padding: 20px;

}


.modal-overlay.show {

    display: flex;

    animation:
        fadeIn 0.2s ease;

}


@keyframes fadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


/* =========================================================
   SETTINGS MODAL
========================================================= */

.settings-modal,
.game-modal {

    position: relative;

    width: min(400px, 92vw);

    background: var(--white);

    border:
        5px solid var(--orange);

    border-radius:
        30px;

    padding:
        35px 30px;

    text-align: center;

    box-shadow:
        0 20px 50px rgba(80,60,40,0.2);

    animation:
        modalPop 0.3s ease;

}


@keyframes modalPop {

    from {
        opacity: 0;
        transform:
            scale(0.85)
            translateY(20px);
    }

    to {
        opacity: 1;
        transform:
            scale(1)
            translateY(0);
    }

}


.modal-close {

    position: absolute;

    right: 15px;
    top: 12px;

    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    background: #FFE8D2;

    color: var(--orange);

    font-size: 30px;

    font-weight: 800;

    cursor: pointer;

}


.settings-icon {

    font-size: 50px;

    margin-bottom: 5px;

}


.settings-modal h2,
.game-modal h2 {

    font-family:
        "Baloo 2",
        sans-serif;

    font-size: 32px;

    color: var(--blue);

}


.settings-modal p,
.game-modal p {

    margin:
        5px 0 20px;

    font-size: 16px;

}


/* =========================================================
   SETTINGS OPTION
========================================================= */

.settings-option {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        15px 18px;

    margin-top: 12px;

    border:
        3px solid #E5E5E5;

    border-radius:
        18px;

    background: white;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 18px;

    font-weight: 800;

    cursor: pointer;

}


.settings-option strong {

    color: var(--success);

}


/* =========================================================
   GAME MODAL
========================================================= */

.modal-kiko {

    font-size: 70px;

    margin-bottom: 5px;

}


.primary-button,
.secondary-button {

    width: 100%;

    min-height: 58px;

    border: none;

    border-radius: 20px;

    margin-top: 12px;

    font-family:
        "Baloo 2",
        sans-serif;

    font-size: 23px;

    font-weight: 800;

    cursor: pointer;

}


.primary-button {

    background: var(--orange);

    color: white;

    box-shadow:
        0 6px 0 #D77D1F;

}


.secondary-button {

    background: #EAF7FB;

    color: var(--blue);

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .game-screen {

        min-height: 700px;

    }


    .top-bar {

        top: 12px;

        padding:
            0 15px;

    }


    .icon-button {

        width: 48px;
        height: 48px;

        font-size: 21px;

    }


    .game-badge {

        font-size: 20px;

        padding:
            5px 14px;

    }


    .home-content {

        padding-top: 60px;

        width: 94vw;

    }


    .title-small {

        font-size: 10px;

        letter-spacing: 1px;

    }


    .game-title h1 {

        font-size: 39px;

    }


    .kiko-container {

        height: 145px;

    }


    .kiko {

        height: 140px;

    }


    .hello-bubble {

        left: 95px;

        top: 0;

        padding:
            7px 11px;

    }


    .hello-bubble span {

        font-size: 16px;

    }


    .hello-bubble small {

        font-size: 10px;

    }


    .game-menu {

        gap: 10px;

    }


    .game-card {

        min-height: 88px;

        padding:
            9px 10px;

        border-width: 3px;

        border-radius: 19px;

    }


    .card-icon {

        width: 53px;
        height: 53px;

        border-radius: 14px;

        padding: 6px;

    }


    .card-text {

        margin-left: 8px;

    }


    .card-title {

        font-size: 19px;

    }


    .card-subtitle {

        font-size: 18px;

    }


    .card-arrow {

        width: 32px;
        height: 32px;

        font-size: 20px;

    }


    .butterfly {

        font-size: 20px;

    }


    .garden-bottom {

        height: 48px;

    }


    .flower,
    .grass {

        font-size: 22px;

    }

}


/* =========================================================
   VERY SMALL SCREEN
========================================================= */

@media (max-height: 700px) and (min-width: 701px) {

    .home-content {

        padding-top: 58px;

    }


    .game-title h1 {

        font-size: 48px;

    }


    .kiko-container {

        height: 145px;

    }


    .kiko {

        height: 140px;

    }


    .game-card {

        min-height: 82px;

    }


    .card-icon {

        width: 60px;
        height: 60px;

    }

}