@font-face {
    font-family: "Dana";
    src: url("./Dana-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

[lang="fa"] {
    font-family: "Dana", Tahoma, sans-serif !important;
    direction: rtl;
    text-align: center;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html,
body {
    width: 100%;
    min-height: 100%;
}


body {
    min-height: 100vh;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 50% 35%,
            #10284a 0%,
            #09172b 38%,
            #040b16 100%
        );

    color: #dce9ff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.background {
    position: fixed;
    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;
}


.stars {
    position: absolute;
    inset: 0;

    opacity: .7;

    background-image:
        radial-gradient(
            circle,
            rgba(190, 216, 255, .75) 1px,
            transparent 1px
        ),
        radial-gradient(
            circle,
            rgba(190, 216, 255, .45) 1px,
            transparent 1px
        );

    background-size:
        97px 97px,
        151px 151px;

    background-position:
        10px 20px,
        50px 80px;

    animation: starsMove 18s linear infinite;
}


@keyframes starsMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-30px);
    }
}


.sparkle {
    position: absolute;

    color: rgba(181, 211, 255, .55);

    font-size: 20px;

    animation: twinkle 3s ease-in-out infinite;
}


.sparkle-1 {
    top: 13%;
    left: 14%;
}

.sparkle-2 {
    top: 25%;
    right: 12%;
    animation-delay: .8s;
}

.sparkle-3 {
    bottom: 18%;
    left: 8%;
    animation-delay: 1.5s;
}

.sparkle-4 {
    bottom: 28%;
    right: 18%;
    animation-delay: 2s;
}

.sparkle-5 {
    top: 8%;
    right: 36%;
    animation-delay: 2.5s;
}


@keyframes twinkle {
    0%,
    100% {
        opacity: .25;
        transform: scale(.75) rotate(0deg);
    }

    50% {
        opacity: .9;
        transform: scale(1.25) rotate(15deg);
    }
}


.flower {
    position: absolute;

    color: rgba(145, 181, 230, .22);

    font-size: 42px;

    animation: flowerFloat 7s ease-in-out infinite;
}


.flower-1 {
    left: 3%;
    top: 20%;
}

.flower-2 {
    right: 4%;
    top: 43%;
    animation-delay: 1.5s;
}

.flower-3 {
    left: 10%;
    bottom: 8%;
    animation-delay: 3s;
}

.flower-4 {
    right: 12%;
    bottom: 12%;
    animation-delay: 4s;
}


@keyframes flowerFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-4deg);
    }

    50% {
        transform: translateY(-16px) rotate(5deg);
    }
}


.vine {
    position: absolute;

    color: rgba(120, 161, 214, .18);

    font-size: 100px;

    animation: vineSway 6s ease-in-out infinite;
}


.vine-1 {
    top: 2%;
    left: -10px;

    transform: rotate(-25deg);
}

.vine-2 {
    bottom: 0;
    right: -15px;

    transform: rotate(155deg);

    animation-delay: 2s;
}


@keyframes vineSway {
    0%,
    100% {
        transform: rotate(-25deg);
    }

    50% {
        transform: rotate(-18deg) translateY(-5px);
    }
}


.moon {
    position: absolute;

    top: 7%;
    right: 8%;

    color: rgba(183, 213, 255, .2);

    font-size: 75px;

    animation: moonFloat 8s ease-in-out infinite;
}


@keyframes moonFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}


/* =========================================================
   BUTTERFLIES
   ========================================================= */

.butterfly {
    position: absolute;

    color: rgba(176, 211, 255, .7);

    font-size: 44px;

    filter:
        drop-shadow(
            0 0 8px rgba(130, 180, 255, .3)
        );

    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}


.butterfly-1 {
    left: 4%;
    top: 48%;

    animation:
        butterflyOne
        13s
        infinite;
}


.butterfly-2 {
    right: 4%;
    top: 18%;

    animation:
        butterflyTwo
        16s
        infinite;

    animation-delay: -4s;
}


