[x-cloak] {
    display: none !important;
}

/* Hide the floating app switcher on the first 3 onboarding screens */
body.page-home #flating-app-switcher,
body.page-product-select #flating-app-switcher {
    display: none !important;
}

html,
body {
    overflow-x: hidden;
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.nav-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.step-connector::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #7c3aed);
    transform: translateY(-50%);
}

.sentence-pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    border-bottom: 1px dashed #909398;
    padding: 10px 0;
    border-radius: 10px;
    transition: background 0.3s, box-shadow 0.3s;
}
.sentence-pair.playing {
    background: rgba(59, 130, 246, 0.06);
    box-shadow: inset 0 0 0 2px #3b82f6;
    border-bottom-color: transparent;
    animation: play-pulse 1.2s ease-in-out infinite;
}
.sentence-pair.playing + .sentence-pair { border-top: none; }
@keyframes play-pulse {
    0%, 100% { box-shadow: inset 0 0 0 2px #3b82f6, 0 0 0 0 rgba(59,130,246,0); }
    50% { box-shadow: inset 0 0 0 2px #60a5fa, 0 0 12px 2px rgba(59,130,246,0.18); }
}
.audio-btn.btn-playing img {
    animation: spin-play 1s linear infinite;
}
@keyframes spin-play {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.sentence-pair > div {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}
.sentence-pair:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    .sentence-pair {
        gap: 15px;
        padding: 6px 0;
                display: flex;
        flex-direction: column;
    }
    .sentence-pair > div span {
    }
}

#sentenceBox {
    max-height: 335px;
    overflow-y: auto;
    border: 1px dashed #000;
}

#sentenceBox::-webkit-scrollbar {
    width: 4px;
}

#sentenceBox::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 4px;
}

#sentenceStats {
    background: #f0f3f8;
    border: 1px dashed #eaebef;
    padding-top: 5px;
    border-radius: 5px;
    padding: 10px;
}

header.nav-glass {
    background: #f0f6f6;
}
.home-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    background: #fff;
}
.welcome-box {
    background: white;
    border-radius: 0;
    padding: 0;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}
.welcome-heading {
    font-size: 18px;
    color: #000;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}
.welcome-title {
    font-size: 25px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 2rem;
    line-height: 1.2;
}
.languages-circle {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}
@media (max-width: 640px) {
    .welcome-box {
        padding: 2rem 1.5rem;
    }
    .welcome-title {
        font-size: 2rem;
    }
    .product-box .avatar-circle,
    .level-box .avatar-circle {
        width: 120px;
        height: 120px;
    }
    .language-tag {
        font-size: 0.75rem;
    }
}

.product-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    background: #fff;
}
.product-box {
    background: white;
    border-radius: 2rem;
    padding: 3rem 2rem;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}
.product-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2rem;
}
/* Consolidated avatar styles */
.avatar-circle {
    border-radius: 50%;
    background: #ffd992;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem;
    overflow: hidden;
}
.product-box .avatar-circle {
    width: 240px;
    height: 240px;
}
.level-box .avatar-circle {
    width: 240px;
    height: 240px;
}
.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.product-btn {
    padding: 9px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.product-btn-primary {
    background: #ffba55;
    color: #000;
}
.product-btn-secondary {
    background: #34efda;
    color: #000;
}
.product-btn-start {
    background: #81dcef;
    color: #000;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.product-btn-start:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.product-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}
@media (max-width: 640px) {
    .product-box {
        padding: 2rem 1.5rem;
    }
    .product-heading {
        font-size: 1.125rem;
    }
    .product-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

.level-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    background: #fff;
}
.level-box {
    background: white;
    border-radius: 2rem;
    padding: 3rem 2rem;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}
.level-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2rem;
}
/* avatar size handled via .level-box .avatar-circle */

.home-hero-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

@media (max-width: 600px) {
    .home-container,
    .product-container,
    .level-container {
        padding: 0.5rem 0.75rem;
        height: calc(80vh - 60px);
        height: calc(80dvh - 60px);
        min-height: 0;
        overflow: hidden;
    }
    .welcome-box,
    .product-box,
    .level-box {
        padding: 1.5rem 1rem;
        border-radius: 1.25rem;
    }
    .welcome-heading {
        font-size: 15px;
    }
    .welcome-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    .languages-circle {
        margin: 0;
    }
    .home-hero-img {
        max-width: 300px;
    }
    .product-box .avatar-circle,
    .level-box .avatar-circle {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }
    .product-btn-start {
        margin-top: 1rem;
    }
    .product-heading,
    .level-heading {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .product-buttons,
    .level-buttons {
        align-items: center;
    }

    #sentenceBox {
        max-height: 220px;
    }

    .product-btn {
        min-width: 185px;
    }
}
