/* ==========================================
   Aiman Birthday Puzzle
   Royal Birthday Theme
========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;

    background:
        radial-gradient(
            circle at top,
            #3a1021 0%,
            #16060d 55%,
            #080204 100%
        );

    color: #ffffff;
}


/* ==========================================
   WELCOME SCREEN
========================================== */

.welcome-screen {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    text-align: center;

    padding: 35px 22px;
}

.heart {
    font-size: 55px;
    color: #ff4f79;

    margin-bottom: 20px;

    filter:
        drop-shadow(
            0 0 15px
            rgba(255, 79, 121, 0.35)
        );

    animation:
        heartbeat 1.5s infinite;
}

.small-title {
    font-size: 12px;
    letter-spacing: 4px;

    color: #e7bb72;

    margin-bottom: 15px;
}

.welcome-screen h1 {
    font-size: clamp(48px, 13vw, 68px);

    font-weight: normal;

    color: #ffd998;

    line-height: 1.1;

    margin-bottom: 25px;

    text-shadow:
        0 5px 25px
        rgba(0, 0, 0, 0.35);
}


/* Birthday Date */

.birthday-date {
    padding: 10px 24px;

    border:
        1px solid
        rgba(255, 217, 152, 0.45);

    border-radius: 50px;

    font-size: 17px;

    color: #fff2dd;

    background:
        rgba(255, 255, 255, 0.025);

    margin-bottom: 42px;
}


/* 30 Pictures Section */

.journey-count {
    font-size: 23px;

    line-height: 1.65;

    color: #fff2dd;
}

.journey-count p {
    margin: 1px 0;
}


/* Gold Divider */

.divider {
    margin: 28px 0;

    color: #d6a557;

    letter-spacing: 9px;

    font-size: 18px;
}


/* Memory Text */

.journey-text {
    max-width: 350px;

    font-size: 17px;

    line-height: 1.8;

    font-style: italic;

    color: #d9c8cb;

    margin-bottom: 35px;
}


/* ==========================================
   START BUTTON
========================================== */

.start-button {
    width: min(100%, 370px);

    border: none;

    padding: 17px 28px;

    border-radius: 60px;

    font-family: inherit;

    font-size: 17px;

    font-weight: bold;

    color: #2b0b13;

    background:
        linear-gradient(
            135deg,
            #ffdc96,
            #d79b40
        );

    box-shadow:
        0 12px 35px
        rgba(215, 155, 64, 0.22);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.start-button span {
    color: #ae244c;

    margin-left: 7px;
}

.start-button:active {
    transform: scale(0.96);

    box-shadow:
        0 6px 20px
        rgba(215, 155, 64, 0.18);
}


/* Made By */

.made-with {
    margin-top: 35px;

    font-size: 13px;

    color: #776269;
}


/* ==========================================
   GAME SCREEN
========================================== */

.game-screen {
    min-height: 100vh;

    padding: 35px 20px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}


/* Header */

.game-header {
    margin-bottom: 5px;
}

.game-small-title {
    color: #d2aa64;

    letter-spacing: 3px;

    font-size: 11px;
}

.game-header h2 {
    font-size: 42px;

    font-weight: normal;

    color: #ffdc99;

    margin-top: 8px;
}

.level-progress {
    margin-top: 7px;

    font-size: 13px;

    color: #9f858c;
}


/* ==========================================
   TEMPORARY PUZZLE BOX
========================================== */

.puzzle-placeholder {
    width: min(90vw, 390px);

    min-height: 420px;

    margin: 28px auto;

    border-radius: 26px;

    border:
        1px solid
        rgba(255, 218, 150, 0.25);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.065),
            rgba(255, 255, 255, 0.018)
        );

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, 0.4);
}

.puzzle-icon {
    font-size: 70px;

    margin-bottom: 18px;
}

.puzzle-placeholder h3 {
    font-size: 25px;

    font-weight: normal;

    color: #ffda96;

    margin-bottom: 10px;
}

.puzzle-placeholder p {
    color: #ae989e;

    font-size: 15px;
}


/* ==========================================
   SECONDARY BUTTON
========================================== */

.secondary-button {
    padding: 12px 27px;

    border-radius: 30px;

    border:
        1px solid
        #bd8b47;

    background:
        rgba(255, 255, 255, 0.02);

    color: #e7c78c;

    font-family: inherit;

    font-size: 15px;

    cursor: pointer;
}


/* ==========================================
   UTILITY
========================================== */

.hidden {
    display: none !important;
}


/* ==========================================
   ANIMATIONS
========================================== */

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.08);
    }

    50% {
        transform: scale(1.16);
    }

    75% {
        transform: scale(1.08);
    }
}


/* ==========================================
   SMALL MOBILE SCREENS
========================================== */

@media (max-width: 380px) {

    .welcome-screen {
        padding-left: 18px;
        padding-right: 18px;
    }

    .welcome-screen h1 {
        font-size: 47px;
    }

    .journey-count {
        font-size: 21px;
    }

    .journey-text {
        font-size: 16px;
    }

      }