.butterfly-3 {
    left: 28%;
    bottom: 3%;

    animation:
        butterflyThree
        18s
        infinite;

    animation-delay: -8s;
}


.butterfly-4 {
    right: 27%;
    top: 4%;

    animation:
        butterflyFour
        15s
        infinite;

    animation-delay: -6s;
}


@keyframes butterflyOne {
    0% {
        transform: translate(0, 0) rotate(-5deg);
    }

    25% {
        transform: translate(120px, -70px) rotate(10deg);
    }

    50% {
        transform: translate(260px, 50px) rotate(-8deg);
    }

    75% {
        transform: translate(120px, 150px) rotate(8deg);
    }

    100% {
        transform: translate(0, 0) rotate(-5deg);
    }
}


@keyframes butterflyTwo {
    0% {
        transform: translate(0, 0) rotate(5deg);
    }

    25% {
        transform: translate(-130px, 100px) rotate(-10deg);
    }

    50% {
        transform: translate(-260px, 40px) rotate(8deg);
    }

    75% {
        transform: translate(-100px, -100px) rotate(-6deg);
    }

    100% {
        transform: translate(0, 0) rotate(5deg);
    }
}


@keyframes butterflyThree {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(90px, -120px) rotate(10deg);
    }

    50% {
        transform: translate(240px, -40px) rotate(-8deg);
    }

    75% {
        transform: translate(120px, -180px) rotate(7deg);
    }

    100% {
        transform: translate(0, 0);
    }
}


@keyframes butterflyFour {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-100px, 130px) rotate(-10deg);
    }

    50% {
        transform: translate(-230px, 50px) rotate(8deg);
    }

    75% {
        transform: translate(-130px, 200px) rotate(-6deg);
    }

    100% {
        transform: translate(0, 0);
    }
}


/* =========================================================
   PARTICLES
   ========================================================= */

.particle {
    position: absolute;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: rgba(180, 215, 255, .45);

    animation:
        particleFloat
        9s
        ease-in-out
        infinite;
}


.particle-1 {
    left: 18%;
    bottom: 20%;
}

.particle-2 {
    left: 70%;
    bottom: 15%;
    animation-delay: 1s;
}

.particle-3 {
    left: 42%;
    top: 20%;
    animation-delay: 2s;
}

.particle-4 {
    right: 10%;
    top: 65%;
    animation-delay: 3s;
}

.particle-5 {
    left: 82%;
    top: 33%;
    animation-delay: 4s;
}

.particle-6 {
    left: 30%;
    top: 70%;
    animation-delay: 5s;
}


@keyframes particleFloat {
    0%,
    100% {
        opacity: .15;
        transform: translateY(0);
    }

    50% {
        opacity: .7;
        transform: translateY(-25px);
    }
}


/* =========================================================
   PAGE SYSTEM
   ========================================================= */

.page {
    position: relative;

    z-index: 2;

    min-height: 100vh;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate3d(0, 18px, 0);

    transition:
        opacity .45s ease,
        transform .55s cubic-bezier(.22, .61, .36, 1),
        visibility 0s linear .55s;
}


.page.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate3d(0, 0, 0);

    transition:
        opacity .55s ease,
        transform .65s cubic-bezier(.22, .61, .36, 1),
        visibility 0s linear 0s;
}


#moodPage,
#playerPage {
    position: fixed;
    inset: 0;

    overflow-y: auto;
}


/* =========================================================
   MOOD PAGE
   ========================================================= */

.mood-container {
    width: min(720px, 100%);

    text-align: center;
}


.intro {
    animation:
        introFloat
        5s
        ease-in-out
        infinite;
}


@keyframes introFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}


.tiny-label {
    display: block;

    margin-bottom: 18px;

    color: #718bb6;

    font-size: 12px;

    letter-spacing: 2px;

    text-transform: lowercase;
}


.intro h1 {
    color: #dce9ff;

    font-size: clamp(30px, 5vw, 48px);

    line-height: 1.25;

    font-weight: 700;

    letter-spacing: -.5px;
}


.intro h1::first-line {
    color: #a9c8f5;
}


