:root {
    --primary-color: #6a0dad;
    --secondary-color: linear-gradient(135deg, #4b0082 0%, #6a0dad 100%);
    --gradient: linear-gradient(135deg, #6d28d9, #a855f7, #ec4899);
    --primary-light: #9b59b6;
    --primary-dark: #4b0082;
    --bg-color: rgba(255, 255, 255, 0.95);
    --primary-color-dark: #3a0066;
    --text-dark: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: serif !important;
    direction: ltr;
    background: var(--primary-color) !important;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none !important;
}

/* Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 999;
    overflow: hidden;
}

.header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.header .desktop-nav {
    display: none;
}

@media (min-width: 769px) {
    .header .desktop-nav {
        display: flex;
        gap: 30px;
        align-items: center;
    }

    .header .desktop-nav a {
        color: #667eea;
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;
        padding: 8px 16px;
        border-radius: 8px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .header .desktop-nav a::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg,
                rgba(102, 126, 234, 0.1),
                rgba(118, 75, 162, 0.1));
        transition: left 0.3s ease;
    }

    .header .desktop-nav a:hover::before {
        left: 0;
    }

    .header .desktop-nav a:hover {
        color: #764ba2;
        transform: translateY(-2px);
    }
}

.user-menu.open {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.user-menu {
    opacity: 0;
    transform: scale(.98) translateY(-4px);
    transition: opacity .15s ease, transform .15s ease;
}

.user-menu-item {
    transition: background-color .15s ease;
    outline: none;
}

.user-menu-item:hover,
.user-menu-item:focus {
    background: #f9fafb;
}

.user-menu-btn:hover {
    filter: brightness(.98);
}

.lang-flag {
    display: inline-flex;
    padding: 6px;
    border-radius: 8px;
    transition: background-color .2s ease;
}

.lang-flag:hover {
    background: #f3f4f6;
}

.lang-flag img {
    width: 26px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.lang-flag.active {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.header .logo img {
    height: 70px;
}

.header .logo:hover {
    transform: scale(1.05);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
    }

    .desktop-nav {
        display: none !important;
    }
}

.menu-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.5s ease;
}

.menu-toggle:hover::before {
    left: 100%;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.line {
    width: 25px;
    height: 3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle:hover .line1 {
    transform: translateY(-2px) rotate(5deg);
}

.menu-toggle:hover .line2 {
    transform: scaleX(0.8);
}

.menu-toggle:hover .line3 {
    transform: translateY(2px) rotate(-5deg);
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape1 {
    width: 60px;
    height: 60px;
    background: #ff6b6b;
    top: -30px;
    left: 10%;
    animation-delay: 0s;
}

.shape2 {
    width: 40px;
    height: 40px;
    background: #4ecdc4;
    top: -20px;
    right: 20%;
    animation-delay: 2s;
}

.shape3 {
    width: 80px;
    height: 80px;
    background: #ffd93d;
    top: -40px;
    right: 5%;
    animation-delay: 4s;
}

.main-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 769px) {
    .main-sidebar {
        display: none !important;
    }
}

.main-sidebar.active {
    left: 0;
}

.main-sidebar .sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.main-sidebar.active .sidebar-overlay {
    opacity: 1;
}

.main-sidebar .sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-sidebar.active .sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.main-sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.main-sidebar .sidebar-logo img {
    height: 50px;
}

.main-sidebar .sidebar-logo span {
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
}

.main-sidebar .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.main-sidebar .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.main-sidebar .close-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.main-sidebar .close-line1 {
    transform: translate(-50%, -50%) rotate(45deg);
}

.main-sidebar .close-line2 {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.main-sidebar .nav-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.main-sidebar .nav-item {
    margin-bottom: 5px;
}

.main-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-sidebar .nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.main-sidebar .nav-link:hover::before {
    left: 0;
}

.main-sidebar .nav-link:hover {
    transform: translateX(10px);
}

.main-sidebar .nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    position: relative;
}

.main-sidebar .nav-text {
    flex: 1;
    font-weight: 500;
    font-size: 16px;
}

.main-sidebar .nav-arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.main-sidebar .nav-link:hover .nav-arrow {
    transform: rotate(45deg) translateX(5px);
}

.main-sidebar .sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.main-sidebar .social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: center;
}
.sidebar-footer .develop{
        color: var(--bg-color);
}
.main-sidebar .social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.main-sidebar .social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.main-sidebar .social-icon {
    width: 20px;
    height: 20px;
    background: white;
}

.main-sidebar .social-twitter {
    clip-path: polygon(0% 0%, 100% 0%, 85% 50%, 100% 100%, 0% 100%, 15% 50%);
}

.main-sidebar .social-instagram {
    border-radius: 30%;
    position: relative;
}

.main-sidebar .social-instagram::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border: 2px solid #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.main-sidebar .social-linkedin {
    clip-path: polygon(0% 0%, 70% 0%, 70% 30%, 100% 30%, 100% 100%, 0% 100%);
}

.main-sidebar .footer-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.menu-toggle.active .line1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .line2 {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active .line3 {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 480px) {
    .main-sidebar .sidebar-content {
        width: 280px;
    }

    .header-container {
        padding: 0 15px;
    }
}

@media (max-width: 360px) {
    .main-sidebar .sidebar-content {
        width: 100%;
    }
}

.course-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 20px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

/* Sidebar Styles */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.learning-modes h5 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 15px;
}

.mode-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    background-color: #fff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-card:hover {
    transform: translateX(5px);
}