/* ==========================================
   LEVEL 1 - PHOTO PREVIEW
========================================== */

.preview-card {
    width: min(92vw, 390px);
    margin: 26px auto;
    padding: 16px;

    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.025)
        );

    border:
        1px solid
        rgba(255, 218, 150, 0.22);

    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, 0.42);
}


.preview-label {
    color: #f2cf8a;
    font-size: 16px;
    margin-bottom: 14px;
}


.preview-image {
    width: 100%;
    max-height: 520px;

    display: block;

    object-fit: cover;

    border-radius: 20px;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.35);
}


.preview-hint {
    margin-top: 14px;

    color: #bca8ad;

    font-size: 13px;

    line-height: 1.6;
}


/* ==========================================
   PUZZLE AREA
========================================== */

.puzzle-area {
    width: min(94vw, 420px);

    display: flex;
    flex-direction: column;

    align-items: center;

    margin-top: 20px;
}


.game-stats {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 12px;

    margin-bottom: 16px;
}


.stat-box {
    padding: 12px 14px;

    border-radius: 18px;

    border:
        1px solid
        rgba(255, 218, 150, 0.18);

    background:
        rgba(255, 255, 255, 0.045);
}


.stat-box span {
    display: block;

    color: #9d858b;

    font-size: 11px;

    letter-spacing: 1px;

    text-transform: uppercase;

    margin-bottom: 5px;
}


.stat-box strong {
    color: #ffdc9b;

    font-size: 20px;
}


/* ==========================================
   3x3 PUZZLE BOARD
========================================== */

.puzzle-board {
    width: min(92vw, 390px);

    aspect-ratio: 3 / 4.6;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    grid-template-rows:
        repeat(3, 1fr);

    gap: 3px;

    padding: 3px;

    border-radius: 22px;

    overflow: hidden;

    background:
        rgba(255, 215, 140, 0.18);

    border:
        1px solid
        rgba(255, 218, 150, 0.26);

    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, 0.45);
}


.puzzle-piece {
    position: relative;

    width: 100%;
    height: 100%;

    border-radius: 7px;

    background-image:
        url("assets/photos/level1.jpg");

    background-repeat: no-repeat;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;

    -webkit-tap-highlight-color:
        transparent;
}


.puzzle-piece:active {
    transform: scale(0.96);
}


.puzzle-piece.selected {
    z-index: 5;

    outline:
        3px solid
        #ffd478;

    box-shadow:
        0 0 0 4px
        rgba(255, 212, 120, 0.18),
        0 0 25px
        rgba(255, 184, 78, 0.6);

    transform: scale(0.95);
}


.puzzle-instruction {
    margin: 17px 10px 15px;

    color: #bba5aa;

    font-size: 13px;

    line-height: 1.6;
}


/* ==========================================
   SOLVED CARD
========================================== */

.solved-card {
    width: min(92vw, 400px);

    margin: 26px auto;

    padding: 22px 18px 26px;

    border-radius: 28px;

    border:
        1px solid
        rgba(255, 218, 150, 0.28);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.022)
        );

    box-shadow:
        0 18px 60px
        rgba(0, 0, 0, 0.48);
}


.solved-heart {
    font-size: 48px;

    margin-bottom: 8px;

    animation:
        heartbeat 1.4s infinite;
}


.solved-small {
    color: #d5a85b;

    font-size: 10px;

    letter-spacing: 3px;
}


.solved-card h3 {
    margin-top: 8px;

    margin-bottom: 18px;

    color: #ffdc98;

    font-size: 33px;

    font-weight: normal;
}


.solved-image {
    width: 100%;

    max-height: 520px;

    object-fit: cover;

    display: block;

    border-radius: 20px;

    box-shadow:
        0 12px 38px
        rgba(0, 0, 0, 0.4);
}


.solved-message {
    margin-top: 20px;

    color: #dac6ca;

    font-size: 15px;

    line-height: 1.75;

    font-style: italic;
}


.moves-result {
    margin: 18px auto;

    color: #bfa9ad;

    font-size: 14px;
}


.moves-result strong {
    color: #ffd992;

    font-size: 20px;
}


.next-level-button {
    margin-top: 4px;
}


/* ==========================================
   BACK BUTTON
========================================== */

.back-button {
    margin-top: 25px;

    padding: 10px 18px;

    border: none;

    background: transparent;

    color: #8f777e;

    font-family: inherit;

    font-size: 13px;

    cursor: pointer;
}


/* ==========================================
   MOBILE POLISH
========================================== */

@media (max-width: 420px) {

    .game-screen {
        padding-left: 14px;
        padding-right: 14px;
    }

    .puzzle-board {
        width: 94vw;
    }

    .preview-card,
    .solved-card {
        width: 94vw;
    }

}