.persian {
    margin-top: 17px;

    color: #718bb6;

    font-size: 16px;
}


.mood-grid {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;

    margin-top: 42px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.mood-card,
.back-button {
    -webkit-appearance: none;
    appearance: none;

    -webkit-tap-highlight-color: transparent;

    border: 1px solid rgba(148, 184, 230, .22);

    outline: none;

    background:
        linear-gradient(
            145deg,
            rgba(23, 49, 82, .72),
            rgba(8, 23, 42, .72)
        );

    color: #dce9ff;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .035),
        0 10px 30px rgba(0, 0, 0, .16);

    cursor: pointer;

    transition:
        transform .25s ease,
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}


.mood-card {
    min-height: 145px;

    padding: 20px 14px;

    border-radius: 20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;
}


.mood-card:hover {
    transform: translateY(-5px);

    border-color: rgba(166, 202, 249, .48);

    background:
        linear-gradient(
            145deg,
            rgba(32, 65, 106, .82),
            rgba(10, 28, 50, .82)
        );

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .22),
        0 0 25px rgba(117, 166, 232, .08);
}


.mood-card:active {
    transform: translateY(-1px) scale(.98);
}


.mood-icon {
    margin-bottom: 11px;

    color: #a9c8f5;

    font-size: 29px;

    transition:
        transform .3s ease;
}


.mood-card:hover .mood-icon {
    transform: scale(1.12);
}


.mood-name {
    font-size: 17px;

    margin-bottom: 5px;
}


.mood-description {
    color: #728bb3;

    font-size: 11px;

    line-height: 1.4;
}


.bottom-note {
    margin-top: 32px;

    color: #5d759c;

    font-size: 12px;
}


.awkward-note {
    margin-top: 9px;

    color: #526b98;

    font-size: 13px;
}


/* =========================================================
   PLAYER
   ========================================================= */

.player-container {
    width: min(430px, 100%);

    text-align: center;
}


.back-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 10px 18px;

    border-radius: 14px;

    font-family: inherit;

    font-size: 13px;

    margin-bottom: 25px;
}


.back-button:hover {
    transform: translateY(-3px);

    border-color: rgba(166, 202, 249, .48);

    background:
        linear-gradient(
            145deg,
            rgba(32, 65, 106, .82),
            rgba(10, 28, 50, .82)
        );
}


.back-button:active {
    transform: scale(.97);
}


.player-header {
    margin-bottom: 20px;

    color: #728bb3;

    font-size: 12px;

    letter-spacing: 1.5px;
}


.album-wrapper {
    position: relative;

    width: 260px;
    height: 260px;

    margin: 0 auto 28px;

    display: flex;

    align-items: center;
    justify-content: center;
}


.album-glow {
    position: absolute;

    inset: 15px;

    border-radius: 50%;

    background: rgba(103, 157, 224, .15);

    filter: blur(30px);

    animation:
        albumGlow
        4s
        ease-in-out
        infinite;
}


@keyframes albumGlow {
    0%,
    100% {
        opacity: .5;
        transform: scale(.92);
    }

    50% {
        opacity: .85;
        transform: scale(1.05);
    }
}


.album-art {
    position: relative;

    width: 220px;
    height: 220px;

    border-radius: 26px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(156, 195, 241, .42),
            transparent 25%
        ),
        linear-gradient(
            145deg,
            #173a64,
            #0b1d35 65%,
            #071321
        );

    border: 1px solid rgba(175, 210, 250, .2);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .08);

    animation:
        albumFloat
        5s
        ease-in-out
        infinite;
}


@keyframes albumFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(.5deg);
    }
}


.album-art span {
    color: #a9c8f5;

    font-size: 70px;

    text-shadow:
        0 0 30px rgba(160, 205, 255, .3);
}


.track-info {
    margin-bottom: 28px;
}


.track-info h2 {
    color: #dce9ff;

    font-size: 24px;

    font-weight: 700;
}


.track-info p {
    margin-top: 7px;

    color: #718bb6;

    font-size: 13px;
}


/* =========================================================
   PROGRESS
   ========================================================= */