.mode-card.active {
    background: #fff3e0;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px #6a0dadbb;
}

.mode-icon i {
    color: #6a0dadbb;
}

.mode-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    width: 40px;
    text-align: center;
}

.mode-text h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.mode-text small {
    color: #666;
    font-size: 0.8rem;
}

.profile-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.profile-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
}

.course-title h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

/* Course Parts */
.course-parts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.course-part {
  overflow: auto; 
}
.course-part {
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    background: #fafafa;
}
#cardFrontChar {
    display: none !important;
}
.course-part:not(.locked) {
    border-color: var(--primary-color);
    background: #f1f8e9;
}

.course-part.locked {
    opacity: 0.7;
    background: #f5f5f5;
}

.part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.part-header h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

.part-header h4 {
    color: #666;
    font-weight: 500;
    margin: 5px 0 0 0;
    font-size: 1.1rem;
}

.part-status {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.part-status.completed {
    background: #4caf50;
    color: white;
}

.part-status.locked {
    background: #bdbdbd;
    color: white;
}

.part-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.start-button,
.jump-button {
    background: #6a0dadbb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.jump-button {
    background: #00bcd4;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.start-button:hover,
.jump-button:hover {
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.jump-button:hover {
    box-shadow: 0 6px 16px rgba(0, 188, 212, 0.4);
}

/* Mascot Styles */
.mascot-container {
    position: relative;
}

.mascot-large,
.mascot-small {
    position: relative;
    display: inline-block;
    animation: bounce 3s ease-in-out infinite;
}

.mascot-small {
    transform: scale(0.7);
}

.mascot-small.sleeping {
    animation: sleep 4s ease-in-out infinite;
}

@keyframes sleep {

    0%,
    100% {
        transform: scale(0.7) rotate(-2deg);
    }

    50% {
        transform: scale(0.7) rotate(2deg);
    }
}

.mascot-head {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    border: 3px solid #8d6e63;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.mascot-face {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mascot-eyes {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
}

.eye {
    width: 8px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    animation: blink 4s infinite;
}

.eye.closed {
    height: 2px;
    background: #666;
}

.eye.wink {
    height: 6px;
    animation: wink 3s infinite;
}

@keyframes blink {

    0%,
    90%,
    100% {
        transform: scaleY(1);
    }

    95% {
        transform: scaleY(0.1);
    }
}

@keyframes wink {

    0%,
    80%,
    100% {
        transform: scaleY(1);
    }

    85%,
    95% {
        transform: scaleY(0.1);
    }
}

.mascot-mouth {
    width: 15px;
    height: 8px;
    background: #e91e63;
    border-radius: 0 0 15px 15px;
    margin-bottom: 5px;
}

.mascot-mouth.happy {
    width: 20px;
    height: 10px;
    border-radius: 0 0 20px 20px;
}

.mascot-mouth.sleeping {
    width: 10px;
    height: 5px;
    background: #666;
    border-radius: 50%;
}

.mascot-cheeks {
    position: absolute;
    width: 100%;
    height: 100%;
}

.cheek {
    position: absolute;
    width: 12px;
    height: 8px;
    background: #ff8a80;
    border-radius: 50%;
    top: 60%;
}

.left-cheek {
    left: 12px;
}

.right-cheek {
    right: 12px;
}

.mascot-hat {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background: var(--primary-light);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    border: 2px solid var(--primary-light);
}

.mascot-hat::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.mascot-body {
    width: 60px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 15px;
    margin: 8px auto 0;
    border: 2px solid var(--primary-color);
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mascot-book {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 22px;
    background: #2196f3;
    border-radius: 3px;
    border: 2px solid #1976d2;
}

.mascot-book::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 2px;
    background: white;
}

.sleep-bubble {
    position: absolute;
    top: -20px;
    right: -15px;
    font-size: 1rem;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.lesson-path {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    position: relative;
    min-height: 500px;
}

.lesson-node {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
    background: white;
}

.lesson-connector {
    display: none;
}

.lesson-node.completed {
    border-color: #4caf50;
    background: #e8f5e8;
}

.lesson-node.current {
    border-color: #ff9800;
    background: #fff3e0;
}

.lesson-node .node-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lesson-node.current .node-inner {
    animation: pulse 2s ease-in-out infinite;
}

.lesson-node.locked {
    border-color: #bdbdbd;
    background: #f5f5f5;
    opacity: 0.6;
}

.lock-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #bdbdbd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-size: 14px;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.lesson-node:hover:not(.locked) {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.lesson-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 2px;
}

.lesson-icon img {
    width: 100%;
    border-radius: 50%;
}

.lesson-number {
    font-size: 0.7rem;
    font-weight: bold;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 8px;
    position: absolute;
    bottom: -8px;
    right: -8px;
}

.mascot-guide {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    flex-direction: row;
}

.mascot-img {
    order: 1;
}

.speech-bubble {
    order: 2;
}

.mascot-img {
    width: 72px;
    height: auto;
}

.fa-star {
    color: #ffd93d;
}

.speech-bubble {
    position: relative;
    background: #fff;
    border: 2px solid var(--primary-color);
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 300px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    direction: ltr;
}

.speech-bubble.bubble-left:after {
    content: "";
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent var(--primary-color) transparent transparent;
}

.speech-bubble.bubble-top:after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

.speech-bubble.bubble-right:after {
    content: "";
    position: absolute;
    right: 62px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent var(--primary-color);
}

.typing-cursor {
    display: inline-block;
    width: 1px;
    height: 1em;
    background: #333;
    vertical-align: -0.1em;
    animation: blink 1s step-end infinite;
    margin-right: 2px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.typing-indicator {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.typing-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.4;
    animation: bounce 1.2s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Recommended Section */
.recommended-section {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.recommended-card {
    flex: 1;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.writing-card {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-color: #ff9800;
}

.review-card {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #2196f3;
}

.recommended-card:hover {
    /* transform: translateY(-5px); */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background: #ff9800;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.review-card .card-badge {
    background: #2196f3;
}

.card-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.card-icon {
    font-size: 2rem;
}

.card-text h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.card-text p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.card-number {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
}

/* Right Sidebar */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-section .btn-outline-success {
    color: #fff;
    outline: none !important;
    border: none !important;
}

.profile-section .btn-outline-success,
.unlock-card .btn-success {
    background-color: var(--primary-color) !important;
}

.course-info-card,
.unlock-card,
.goal-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.course-badge {
    background: var(--primary-color);
    color: #333;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.course-info-card h5 {
    color: var(--primary-color) !important;
    font-weight: 600;
    margin-bottom: 15px;
}

.course-progress-detailed {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.course-progress-detailed .progress-bar {
    flex: 1;
    height: 8px;
}

.course-progress-detailed .progress-text {
    font-size: 0.8rem;
}

.unlock-card {
    background: var(--bg-color);
    color: white;
    text-align: center;
}

.unlock-header h6 {
    color: var(--primary-color);
    margin: 0;
    font-weight: 500;
    opacity: 0.9;
}

.unlock-header h5 {
    color: var(--primary-color);
    margin: 5px 0;
    font-weight: 700;
}

.discount {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.mascot-unlock {
    position: absolute;
    bottom: 10px;
    left: 15px;
}

@media (max-width: 1200px) {
    .course-container {
        grid-template-columns: 250px 1fr 280px;
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .course-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar,
    .right-sidebar {
        position: static;
    }

    .recommended-section {
        flex-direction: column;
    }

    .lesson-path {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lesson-node {
        width: 50px;
        height: 50px;
    }

    .lesson-connector {
        width: 20px;
    }
}

@media (max-width: 768px) {
    .course-container {
        padding: 0 10px;
        margin: 10px auto;
    }

    .main-content,
    .sidebar,
    .right-sidebar {
        padding: 20px;
    }

    .part-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .lesson-path {
        justify-content: center;
    }

    .course-progress {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .course-title h2 {
        font-size: 1.5rem;
    }

    .part-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .lesson-node {
        width: 40px;
        height: 40px;
    }

    .lesson-icon {
        font-size: 1rem;
    }

    .mascot-large,
    .mascot-small {
        transform: scale(0.8);
    }
}

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 20px 20px;
    position: relative;
}

.login-container .login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideInScale 1s ease-out;
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-container .illustration-side {
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--primary-light));
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-container .globe-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}

.login-container .globe {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            var(--primary-light),
            var(--primary-color));
    border-radius: 50%;
    position: relative;
    animation: rotate 20s infinite linear;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.login-container .globe::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background-image: url("/imgs/logo.png");
    background-size: cover;
    background-repeat: no-repeat;
    animation: counterRotate 20s infinite linear;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes counterRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

.login-container .orbiting-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.login-container .orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    color: #fff;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate 15s infinite linear;
}

.login-container .orbit-1 {
    width: 250px;
    height: 250px;
    margin: -125px 0 0 -125px;
}

.login-container .orbit-2 {
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    animation-duration: 25s;
}

.login-container .orbit-item {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    animation: counterRotate 15s infinite linear;
}

.login-container .orbit-1 .orbit-item:nth-child(1) {
    top: -15px;
    left: 50%;
    margin-left: -15px;
    background: #f59e0b;
}

.login-container .orbit-1 .orbit-item:nth-child(2) {
    bottom: -15px;
    left: 50%;
    margin-left: -15px;
    background: #ec4899;
}

.login-container .orbit-2 .orbit-item:nth-child(1) {
    top: -15px;
    left: 50%;
    margin-left: -15px;
    background: #10b981;
    animation-duration: 25s;
}

.login-container .illustration-text {
    margin-top: 30px;
    text-align: center;
    color: white;
}

.login-container .illustration-title {
    font-family: "Fredoka", cursive;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    to {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
            0 0 30px rgba(255, 255, 255, 0.6);
    }
}

.login-container .illustration-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.login-container .form-side {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-container .form-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-container .logo {
    padding: 10px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: 20px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    animation: logoPulse 2s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.3);
}

.login-container .logo img {
    width: 100%;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.login-container .form-title {
    font-family: "Fredoka", cursive;
    font-size: 2.2rem;
    color: #1f2937;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-container .form-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.login-container .login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.login-container .form-group {
    position: relative;
}

.login-container .form-label {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-weight: 500;
    font-size: 0.9rem;
}

.login-container .form-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 1rem;
    font-family: "Poppins", sans-serif;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.login-container .form-input:focus {
    outline: none;
    border-color: #4a90e2;
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

.password-toggle i {
    position: absolute;
    left: -18px;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.login-container .form-icon {
    position: absolute;
    left: 18px;
    top: 65%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.login-container .form-input:focus+.form-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.login-container .password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.login-container .password-toggle:hover {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.login-container .checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.login-container .animated-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.login-container .animated-checkbox input {
    opacity: 0;
    position: absolute;
}

.login-container .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.login-container .animated-checkbox:hover .checkmark {
    border-color: var(--primary-color);
    background: #ebf4ff;
}

.login-container .animated-checkbox input:checked~.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.login-container .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-container .animated-checkbox input:checked~.checkmark::after {
    display: block;
    animation: checkmarkDraw 0.3s ease;
}

@keyframes checkmarkDraw {
    0% {
        height: 0;
    }

    100% {
        height: 12px;
    }
}

.login-container .checkbox-label {
    color: #1f2937;
    font-size: 0.9rem;
    cursor: pointer;
}

.login-container .login-btn {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border: none;
    border-radius: 16px;
    padding: 18px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.login-container .login-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.login-container .login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.4);
}

.login-container .login-btn:hover::before {
    left: 100%;
}

.login-container .login-btn:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .login-container .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .login-container .illustration-side {
        padding: 30px;
        order: 2;
    }

    .login-container .form-side {
        padding: 40px 30px;
        order: 1;
    }

    .login-container .globe-container {
        width: 150px;
        height: 150px;
    }

    .login-container .illustration-title {
        font-size: 2rem;
    }

    .login-container .orbit-1 {
        width: 200px;
        height: 200px;
        margin: -100px 0 0 -100px;
    }

    .login-container .orbit-2 {
        width: 250px;
        height: 250px;
        margin: -125px 0 0 -125px;
    }
}

.login-container .loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-container .success-checkmark {
    display: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    margin-left: 10px;
}

.login-container .success-checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.error-message {
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.already-registered-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.already-registered-link:hover {
    color: var(--primary-blue);
}

.terms-link,
.privacy-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.terms-link:hover,
.privacy-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.forgot-password-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.forgot-password-link:hover {
    color: var(--primary-blue);
}

.signup-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.signup-link:hover {
    opacity: 0.9;
}

/* Lesson */
.lesson-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 90px 20px 20px;
    z-index: 10;
}

.lesson-container .progress-container {
    position: relative;
    left: auto;
    transform: none;
    width: 90%;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    margin-bottom: 16px;
}

.lesson-container .progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin-left: 20px;
}

.lesson-container .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s ease;
}

.lesson-container .btn-close-lesson {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lesson-container .btn-close-lesson:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lesson-content {
    width: 100%;
    max-width: 450px;
    text-align: center;
    color: white;
    position: relative;
    z-index: 15;
    perspective: 1200px;
    margin-top: 0;
    margin-bottom: 20px;
}

.lesson-screen {
    display: none;
    animation: screenFadeInUp 0.5s ease;
}

.lesson-screen.active {
    display: block;
}

@keyframes screenFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flip-card-container {
    position: relative;
    background-color: transparent;
    width: 100%;
    max-width: 360px;
    height: 420px;
    margin: 0 auto 2.5rem;
}

.click-hand {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 1050;
    font-size: 24px;
    color: var(--primary-light);
    animation: clickHandAnimation 2s infinite;
    transform-origin: bottom center;
}

@keyframes clickHandAnimation {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(10px) scale(0.9);
        opacity: 0.8;
    }
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card-container.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.75rem 1.5rem 2.25rem;
}

.flip-card-front {
    background: #ffffff;
    color: var(--primary-color);
}

.flip-card-front .character-main {
    font-family: "Noto Sans Arabic", "Noto Sans JP", system-ui, sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
    text-shadow: none;
}

.flip-card-front .front-image {
    height: 250px;
    border-radius: 20px;
    object-fit: cover;
    background: #fff;
    margin-bottom: 10px;
}

.flip-card-front .hint-text {
    position: absolute;
    bottom: 18px;
    color: #6b7280;
    font-size: 0.95rem;
}

.flip-card-back {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--primary-color);
    transform: rotateY(180deg);
    justify-content: flex-start;
    padding-top: 3.5rem;
}

.btn-outline-light {
    border: 1px solid #fff !important;
}

.flip-card-back .back-letter {
    font-size: 5.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.flip-card-back .back-pron {
    font-size: 1.4rem;
    color: var(--primary-light);
    margin-top: 0.35rem;
}

.flip-card-back .back-hint {
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 1rem 0 0.5rem;
    color: #374151;
    text-align: center;
}

.audio-fab {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: radial-gradient(circle at 30% 30%,
            var(--primary-color),
            var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.15) inset;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.audio-fab:hover {
    transform: translateX(-50%) scale(1.06);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28),
        0 6px 12px rgba(0, 0, 0, 0.18) inset;
}

.lesson-text {
    margin-bottom: 2rem;
}

.lesson-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.lesson-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.lesson-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.lesson-actions .btn {
    min-width: 200px;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: none;
}

.lesson-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-teal {
    background-color: var(--primary-light) !important;
    color: #fff !important;
}

.btn-teal:hover {
    background-color: var(--primary-dark) !important;
    color: #fff !important;
}

.quiz-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    color: #333;
}

.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.quiz-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.quiz-badge {
    font-size: 0.85rem;
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 10px;
    border-radius: 9999px;
}

.quiz-question {
    margin-bottom: 1.5rem;
}

.quiz-question img {
    height: 200px;
}

.quiz-character {
    font-size: 5rem;
    font-family: "Noto Sans JP", sans-serif;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 992px) {
    .quiz-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.quiz-option {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
}

.quiz-option.quiz-option-text {
    font-size: clamp(2rem, 1.6vw + 1.2rem, 3.25rem);
    line-height: 1.1;
}

.quiz-option:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

.quiz-option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.quiz-option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.quiz-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 165, 0.15);
}

.option-audio {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-audio-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
}

.audio-shell {
    --prog: 0%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 999px;
    background: conic-gradient(from 0deg,
            var(--primary-color) var(--prog),
            rgba(255, 255, 255, 0.18) 0);
    box-shadow: 0 8px 18px rgba(20, 184, 166, 0.25);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.audio-shell.small {
    padding: 5px;
}

.audio-shell.playing {
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.35),
        0 0 0 6px rgba(20, 184, 166, 0.1) inset;
}

.quiz-question .audio-circle {
    width: 76px;
    height: 76px;
}

.audio-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg,
            var(--primary-color),
            var(--primary-light));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18),
        inset 0 -8px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.35);
    position: relative;
}

.audio-circle:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

.audio-circle.small {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}

@keyframes pulseAudio {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    }
}

.audio-circle.playing {
    animation: pulseAudio 1s ease-in-out infinite;
}

.audio-circle::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: radial-gradient(60% 60% at 50% 50%,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0));
    pointer-events: none;
}

