* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: "Comic Sans MS", "Poppins", sans-serif;
            overflow: hidden;
        }

        .language-screen {
            width: 100vw;
            height: 100vh;
            position: relative;
            background: url("../assets/images/language-images/language_backgound.png") center/cover no-repeat;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .title-banner {
            position: absolute;
            top: 44px;
            display: flex;
            justify-content: center;
            align-items: center;
            background: transparent;
            box-shadow: none;
            padding: 0;
        }

        .title-image {
            width: 24vw;
            max-width: 300px;
            min-width: 180px;

            filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.25));
            animation: floatAnim 3s ease-in-out infinite;
        }

        @keyframes floatAnim {
            0% {
                transform: translateY(0px);
            }

            50% {
                transform: translateY(-10px);
            }

            100% {
                transform: translateY(0px);
            }
        }

        .cards-wrapper {
            display: flex;
            gap: 45px;
            align-items: center;
            justify-content: center;
            margin-top: 60px;
        }

.language-card {
    width: 210px;
    height: 310px;
    background: linear-gradient(180deg, #fff8b8 0%, #ffd86b 100%);
    border: 7px solid #ffffff;
    border-radius: 38px;
    box-shadow:
        0 12px 0 #e6a93a,
        0 20px 35px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.35s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

        .language-card:nth-child(2) {
            background: linear-gradient(180deg, #c8f7ff 0%, #5fd7ff 100%);
            box-shadow:
                0 12px 0 #2aa9d6,
                0 20px 35px rgba(0, 0, 0, 0.18);
        }

        .language-card:nth-child(3) {
            background: linear-gradient(180deg, #ffd6f5 0%, #ff8be8 100%);
            box-shadow:
                0 12px 0 #d95ac8,
                0 20px 35px rgba(0, 0, 0, 0.18);
        }

        .language-card::before {
            content: "";
            position: absolute;
            top: 18px;
            left: 20px;
            width: 55px;
            height: 20px;
            background: rgba(255, 255, 255, 0.55);
            border-radius: 50%;
            transform: rotate(-20deg);
        }

        .language-card::after {
  content: "\2605";
            position: absolute;
            right: 22px;
            top: 18px;
            font-size: 28px;
            color: rgba(255, 255, 255, 0.9);
            text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
        }

        .language-card:hover {
            transform: translateY(-14px) scale(1.05) rotate(-2deg);
        }

        .language-card.selected {
            border-color: #27d324;
            box-shadow:
                0 0 35px #fff200,
                0 12px 0 #18a015,
                0 22px 35px rgba(78, 31, 31, 0.18);
            animation: selectedBounce 0.5s ease;
        }


        .flag img {
            width: 80px;
            /* margin-top: -2rem; */
            /* height: 80px; */
            /* object-fit: cover;
            border-radius: 10px; */
        }

        .card-animal {
            width: 155px;
            height: 155px;
            object-fit: contain;
            filter: drop-shadow(0 8px 5px rgba(0, 0, 0, 0.16));
        }

        .language-name {
            margin-top: 10px;
            font-size: 28px;
            font-weight: 900;
            color: #4b168f;
            background: rgba(255, 255, 255, 0.55);
            padding: 4px 22px;
            border-radius: 28px;
        }

        .language-card:hover {
            transform: translateY(-12px) scale(1.04);
        }

        .language-card.selected {
            border-color: #27d324;
            box-shadow:
                0 0 35px #ffd900,
                0 12px 0 rgba(0, 0, 0, 0.18);
            animation: selectedBounce 0.5s ease;
        }

        @keyframes selectedBounce {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.09);
            }

            100% {
                transform: scale(1);
            }
        }

        .tick {
            position: absolute;
            right: -18px;
            top: -18px;
            width: 58px;
            height: 58px;
            background: #24cc21;
            border: 5px solid white;
            border-radius: 50%;
            color: white;
            font-size: 36px;
            display: none;
            align-items: center;
            justify-content: center;

            z-index: 999;
        }

        .language-card.selected .tick {
            display: flex;
        }

        .arrow {
            position: absolute;
            top: 52%;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 70px;
            height: 70px;
            border: 6px solid #fff;
            border-radius: 50%;
            background: linear-gradient(#8c3dff, #4c14bf);
            color: white;
            font-size: 35px;
            font-weight: bold;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 8px 0 rgba(0, 0, 0, 0.22);
            z-index: 10000;
            pointer-events: auto;
            touch-action: manipulation;
        }

        .arrow-left {
            left: 5px;
        }

        .arrow-right {
            right: 35px;
        }

        .continue-btn {
            position: absolute;
            bottom: 48px;
            min-width: 330px;
            padding: 0px 40px;
            border: 6px solid #ffdf35;
            border-radius: 40px;
            background: linear-gradient(#52d921, #128b0c);
            color: white;
            font-size: 32px;
            font-weight: 900;
            cursor: pointer;
            box-shadow: 0 9px 0 #0b6508;
            opacity: 0.45;
            pointer-events: none;
        }

        .continue-btn.active {
            opacity: 1;
            pointer-events: auto;
            animation: glowPulse 1.2s infinite;
        }

        .continue-btn span {
            margin-left: 18px;
        }

        @keyframes glowPulse {

            0%,
            100% {
                box-shadow:
                    0 9px 0 #0b6508,
                    0 0 12px #fff200;
            }

            50% {
                box-shadow:
                    0 9px 0 #0b6508,
                    0 0 35px #fff200;
            }
        }

        .lion-box {
            position: absolute;
            left: 50px;
            bottom: 105px;
            width: 230px;
            z-index: 10;
            opacity: 1;
            pointer-events: none;
        }

        .lion-box img {
            width: 220px;
        }

        .bubble {
            position: absolute;
            background: white;
            font-weight: 900;
            opacity: 0;
            transform: scale(0);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
            text-align: center;
            z-index: 20;
        }

        .lion-bubble {
            left: 115px;
            top: -7rem;
            min-width: 150px;
            min-height: 117px;
            color: #249c14;
            border: 5px solid #2dbb25;
            border-radius: 60px;
            padding: 14px 20px;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .lion-bubble::after {
            content: "";
            position: absolute;
            bottom: -18px;
            left: 45px;
            width: 28px;
            height: 28px;
            background: white;
            border-left: 5px solid #2dbb25;
            border-bottom: 5px solid #2dbb25;
            transform: rotate(-45deg);
        }

        .selected-animal-box {
            position: absolute;
            right: 55px;
            bottom: 120px;
            width: 240px;
            opacity: 0;
            transform: translateX(180px) scale(0.6);
            z-index: 10;
            pointer-events: none;
        }

        .selected-animal-box img {
            width: 210px;
            height: 210px;
            object-fit: contain;
        }

        .selected-animal-box.show {
            animation: animalOut 0.8s ease forwards;
        }

        .animal-bubble {
            top: -9rem;
            left: 55px;
            width: clamp(92px, 12vw, 160px);
            height: clamp(92px, 12vw, 160px);
            min-width: clamp(92px, 12vw, 160px);
            min-height: clamp(92px, 12vw, 160px);
            background: white;
            border: 5px solid #8f38ff;
            color: #6b25d9;
            border-radius: 50%;
            padding: clamp(8px, 1.4vw, 15px);
            font-size: 24px;
            font-weight: 900;
            line-height: 1.15;
            white-space: normal;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .animal-bubble::after {
            content: "";
            position: absolute;
            bottom: -6px;
            right: 55px;
            width: 28px;
            height: 28px;
            background: white;
            border-right: 5px solid #8f38ff;
            border-bottom: 5px solid #8f38ff;
            transform: rotate(80deg);
        }

        .lion-box.show .lion-bubble,
        .selected-animal-box.show .animal-bubble {
            animation: bubblePop 0.35s ease forwards;
        }

        @keyframes bubblePop {
            0% {
                opacity: 0;
                transform: scale(0);
            }

            70% {
                opacity: 1;
                transform: scale(1.12);
            }

            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes animalOut {
            0% {
                opacity: 0;
                transform: translateX(180px) scale(0.6);
            }

            70% {
                opacity: 1;
                transform: translateX(-20px) scale(1.12);
            }

            100% {
                opacity: 1;
                transform: translateX(0) scale(1);
            }
        }

        .dust {
            position: absolute;
            width: 30px;
            height: 18px;
            background: rgba(180, 130, 70, 0.45);
            border-radius: 50%;
            bottom: 20px;
            left: 10px;
            opacity: 0;
        }

        .sparkle {
            position: absolute;
            width: 12px;
            height: 12px;
            background: #fff200;
            border-radius: 50%;
            animation: sparkleFly 0.9s ease forwards;
            pointer-events: none;
            z-index: 20;
        }

        @keyframes sparkleFly {
            0% {
                opacity: 1;
                transform: scale(0.4) translateY(0);
            }

            100% {
                opacity: 0;
                transform: scale(1.8) translateY(-90px);
            }
        }

        @media (max-width: 900px) {
            .title-banner {
                font-size: 28px;
                padding: 14px 35px;
            }

            .cards-wrapper {
                gap: 15px;
            }

            .language-card {
                width: 29vw;
                height: 310px;
            }

            .flag {
                width: 80px;
                height: 80px;
                margin-bottom: 15px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .flag img {
                width: 100%;
                height: 100%;
                object-fit: contain;
            }

            .card-animal {
                width: 110px;
                height: 110px;
            }

            .language-name {
                font-size: 24px;
            }

            .arrow {
                width: 60px;
                height: 60px;
                font-size: 50px;
            }

            .arrow-left {
                left: 10px;
            }

            .arrow-right {
                right: 10px;
            }

            .continue-btn {
                font-size: 28px;
                min-width: 230px;
            }
        }@media (max-width: 560px) {
  body { overflow-y: auto; }
  .language-screen { min-height: 100vh; height: auto; padding: 95px 8px 105px; align-items: flex-start; }
  .title-banner { top: 12px; left: 0; right: 0; }
  .title-image { min-width: 145px; width: 52vw; }
  .cards-wrapper { width: 100%; gap: 8px; margin-top: 0; }
  .language-card { width: 29.5vw; height: 230px; border-radius: 24px; border-width: 4px; box-shadow: 0 8px 0 rgba(0,0,0,.14); }
  .flag { width: 58px; height: 58px; margin-bottom: 10px; }
  .card-animal { width: 76px; height: 76px; }
  .language-name { font-size: 16px; }
  .tick { width: 30px; height: 30px; font-size: 20px; top: -10px; right: -8px; }
  .arrow { width: 42px; height: 42px; font-size: 34px; top: auto; bottom: 42px; transform: none; }
  .arrow-left { left: 12px; }
  .arrow-right { right: 12px; }
  .continue-btn { bottom: 28px; min-width: 175px; padding: 10px 22px; font-size: 20px; }
  .lion-box {
    display: block;
    left: 10px;
    bottom: 138px;
    width: clamp(120px, 18vw, 230px);
  }

  .selected-animal-box { display: none; }
}

/* =========================================
   FULL RESPONSIVE LANGUAGE PAGE
========================================= */

html,
body.language-page {
  width: 100%;
  min-height: 100%;
}

body.language-page {
  overflow: hidden;
}

.language-screen {
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  padding: clamp(72px, 13dvh, 126px) clamp(12px, 3vw, 44px) clamp(86px, 15dvh, 126px);
  overflow-x: hidden;
  overflow-y: auto;
}

.title-banner {
  top: clamp(28px, 5dvh, 52px);
  left: 50%;
  width: min(90vw, 420px);
  transform: translateX(-50%);
}

.title-image {
  width: clamp(150px, 24vw, 310px);
  min-width: 0;
  max-width: 100%;
}

.cards-wrapper {
  width: min(74vw, 760px);
  max-width: calc(100vw - 168px);
  gap: clamp(12px, 3vw, 42px);
  margin-top: clamp(12px, 7dvh, 58px);
}

.language-card {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: 220px;
  height: clamp(230px, 40dvh, 310px);
  padding: clamp(12px, 2.2dvh, 18px) 10px;
  border-width: clamp(4px, 0.8vw, 7px);
  border-radius: clamp(22px, 4vw, 38px);
}

.flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(50px, 9dvh, 82px);
  height: clamp(50px, 9dvh, 82px);
  margin-bottom: clamp(6px, 1.4dvh, 12px);
}

.flag img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-animal {
  width: clamp(74px, 18dvh, 150px);
  height: clamp(74px, 18dvh, 150px);
}

.language-name {
  margin-top: clamp(6px, 1.4dvh, 10px);
  padding: 3px clamp(10px, 2vw, 22px);
  font-size: clamp(16px, 3.2dvh, 28px);
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.arrow {
  top: 50%;
  width: clamp(42px, 7vw, 70px);
  height: clamp(42px, 7vw, 70px);
  border-width: clamp(3px, 0.65vw, 6px);
  font-size: clamp(28px, 4.2vw, 42px);
  transform: translateY(-50%);
}

.arrow-left {
  left: clamp(8px, 2vw, 28px);
}

.arrow-right {
  right: clamp(8px, 2vw, 28px);
}

.continue-btn {
  bottom: clamp(38px, 6dvh, 58px);
  min-width: min(330px, calc(100vw - 124px));
  padding: clamp(8px, 1.5dvh, 12px) clamp(22px, 4vw, 40px);
  font-size: clamp(18px, 4.2dvh, 32px);
  line-height: 1.1;
}

.lion-box {
  left: clamp(12px, 3.2vw, 50px);
  bottom: clamp(78px, 12dvh, 105px);
  width: clamp(120px, 18vw, 230px);
}

.lion-box img {
  width: min(100%, 220px);
}

.selected-animal-box {
  right: clamp(12px, 3.2vw, 55px);
  bottom: clamp(82px, 13dvh, 120px);
  width: clamp(125px, 18vw, 240px);
}

.selected-animal-box img {
  width: clamp(110px, 17vw, 210px);
  height: clamp(110px, 17vw, 210px);
}

.lion-bubble,
.animal-bubble {
  min-width: clamp(94px, 11vw, 160px);
  min-height: clamp(70px, 10vw, 130px);
  padding: clamp(8px, 1.6vw, 15px) clamp(10px, 2vw, 20px);
  border-width: clamp(3px, 0.55vw, 5px);
  font-size: clamp(14px, 2vw, 24px);
}

.lion-bubble {
  left: clamp(25px, 8.8vw, 115px);
  top: clamp(-112px, -10vw, -93px);
  min-width: clamp(96px, 11vw, 150px);
  min-height: clamp(76px, 9vw, 117px);
  padding: clamp(9px, 1.5vw, 14px) clamp(12px, 2vw, 20px);
  border-width: clamp(3px, 0.5vw, 5px);
  border-radius: 60px;
  font-size: clamp(14px, 1.8vw, 24px);
}

.lion-bubble::after {
  left: clamp(30px, 4vw, 45px);
  bottom: clamp(-18px, -1.5vw, -10px);
  width: clamp(18px, 2.1vw, 28px);
  height: clamp(18px, 2.1vw, 28px);
  border-left-width: clamp(3px, 0.5vw, 5px);
  border-bottom-width: clamp(3px, 0.5vw, 5px);
}

.animal-bubble {
  left: clamp(20px, 6vw, 55px);
  top: clamp(-116px, -12vw, -100px);
  width: auto;
  min-width: clamp(100px, 12vw, 160px);
  height: auto;
  min-height: clamp(78px, 9vw, 130px);
  padding: clamp(9px, 1.5vw, 15px) clamp(12px, 2vw, 20px);
  border-radius: 70px;
  font-size: clamp(13px, 1.8vw, 24px);
}

.animal-bubble::after {
  width: clamp(18px, 2.1vw, 28px);
  height: clamp(18px, 2.1vw, 28px);
  right: clamp(42px, 5vw, 65px);
  bottom: clamp(-18px, -1.6vw, -10px);
  border-right-width: clamp(3px, 0.45vw, 5px);
  border-bottom-width: clamp(3px, 0.45vw, 5px);
  transform: rotate(45deg);
}

@media (max-width: 1100px) {
  .cards-wrapper {
    width: min(82vw, 680px);
    max-width: calc(100vw - 128px);
  }

  .lion-box,
  .selected-animal-box {
    width: clamp(112px, 16vw, 165px);
  }
}

@media (max-width: 760px) {
  body.language-page {
    overflow-y: auto;
  }

  .language-screen {
    height: auto;
    min-height: 100dvh;
    align-items: flex-start;
    padding: 82px 10px 92px;
  }

  .title-image {
    width: clamp(142px, 44vw, 230px);
  }

  .cards-wrapper {
    width: 100%;
    max-width: 520px;
    gap: 10px;
    margin-top: 10px;
  }

  .language-card {
    max-width: none;
    height: clamp(198px, 46dvh, 260px);
    border-radius: 22px;
    box-shadow:
      0 7px 0 rgba(0, 0, 0, 0.15),
      0 12px 22px rgba(0, 0, 0, 0.14);
  }

  .card-animal {
    width: clamp(64px, 18vw, 92px);
    height: clamp(64px, 18vw, 92px);
  }

  .language-name {
    font-size: clamp(13px, 4vw, 18px);
    padding: 3px 8px;
  }

  .tick {
    right: -9px;
    top: -9px;
    width: 32px;
    height: 32px;
    border-width: 3px;
    font-size: 20px;
  }

  .arrow {
    top: auto;
    bottom: 26px;
    width: 42px;
    height: 42px;
    font-size: 30px;
    transform: none;
  }

  .continue-btn {
    bottom: 24px;
    min-width: min(210px, calc(100vw - 120px));
    padding: 9px 18px;
    font-size: 19px;
    border-width: 4px;
  }

  .selected-animal-box {
    display: none;
  }
}

@media (max-width: 420px) {
  .language-screen {
    padding-top: 76px;
    padding-bottom: 86px;
  }

  .cards-wrapper {
    gap: 7px;
  }

  .language-card {
    height: 205px;
    padding: 10px 5px;
  }

  .flag {
    width: 46px;
    height: 46px;
    margin-bottom: 7px;
  }

  .card-animal {
    width: 64px;
    height: 64px;
  }

  .language-name {
    font-size: 12px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .language-screen {
    min-height: 100dvh;
    height: 100dvh;
    align-items: center;
    padding: 46px 78px 54px;
  }

  .title-banner {
    top: 4px;
  }

  .title-image {
    width: clamp(120px, 20vw, 190px);
  }

  .cards-wrapper {
    width: min(72vw, 620px);
    max-width: calc(100vw - 170px);
    gap: 12px;
    margin-top: 18px;
  }

  .language-card {
    height: clamp(150px, 56dvh, 230px);
    border-radius: 20px;
  }

  .flag {
    width: clamp(40px, 12dvh, 58px);
    height: clamp(40px, 12dvh, 58px);
    margin-bottom: 4px;
  }

  .card-animal {
    width: clamp(48px, 17dvh, 80px);
    height: clamp(48px, 17dvh, 80px);
  }

  .language-name {
    margin-top: 5px;
    font-size: clamp(12px, 4dvh, 17px);
  }

  .arrow {
    top: 52%;
    bottom: auto;
    width: 40px;
    height: 40px;
    font-size: 28px;
    transform: translateY(-50%);
  }

  .continue-btn {
    bottom: 7px;
    min-width: 180px;
    padding: 6px 20px;
    font-size: 17px;
    border-width: 4px;
  }

  .selected-animal-box {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   MOBILE PORTRAIT ROTATE
========================================= */

:root {
  --visible-width: 100vw;
  --visible-height: 100dvh;
}

body.mobile-portrait-rotate {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--visible-height);
  height: var(--visible-width);
  overflow: hidden;
  background: url("../assets/images/language-images/language_backgound.png") center / cover no-repeat;
  transform: translate(
      calc((var(--visible-width) - var(--visible-height)) / 2),
      calc((var(--visible-height) - var(--visible-width)) / 2)
    )
    rotate(90deg);
  transform-origin: center center;
}

body.mobile-portrait-rotate .language-screen {
  width: var(--visible-height);
  height: var(--visible-width);
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(26px, 8vh, 36px) clamp(44px, 9vw, 62px) clamp(36px, 9vh, 46px);
  background-size: cover;
  overflow: hidden;
}

body.mobile-portrait-rotate .title-banner {
  top: 3px;
}

body.mobile-portrait-rotate .title-image {
  width: clamp(92px, 20vh, 150px);
}

body.mobile-portrait-rotate .cards-wrapper {
  width: min(calc(var(--visible-height) - 116px), 560px);
  max-width: calc(100% - 108px);
  gap: clamp(6px, 1.3vw, 11px);
  margin-top: clamp(4px, 2vh, 10px);
}

body.mobile-portrait-rotate .language-card {
  height: clamp(112px, calc(var(--visible-width) * 0.46), 178px);
  padding: 6px 5px;
  border-width: 4px;
  border-radius: 16px;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.15),
    0 10px 18px rgba(0, 0, 0, 0.14);
}

body.mobile-portrait-rotate .language-card::before {
  top: 10px;
  left: 12px;
  width: 34px;
  height: 12px;
}

body.mobile-portrait-rotate .language-card::after {
  top: 9px;
  right: 13px;
  font-size: 18px;
}

body.mobile-portrait-rotate .flag {
  width: clamp(28px, calc(var(--visible-width) * 0.105), 44px);
  height: clamp(28px, calc(var(--visible-width) * 0.105), 44px);
  margin-bottom: 3px;
}

body.mobile-portrait-rotate .card-animal {
  width: clamp(36px, calc(var(--visible-width) * 0.14), 60px);
  height: clamp(36px, calc(var(--visible-width) * 0.14), 60px);
}

body.mobile-portrait-rotate .language-name {
  margin-top: 3px;
  padding: 2px 6px;
  font-size: clamp(9px, calc(var(--visible-width) * 0.03), 14px);
}

body.mobile-portrait-rotate .tick {
  top: -9px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-width: 3px;
  font-size: 19px;
}

body.mobile-portrait-rotate .arrow {
  top: 52%;
  bottom: auto;
  width: 34px;
  height: 34px;
  border-width: 3px;
  font-size: 24px;
  transform: translateY(-50%);
}

body.mobile-portrait-rotate .arrow-left {
  left: 12px;
}

body.mobile-portrait-rotate .arrow-right {
  right: 12px;
}

body.mobile-portrait-rotate .continue-btn {
  bottom: 6px;
  min-width: min(150px, calc(var(--visible-height) - 140px));
  padding: 5px 14px;
  border-width: 4px;
  font-size: clamp(12px, calc(var(--visible-width) * 0.034), 15px);
}

body.mobile-portrait-rotate .continue-btn span {
  margin-left: 8px;
}

body.mobile-portrait-rotate .selected-animal-box {
  display: none;
}

body.mobile-portrait-rotate .lion-box {
  display: block;
  left: clamp(8px, 2.5vh, 18px);
  bottom: clamp(78px, 15vw, 112px);
  width: clamp(120px, 18vw, 230px);
}

body.mobile-portrait-rotate .lion-box img {
  width: 100%;
}

@media (max-width: 430px) {
  body.mobile-portrait-rotate .language-screen {
    padding: 24px 42px 34px;
  }

  body.mobile-portrait-rotate .title-image {
    width: 88px;
  }

  body.mobile-portrait-rotate .cards-wrapper {
    width: min(calc(var(--visible-height) - 104px), 500px);
    max-width: calc(100% - 94px);
    gap: 6px;
    margin-top: 4px;
  }

  body.mobile-portrait-rotate .language-card {
    height: clamp(104px, calc(var(--visible-width) * 0.42), 150px);
    padding: 5px 4px;
    border-radius: 16px;
  }

  body.mobile-portrait-rotate .flag {
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
  }

  body.mobile-portrait-rotate .card-animal {
    width: 34px;
    height: 34px;
  }

  body.mobile-portrait-rotate .language-name {
    padding: 2px 5px;
    font-size: 9px;
  }

  body.mobile-portrait-rotate .arrow {
    width: 30px;
    height: 30px;
    font-size: 21px;
  }

  body.mobile-portrait-rotate .continue-btn {
    min-width: 124px;
    padding: 4px 12px;
    font-size: 12px;
  }
}

/* Stable rotate fix: rotate the page surface, not the body viewport. */
body.mobile-portrait-rotate {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: url("../assets/images/language-images/language_backgound.png") center / cover no-repeat;
  transform: none;
}

body.mobile-portrait-rotate .language-screen {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100dvh;
  height: 100vw;
  min-height: 0;
  padding: clamp(28px, 8vw, 42px) clamp(48px, 12vh, 72px) clamp(38px, 10vw, 52px);
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

body.mobile-portrait-rotate .title-banner {
  top: 4px;
}

body.mobile-portrait-rotate .title-image {
  width: clamp(95px, 24vw, 160px);
}

body.mobile-portrait-rotate .cards-wrapper {
  width: min(calc(100dvh - 132px), 580px);
  max-width: calc(100% - 118px);
  gap: clamp(7px, 1.8vh, 13px);
  margin-top: clamp(6px, 2.5vw, 12px);
}

body.mobile-portrait-rotate .language-card {
  height: clamp(118px, 48vw, 190px);
  padding: 6px 5px;
  border-width: 4px;
  border-radius: 17px;
}

body.mobile-portrait-rotate .flag {
  width: clamp(30px, 11vw, 48px);
  height: clamp(30px, 11vw, 48px);
  margin-bottom: 3px;
}

body.mobile-portrait-rotate .card-animal {
  width: clamp(38px, 15vw, 66px);
  height: clamp(38px, 15vw, 66px);
}

body.mobile-portrait-rotate .language-name {
  margin-top: 3px;
  padding: 2px 6px;
  font-size: clamp(10px, 3.3vw, 15px);
}

body.mobile-portrait-rotate .arrow {
  top: 52%;
  bottom: auto;
  width: clamp(32px, 9vw, 40px);
  height: clamp(32px, 9vw, 40px);
  font-size: clamp(22px, 6vw, 28px);
  transform: translateY(-50%);
  z-index: 10000;
  pointer-events: auto;
  touch-action: manipulation;
}

body.mobile-portrait-rotate .continue-btn {
  bottom: 18px;
  min-width: min(160px, calc(100dvh - 140px));
  padding: 5px 14px;
  font-size: clamp(13px, 3.6vw, 16px);
}

@media (min-width: 901px) and (min-height: 650px) {
  body:not(.mobile-portrait-rotate):not(.mobile-landscape-layout) .title-banner {
    top: 95px !important;
  }

  body:not(.mobile-portrait-rotate):not(.mobile-landscape-layout) .continue-btn {
    bottom: 95px !important;
  }

  body:not(.mobile-portrait-rotate):not(.mobile-landscape-layout) .cards-wrapper {
    margin-top: 120px !important;
  }
}

body.language-page:not(.mobile-portrait-rotate):not(.mobile-landscape-layout) .title-banner {
  top: 110px !important;
}

body.language-page:not(.mobile-portrait-rotate):not(.mobile-landscape-layout) .continue-btn {
  bottom: 20px !important;
}

body.language-page:not(.mobile-portrait-rotate):not(.mobile-landscape-layout) .cards-wrapper {
  margin-top: 135px !important;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: url("../assets/images/language-images/language_backgound.png") center / cover no-repeat;
  transform: none;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .language-screen {
  position: relative;
  width: var(--visible-height);
  height: var(--visible-width);
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 8vw, 42px) clamp(48px, 12vh, 72px) clamp(38px, 10vw, 52px);
  overflow: hidden;
  transform: none;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .title-banner {
  top: 4px;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .title-image {
  width: clamp(95px, 24vw, 160px);
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .cards-wrapper {
  width: min(calc(100dvh - 132px), 580px);
  max-width: calc(100% - 118px);
  gap: clamp(7px, 1.8vh, 13px);
  margin-top: clamp(6px, 2.5vw, 12px);
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .language-card {
  height: clamp(118px, 48vw, 190px);
  padding: 6px 5px;
  border-width: 4px;
  border-radius: 17px;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .flag {
  width: clamp(30px, 11vw, 48px);
  height: clamp(30px, 11vw, 48px);
  margin-bottom: 3px;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .card-animal {
  width: clamp(38px, 15vw, 66px);
  height: clamp(38px, 15vw, 66px);
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .language-name {
  margin-top: 3px;
  padding: 2px 6px;
  font-size: clamp(10px, 3.3vw, 15px);
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .arrow {
  top: 52%;
  bottom: auto;
  width: clamp(32px, 9vw, 40px);
  height: clamp(32px, 9vw, 40px);
  font-size: clamp(22px, 6vw, 28px);
  transform: translateY(-50%);
  z-index: 10000;
  pointer-events: auto;
  touch-action: manipulation;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .arrow-left {
  left: 12px;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .arrow-right {
  right: 12px;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .continue-btn {
  bottom: 18px;
  min-width: min(160px, calc(100dvh - 140px));
  padding: 5px 14px;
  font-size: clamp(13px, 3.6vw, 16px);
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .selected-animal-box {
  display: none;
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .lion-box {
  display: block;
  left: clamp(8px, 2.5vh, 18px);
  bottom: clamp(78px, 15vw, 112px);
  width: clamp(120px, 18vw, 230px);
}

body.mobile-landscape-layout:not(.mobile-portrait-rotate) .lion-box img {
  width: 100%;
}