.progress-area {
    margin-bottom: 25px;
}


.progress-bar {
    width: 100%;

    height: 4px;

    border-radius: 999px;

    background: rgba(151, 183, 224, .14);

    overflow: hidden;

    cursor: pointer;
}


#progressFill {
    width: 0%;

    height: 100%;

    border-radius: inherit;

    background: #9fc5f3;

    transition: width .1s linear;
}


.time-row {
    margin-top: 8px;

    display: flex;

    justify-content: space-between;

    color: #5f789f;

    font-size: 10px;
}


/* =========================================================
   CONTROLS
   ========================================================= */

.player-controls {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 28px;

    margin-bottom: 28px;
}


.control-button,
.play-button,
.volume-controls button {
    -webkit-appearance: none;
    appearance: none;

    -webkit-tap-highlight-color: transparent;

    border: none;

    outline: none;

    background: transparent;

    color: #9fbfe9;

    cursor: pointer;

    font-family: inherit;

    transition:
        transform .2s ease,
        color .2s ease;
}


.control-button {
    font-size: 25px;
}


.play-button {
    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #071321;

    background: #a9c8f5;

    font-size: 18px;

    padding-left: 3px;

    box-shadow:
        0 8px 25px rgba(91, 145, 211, .25);
}


.control-button:hover {
    color: #d7e8ff;

    transform: scale(1.12);
}


.play-button:hover {
    transform: scale(1.08);
}


.play-button:active {
    transform: scale(.95);
}


/* =========================================================
   VOLUME
   ========================================================= */

.volume-controls {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;
}


.volume-controls button {
    color: #6684ae;

    font-size: 18px;
}


.volume-bar {
    width: 110px;

    height: 3px;

    border-radius: 999px;

    overflow: hidden;

    background: rgba(151, 183, 224, .14);
}


#volumeFill {
    width: 70%;

    height: 100%;

    background: #8eafd9;
}


.close-note {
    margin-top: 30px;

    color: #536d96;

    font-size: 11px;

    letter-spacing: .3px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .page {
        padding:
            max(28px, env(safe-area-inset-top))
            14px
            max(28px, env(safe-area-inset-bottom));
    }


    .mood-container {
        width: 100%;
    }


    .tiny-label {
        margin-bottom: 14px;

        font-size: 10px;
    }


    .intro h1 {
        font-size: 29px;

        line-height: 1.3;
    }


    .persian {
        margin-top: 14px;

        font-size: 14px;
    }


    /*
        IMPORTANT:
        TWO COLUMNS ON IPHONE.
    */

    .mood-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;

        margin-top: 30px;

        width: 100%;
    }


    .mood-card {
        min-height: 125px;

        padding: 16px 10px;

        border-radius: 17px;
    }


    .mood-icon {
        font-size: 24px;

        margin-bottom: 8px;
    }


    .mood-name {
        font-size: 14px;
    }


    .mood-description {
        font-size: 10px;
    }


    .bottom-note {
        margin-top: 25px;

        font-size: 11px;
    }


    .awkward-note {
        font-size: 12px;
    }


    .player-container {
        width: 100%;
    }


    .back-button {
        min-height: 40px;

        padding: 9px 16px;

        margin-bottom: 18px;
    }


    .album-wrapper {
        width: 220px;
        height: 220px;

        margin-bottom: 23px;
    }


    .album-art {
        width: 185px;
        height: 185px;

        border-radius: 22px;
    }


    .album-art span {
        font-size: 58px;
    }


    .track-info h2 {
        font-size: 21px;
    }


    .player-controls {
        gap: 25px;
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {

    .intro h1 {
        font-size: 25px;
    }


    .mood-card {
        min-height: 115px;
    }


    .mood-name {
        font-size: 13px;
    }


    .mood-description {
        font-size: 9px;
    }


    .album-wrapper {
        width: 200px;
        height: 200px;
    }


    .album-art {
        width: 168px;
        height: 168px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }

    .page {
        transition: opacity .2s ease;

        transform: none;
    }
}