.audio-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
}

.option-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    background: #fff;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.quiz-feedback {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
}

#quizFeedback {
    position: fixed;
    top: 78px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: calc(100% - 24px);
    max-width: 900px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#quizFeedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#quizFeedback.correct {
    background: #d4edda;
    color: #155724;
}

#quizFeedback.incorrect {
    background: #f8d7da;
    color: #721c24;
}

#quizScreen .lesson-actions {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
}

#quizScreen .lesson-actions .btn {
    min-width: 0;
    flex: 1;
    max-width: 260px;
}

@media (max-width: 576px) {
    #quizScreen {
        padding-bottom: 92px;
    }

    #quizFeedback {
        top: 74px;
    }

    #quizScreen .lesson-actions {
        position: sticky;
        bottom: 10px;
        z-index: 50;
        padding: 10px 0;
        background: transparent;
    }
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 15px;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ffc107;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .flip-card-container {
        height: 350px;
    }

    .flip-card-front .character-main {
        font-size: 5rem;
    }

    .quiz-character {
        font-size: 3.5rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .completion-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

.lesson-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.lesson-background .bg-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.lesson-background .bg-circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.lesson-background .bg-circle-2 {
    width: 200px;
    height: 200px;
    background: #ffa726;
    top: 60%;
    right: 15%;
    animation: float 8s ease-in-out infinite 2s;
}

.lesson-background .bg-circle-3 {
    width: 150px;
    height: 150px;
    background: #ff8a65;
    bottom: 20%;
    left: 20%;
    animation: Circlefloat 7s ease-in-out infinite 4s;
}

@keyframes Circlefloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.exam-page {
    font-family: var(--font-family);
    background: var(--gradient);
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.exam-page .exam-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.exam-page .exam-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.exam-page .close-btn {
    color: var(--bg-body);
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.3s;
}

.exam-page .close-btn:hover {
    transform: scale(1.2);
    color: #ef4444;
}

.exam-page .progress-bar-container {
    flex-grow: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.exam-page .progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient);
    border-radius: 20px;
    transition: width 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.exam-page .progress-bar-fill::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("/imgs/hansla.png");
    background-size: contain;
    background-repeat: no-repeat;
}

.exam-page .question-card {
    background: var(--bg-color) !important;
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-light);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transition: transform 0.3s;
}

.exam-page .question-card:hover {
    transform: translateY(-5px);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.exam-page .question-header {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
}

.exam-page .question-content {
    text-align: center;
    margin-bottom: 2rem;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.exam-page .question-content img {
    max-width: 200px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.exam-page .question-content img:hover {
    transform: scale(1.05);
}

.exam-page .question-content audio {
    width: 100%;
    max-width: 300px;
}

.exam-page .question-content p {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
}

.exam-page .options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.exam-page .option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border-radius: 16px;
    border: 2px solid var(--primary-light);
    background: var(--bg-body);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.exam-page .option-label::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0.1;
    transition: left 0.3s;
}

.exam-page .option-label:hover::before {
    left: 0;
}

.exam-page .option-label:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.exam-page .option-input {
    display: none;
}

.exam-page .option-input:checked+.option-label {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    color: var(--primary-blue);
    animation: glowExam 1s infinite alternate;
}

@keyframes glowExam {
    0% {
        box-shadow: 0 0 10px var(--primary-light);
    }

    100% {
        box-shadow: 0 0 20px var(--p);
    }
}

.exam-page .option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exam-page .option-content img {
    max-width: 100px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.exam-page .option-content img:hover {
    transform: scale(1.1);
}

.exam-page .option-content audio {
    height: 40px;
}

.exam-page .submit-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.exam-page .submit-btn {
    padding: 1rem 3rem;
    border-radius: 50px;
    background: var(--gradient);
    color: var(--bg-body);
    font-weight: 700;
    font-size: 1.2rem;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.exam-page .submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.3s;
}

.exam-page .submit-btn:hover::before {
    left: 0;
}

.exam-page .submit-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.exam-page .submit-btn:active {
    transform: scale(0.95);
}

/* Test Result */
.test-result .background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.test-result .shape {
    position: absolute;
    list-style: none;
    display: block;
    background: rgba(139, 92, 246, 0.1);
    animation: resultAnimate 20s linear infinite;
    bottom: -150px;
}

.test-result .shape:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.test-result .shape:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.test-result .shape:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.test-result .shape:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.test-result .shape:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.test-result .shape:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

@keyframes resultAnimate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

.test-result .result-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 1rem;
}

.test-result .summary-card {
    background: var(--bg-color);
    border-radius: 32px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    margin-bottom: 3rem;
    position: relative;
    border: 1px solid #e5e7eb;
    animation: pop-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.test-result .summary-card .level-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.test-result .summary-card .stars {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.test-result .summary-card .stars .star.filled {
    color: #f59e0b;
    display: inline-block;
    transform-origin: center;
    animation: star-pop 0.5s cubic-bezier(0.785, 0.135, 0.15, 0.86) forwards;
}

@keyframes star-pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.test-result .summary-card .result-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.test-result .summary-card .progress-bar {
    height: 16px;
    background-color: #e5e7eb;
    border-radius: 16px;
    width: 80%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
}

.test-result .summary-card .progress-fill {
    height: 100%;
    border-radius: 16px;
    transition: width 1s ease-out;
    background: linear-gradient(90deg,
            var(--primary-light),
            var(--primary-color));
}

.test-result .summary-card .time-taken {
    font-weight: 600;
    color: var(--text-light);
}

.test-result .review-header {
    color: var(--bg-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.test-result .review-card {
    background: var(--bg-color);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.test-result .review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07);
}

.test-result .review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.test-result .review-card-header .question-num {
    font-weight: 700;
    font-size: 1.1rem;
}

.test-result .review-card-header .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.test-result .review-card-header .status-badge.correct {
    background-color: #d1fae5;
    color: #065f46;
}

.test-result .review-card-header .status-badge.incorrect {
    background-color: #fee2e2;
    color: #991b1b;
}

.test-result .question-content {
    text-align: center;
    padding: 1rem 0;
}

.test-result .question-content img {
    max-width: 120px;
    border-radius: 12px;
}

.test-result .question-content audio {
    width: 100%;
    max-width: 220px;
}

.test-result .options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.test-result .option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.test-result .option-item.correct-answer {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.test-result .option-item.user-answer.incorrect {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.test-result .option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.test-result .option-content img {
    max-width: 60px;
    border-radius: 8px;
}

.test-result .option-content audio {
    height: 35px;
}

.test-result .option-label {
    font-weight: 600;
}

.test-result .answer-indicator i {
    font-size: 1.25rem;
}

.test-result .answer-indicator .bi-check-circle-fill {
    color: #10b981;
}

.test-result .answer-indicator .bi-x-circle-fill {
    color: #ef4444;
}

.test-result .actions {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.test-result .btn {
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.test-result .btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.test-result .btn-success {
    background: #10b981;
    color: var(--text-light);
}

.test-result .btn-primary {
    background: var(--bg-color) !important;
    color: var(--primary-color) !important;
}

.test-result .btn-secondary {
    background: var(--primary-light) !important;
    color: var(--bg-color) !important;
}

.lesson-container {
  max-width: 900px;
  margin: 0 auto 0 !important;
  padding: 16px;
}

.lesson-background { position: relative; }

.progress-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.btn-close-lesson { color: #333; font-weight: 700; background: #fff; border-radius: 10px; padding: 6px 10px; }
.progress-bar { flex: 1; height: 10px; background: rgba(255,255,255,.5); border-radius: 999px; margin-inline-start: 10px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--gradient); border-radius: inherit; transition: width .3s ease; }

.lesson-content { display: block; }
.lesson-screen { display: none; }
.lesson-screen.active { display: block; }
.lesson-actions { text-align: center; margin-top: 16px; }

.flip-card-container { width: 100%; max-width: 420px; height: 460px; margin: 10px auto; perspective: 1000px; position: relative; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.flip-card-container.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
  position: absolute; inset: 0; background: #fff; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.flip-card-back { transform: rotateY(180deg); }

.front-image { max-width: 85%; height: auto; margin-bottom: 12px; border-radius: 12px; }
.character-main { font-size: 6rem; line-height: 1; color: var(--primary-color); font-weight: 800; }
.hint-text small { color: #666; }
.click-hand { position: absolute; bottom: 16px; right: 16px; color: #bbb; font-size: 1.25rem; }

/* Back content */
.back-animated-image { max-width: 85%; height: auto; margin-bottom: 12px; border-radius: 12px; }
.back-letter { font-size: 5rem; line-height: 1; color: var(--primary-color); font-weight: 800; margin-bottom: 10px; }
.back-pron { font-size: 1.1rem; font-weight: 700; color: #111; margin-top: 8px; margin-bottom: 8px; }
.back-hint { font-size: .98rem; color: #444; line-height: 1.5; max-width: 95%; }
.back-hint i, .back-pron i { margin-inline-end: 6px; color: var(--primary-color); }
.back-hint span, .back-pron span { display: inline; }

.back-hint.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }

.audio-fab { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; border: none; background: var(--primary-color); color: #fff; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.audio-fab i { pointer-events: none; }