:root {
    --green: #58cc02;
    --green-dark: #46a302;
    --bg: #ffffff;
    --text: #3c3c3c;
    --muted: #9ca3af;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(0,0,0,0.06);
    --radius-xl: 28px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    min-height: 100vh;
}

body {
    width: 100%;
    overflow-x: hidden;
}

.app {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-wrapper {
    width: 100%;
}

.logo-area {
    text-align: center;
    margin-bottom: 42px;
}

.logo-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 22px auto;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    box-shadow: inset 0 -6px 0 rgba(0,0,0,0.12);
}

h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    margin-top: 10px;
    font-size: 15px;
    color: var(--muted);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow);
}

.input-group {
    margin-bottom: 18px;
}

input {
    width: 100%;
    height: 58px;
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 0 18px;
    font-size: 16px;
    background: #fff;
    transition: 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(88,204,2,0.15);
}

button {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 18px;
    background: var(--green);
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.06s ease, background 0.2s ease;
}

button:hover {
    background: var(--green-dark);
}

button:active {
    transform: scale(0.98);
}

#errorBox {
    min-height: 20px;
    margin-top: 18px;
    text-align: center;
    color: #e53935;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 480px) {
.app {
    padding: 18px;
}

.login-card {
    padding: 22px;
}

h1 {
    font-size: 28px;
}
}

/* =========================================
   APP
========================================= */

.hidden {
    display: none !important;
}

.app-shell {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 24px 20px 120px 20px;
}

/* =========================================
   HEADER
========================================= */

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.welcome-label {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 4px;
}

.welcome-name {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logout-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: white;
    border: none;
    box-shadow: var(--shadow);
    font-size: 20px;
    cursor: pointer;
}

/* =========================================
   DAILY CARD
========================================= */

.daily-card {
    background: white;
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

.daily-top {
    font-size: 14px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 12px;
}

.daily-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
}

.daily-subtitle {
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 22px;
}

.primary-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 18px;
    background: var(--green);
    color: white;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}

/* =========================================
   STATS
========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 22px;
    padding: 18px 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
}

/* =========================================
   SECTION
========================================= */

.section-header {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 18px;
}

/* =========================================
   LESSONS
========================================= */

.lesson-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lesson-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.12s ease;
}

.lesson-card:active {
    transform: scale(0.98);
}

.lesson-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.lesson-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.lesson-count {
    color: var(--muted);
}

/* =========================================
   APP SHELL
========================================= */

.mobile-app {
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.mobile-app::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 8% 12%, rgba(88,204,2,0.10) 0 18px, transparent 19px), radial-gradient(circle at 14% 22%, rgba(0,180,120,0.07) 0 10px, transparent 11px), radial-gradient(circle at 22% 30%, rgba(0,180,120,0.08) 0 12px, transparent 13px), radial-gradient(circle at 35% 18%, rgba(88,204,2,0.07) 0 26px, transparent 27px), radial-gradient(circle at 52% 10%, rgba(0,180,120,0.08) 0 10px, transparent 11px), radial-gradient(circle at 68% 22%, rgba(88,204,2,0.09) 0 16px, transparent 17px), radial-gradient(circle at 74% 8%, rgba(88,204,2,0.06) 0 32px, transparent 33px), radial-gradient(circle at 82% 14%, rgba(0,180,120,0.07) 0 22px, transparent 23px), radial-gradient(circle at 92% 34%, rgba(88,204,2,0.08) 0 14px, transparent 15px), radial-gradient(circle at 6% 46%, rgba(0,180,120,0.08) 0 14px, transparent 15px), radial-gradient(circle at 12% 52%, rgba(0,180,120,0.08) 0 28px, transparent 29px), radial-gradient(circle at 18% 68%, rgba(88,204,2,0.06) 0 12px, transparent 13px), radial-gradient(circle at 28% 64%, rgba(88,204,2,0.07) 0 14px, transparent 15px), radial-gradient(circle at 42% 56%, rgba(0,180,120,0.07) 0 20px, transparent 21px), radial-gradient(circle at 48% 48%, rgba(0,180,120,0.06) 0 18px, transparent 19px), radial-gradient(circle at 62% 58%, rgba(88,204,2,0.09) 0 12px, transparent 13px), radial-gradient(circle at 70% 44%, rgba(88,204,2,0.06) 0 24px, transparent 25px), radial-gradient(circle at 78% 72%, rgba(0,180,120,0.08) 0 34px, transparent 35px), radial-gradient(circle at 90% 54%, rgba(88,204,2,0.07) 0 16px, transparent 17px), radial-gradient(circle at 6% 82%, rgba(88,204,2,0.09) 0 40px, transparent 41px), radial-gradient(circle at 22% 92%, rgba(0,180,120,0.08) 0 16px, transparent 17px), radial-gradient(circle at 38% 86%, rgba(88,204,2,0.07) 0 22px, transparent 23px), radial-gradient(circle at 46% 74%, rgba(0,180,120,0.06) 0 10px, transparent 11px), radial-gradient(circle at 58% 94%, rgba(0,180,120,0.06) 0 12px, transparent 13px), radial-gradient(circle at 74% 88%, rgba(88,204,2,0.08) 0 28px, transparent 29px), radial-gradient(circle at 84% 96%, rgba(0,180,120,0.07) 0 14px, transparent 15px), radial-gradient(circle at 92% 82%, rgba(0,180,120,0.08) 0 18px, transparent 19px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* =========================================
   HEADER
========================================= */

.app-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 74px;
    background: rgb(124, 231, 124);
    backdrop-filter: blur(16px);
    border-bottom: 7px solid rgba(88,204,2,0.50);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 1000;
    box-shadow:0 8px 24px rgba(88,204,2,0.10);
}

.header-left,
.header-right,
.header-center {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 10px;
}

.header-user-pill,
.header-pill {
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: rgba(255,255,255);
    border: 1px solid #6ad93f;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.header-user-pill {
    gap: 10px;
    min-width: 120px;
}

.header-pill svg,
.header-user-pill svg {
    width: 18px;
    height: 18px;
}

.header-pill:first-child svg {
    stroke: #ff7a00;
    fill: #ff7a00;
    animation: flamePulse 1.8s ease-in-out infinite;
}
#headerXpPill svg {
    stroke: #f5b301;
    fill: #f5b301;
    animation: flamePulse 1.8s ease-in-out infinite;
}
@keyframes flamePulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.header-flag {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.header-streak,
.header-center {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 15px;
}

.header-inline-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-user-name {
    font-family: "Indie Flower";
    display: flex;
    align-items: center;
    height: 42px;
    padding-left: 4px;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    white-space: nowrap;
}

.menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn svg {
    width: 22px;
    height: 22px;
    stroke: #3c3c3c;
    stroke-width: 2.5;
}

.profile-badge {
    background: var(--green);
    color: white;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

/* =========================================
   CONTENT
========================================= */

.app-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 100px 20px 110px 20px;
}

/* =========================================
   FOOTER
========================================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 88px;
    background: #ffffff;
    backdrop-filter: blur(18px);
    border-top: 7px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    border: none;
    background: transparent;
    text-decoration: none;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-item:hover {
    background: transparent;
}

.nav-item.active {
    color: var(--green);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-icon-pinboard {
    position: relative;
}

.pinboard-notification-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ff3b30;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 4px rgba(255,59,48,0.15);
    animation: pinboardDotPulse 1.8s infinite;
}

.pinboard-notification-dot.hidden {
    display: none;
}

@keyframes pinboardDotPulse {

    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================================
   HERO CARD
========================================= */

.hero-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    min-height: 220px;
    padding: 24px;
    border-radius: 34px;
    background: transparent;
    box-shadow: 0;
}

.hero-card::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(88,204,2,0.10) 0%,
        transparent 72%
    );
}

.hero-mascot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.hero-mascot img {
    width: 155px;
    height: auto;
    display: block;
    object-fit: contain;
}

.hero-speech {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 23px 22px;
    border-radius: 28px;
    background: white;
    border: 2px solid #eef2f1;
    box-shadow: 0 10px 24px rgba(0,0,0,0.05);
    margin-bottom: 45px;
}

.hero-speech::before {
    content: "";
    position: absolute;
    left: -10px;
    bottom: 28px;
    width: 22px;
    height: 22px;
    background: white;
    border-left: 2px solid #eef2f1;
    border-bottom: 2px solid #eef2f1;
    transform: rotate(45deg);
    bottom: 75px;
}

.hero-top {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #58cc02;
}

.hero-title {
    margin-top: 0px;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    line-height: 1.4;
    color: #a9a9a9;
}

@media (max-width: 640px) {

    .hero-card {
        align-items: center;
        flex-direction: column;
        text-align: center;
        padding: 0;
        gap: 0;
        min-height: auto;
    }

    .hero-mascot img {
        width: 150px;
        margin-bottom: 15px;
    }

    .hero-speech {
        width: 100%;
        margin-bottom: 5px;
    }

    .hero-speech::before {
       display: none;
    }

    .home-level-card {
        margin-top: 8px;
    }


 
}
 

/* =========================================
   PLACEHOLDER
========================================= */

.placeholder-view h1 {
    margin-top: 0;
    font-size: 32px;
}

/* =========================================
   OVERLAY
========================================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: 0.22s ease;
    z-index: 900;
}

.menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   SIDE MENU
========================================= */

.side-menu {
    position: fixed;
    top: 74px;
    right: 0;
    width: 280px;
    height: calc(100vh - 74px);
    background: white;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    z-index: 1999;
    box-shadow: -10px 0 30px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
}

.side-menu.open {
    transform: translateX(0);
}

/* =========================================
   MENU HEADER
========================================= */

.side-menu-header {
    padding: 28px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.side-menu-title {
    font-size: 24px;
    font-weight: 800;
}

/* =========================================
   MENU CONTENT
========================================= */

.side-menu-content {
    padding: 18px;
}

.side-menu-item {
    width: 100%;
    height: 58px;
    border: none;
    background: transparent;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.16s ease;
    color: var(--text);
}

.side-menu-item:hover {
    background: rgba(88,204,2,0.08);
}

.side-menu-item svg {
    stroke: currentColor;
}

.logout-item {
    margin-top: 16px;
    color: #e53935;
}

/* =========================================
   VOCAB VIEW
========================================= */

.vocab-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================================
   SEARCH
========================================= */

.vocab-search-wrapper {
    position: sticky;
    top: 88px;
    z-index: 20;
}

.vocab-search {
    height: 58px;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(14px);
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.vocab-search svg {
    width: 20px;
    height: 20px;
    stroke: #9ca3af;
}

.vocab-search input {
    border: none;
    background: transparent;
    height: auto;
    padding: 0;
    box-shadow: none;
    font-size: 16px;
}

.vocab-search input:focus {
    border: none;
    box-shadow: none;
}

.vocab-favorite-indicator svg {
    fill: #f59e0b;
    color: #f59e0b;
}

/* =========================================
   FILTER
========================================= */

.vocab-filter-row {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.vocab-filter {
    width: auto;
    height: 42px;
    padding: 0 18px;
    border-radius: 13px;
    background: rgba(255,255,255,0.72);
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    white-space: nowrap;
}

.vocab-filter.active {
    background: var(--green);
    color: white;
}

/* =========================================
   LIST
========================================= */

.vocab-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* =========================================
   ITEM
========================================= */

.vocab-item {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    border-radius: 26px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 2px solid #e5e7eb;
}

.vocab-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.vocab-spanish {
    font-size: clamp(20px, 5vw, 22px);
    font-weight: 800;
    line-height: 1.02;
    word-break: break-word;
    overflow-wrap: break-word;
}
.vocab-favorite-indicator {
    display: inline-flex;
    vertical-align: middle;
    margin-left: -4px;
    transform: translateY(-8px);
}

.vocab-favorite-indicator svg {
    width: 12px;
    height: 12px;
    fill: #f59e0b;
    color: #f59e0b;
}

.vocab-german {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 12px;
}

.vocab-type {
    width: fit-content;
    height: 32px;
    padding: 0 14px;
    border-radius: 7px;
    background: rgba(88,204,2,0.10);
    color: var(--green-dark);
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
}

.vocab-info-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(88,204,2,0.08);
    color: var(--green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.vocab-info-btn svg {
    width: 20px;
    height: 20px;
}

.vocab-info-btn:hover {
    background: rgba(88,204,2,0.14);
    color: var(--green-dark);
}

/* =========================================
   SPANISH ROW
========================================= */

.vocab-spanish-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

/* =========================================
   AUDIO BUTTON
========================================= */

.vocab-audio-btn {
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: #2ea7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
}
.vocab-audio-btn:hover {
    background: transparent;
}

.vocab-audio-btn svg {
    width: 18px;
    height: 18px;
}

/* =========================================
   VOCAB HERO CARD
========================================= */

.vocab-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 26px;
    border-radius: 36px;
    background: linear-gradient(
        135deg,
        #ea4aaa 0%,
        #c92f8f 100%
    );
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.vocab-hero-card::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,255,255,0.14) 0%,
        transparent 72%
    );
}

.vocab-hero-content {
    position: relative;
    z-index: 2;
    max-width: 68%;
}

.vocab-hero-title {
    font-size: clamp(30px, 5vw, 40px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.05em;
    color: white;
}

.vocab-hero-subtitle {
    margin-top: 1px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    color: rgba(255,255,255,0.84);
}

.vocab-hero-icon {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    border-radius: 30px;
    background: rgba(255,255,255,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.vocab-hero-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.12);
}

.vocab-hero-icon svg {
    width: 50px;
    height: 50px;
    color: white;
    stroke-width: 2.2;
    opacity: 0.94;
}

@media (max-width: 640px) {

    .vocab-hero-card {
        min-height: 160px;
        padding: 22px;
        border-radius: 30px;
    }

    .vocab-hero-content {
        max-width: 66%;
    }

    .vocab-hero-title {
        font-size: 28px;
    }

    .vocab-hero-subtitle {
        margin-top: 10px;
        font-size: 14px;
    }

    .vocab-hero-icon {
        width: 78px;
        height: 78px;
        border-radius: 24px;
    }

    .vocab-hero-icon::before {
        border-radius: 24px;
    }

    .vocab-hero-icon svg {
        width: 40px;
        height: 40px;
    }
}
/* =========================================
   SUBJECT SELECT
========================================= */

.vocab-subject-select {
    position: relative;
}

.vocab-subject-btn {
    width: 100%;
    height: 58px;
    border-radius: 24px;
    background: rgba(255,255,255,0.82);
    border: 2px solid #e5e7eb;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1f2937;
    box-shadow: none;
}

.vocab-subject-btn:hover {
    background: rgba(255,255,255,0.92);
}

.vocab-subject-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
}

/* =========================================
   SUBJECT OVERLAY
========================================= */

.subject-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.30);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 3000;
}

.subject-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   SUBJECT SHEET
========================================= */

.subject-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(100%);
    background: #ffffff;
    border-radius: 32px 32px 0 0;
    padding: 24px;
    padding-bottom: 120px;
    transition: 0.26s ease;
    z-index: 3001;
    max-height: 70vh;
    overflow-y: auto;
}

.subject-sheet.show {
    transform: translateY(0);
}

/* =========================================
   SUBJECT HEADER
========================================= */

.subject-sheet-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

/* =========================================
   SUBJECT LIST
========================================= */

.subject-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subject-item {
    width: 100%;
    height: 56px;
    border-radius: 18px;
    background: #f8f8f8;
    color: #1f2937;
    justify-content: flex-start;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
}

.subject-item.active {
    background: rgba(88,204,2,0.12);
    color: var(--green-dark);
}


.subject-reset-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 14px;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: 0.2s;
    z-index: 5;
    opacity: 0.3;
}

.subject-reset-btn:hover {
    background: #fff;
    opacity: 0.8;
}

.reset-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.reset-modal {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 28px;
    padding: 28px;
    text-align: center;
}

.reset-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 20px;
    background: #fef3c7;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
}

.reset-text {
    color: #64748b;
    line-height: 1.6;
}

.reset-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.reset-actions button {
    flex: 1;
    height: 52px;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
}

.reset-cancel-btn {
    background: #e2e8f0;
}

.reset-confirm-btn {
    background: #ef4444;
    color: white;
}


/* =========================================
   SCROLL TOP
========================================= */

.scroll-top-btn {
    position: fixed;
    right: 22px;
    bottom: 110px;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    border: none;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: 0.22s ease;
    z-index: 4000;
}

.scroll-top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-btn svg {
    width: 22px;
    height: 22px;
    stroke: #3c3c3c;
}

/* =========================================
   VOCAB OVERLAY
========================================= */

.vocab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: 0.22s ease;
    z-index: 5000;
}

.vocab-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   VOCAB SHEET
========================================= */

.vocab-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9f7;
    border-radius: 34px 34px 0 0;
    transform: translateY(100%);
    transition: 0.26s ease;
    z-index: 5001;
    height: 82vh;
    overflow-y: auto;
    padding-bottom: 120px;
}

.vocab-sheet.show {
    transform: translateY(0);
}

/* =========================================
   HANDLE
========================================= */

.vocab-sheet-handle {
    width: 64px;
    height: 6px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 14px auto 22px auto;
}

/* =========================================
   CONTENT
========================================= */

.vocab-sheet-content {
    padding: 0 22px;
}

/* =========================================
   DETAIL HEADER
========================================= */

.vocab-detail-header {
    background:rgba(255,255,255,0.55);;
    margin: -22px -22px 26px -20px;
    padding:  24px 22px 28px 22px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.vocab-detail-top {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    position: relative;
}

.vocab-detail-word {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 6px;
    font-size: clamp(20px, 6vw, 38px);
    font-weight: 600;
    letter-spacing: -1.2px;
    line-height: 1.05;
    color: #1f2937;
    word-break: break-word;
    overflow-wrap: break-word;
}

.vocab-detail-translation {
    font-size: clamp(16px, 4vw, 22px);
    color: #6b7280;
    margin-bottom: 1px;
    font-weight: 600;
    transform: translateY(-15px);
}

.vocab-detail-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.vocab-badge {
    height: 30px;
    padding: 0 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    font-family: "Inter", sans-serif;
    font-size: clamp(10px, 2.4vw, 13px);
    font-weight: 500;
    letter-spacing: 0.2px;
    border: 1px solid #f1f1f1;
}

.vocab-badge-type {
    background: rgba(88,204,2,0.12);
    color:var(--green-dark);
}

.vocab-badge-subject {
    background: rgba(234,74,170,0.14);
    color:#d63384;
}

.vocab-detail-date {
    font-size: 14px;
    color: #9ca3af;
}

/* =========================================
   DETAIL BUTTONS
========================================= */
.vocab-detail-audio {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    color: #1cb0f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
}

.vocab-detail-audio:hover {
    background: transparent;
}

.vocab-detail-favorite {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background:  rgba(0,0,0,0.04);
    color: #3c3c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.vocab-detail-favorite.active {
    color: #f59e0b;
}

.vocab-detail-favorite.active svg {
    fill: currentColor;
}

.vocab-detail-favorite:hover {
    background: rgba(0,0,0,0.08);
}

/* =========================================
   TABS
========================================= */

.vocab-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 24px;
    padding-bottom: 0px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    border: 2px solid #f1f1f1;
}

.vocab-tab {
    width: auto;
    height: 44px;
    padding: 0 18px;
    border-radius: 0px;
    background:transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.vocab-tab.active {
    background: var(--green);
    color: white;
}

/* =========================================
   TAB CONTENT
========================================= */

.vocab-tab-pane {
    display: none;
    background: white;
    border-radius: 0px;
    padding: 24px;
    border: 2px solid #f1f1f1;
    box-shadow: none;
    padding-bottom: 40px;
}

.vocab-tab-pane.active {
    display: block;
}

/* =========================================
   INFO TAB
========================================= */

.vocab-info-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vocab-info-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #9ca3af;
}

.vocab-info-text {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

/* =========================================
   CONJUGATION
========================================= */

.vocab-conjugation-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.conjugation-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.conjugation-person {
    min-width: 92px;
    background: rgba(88,204,2,0.12);
    color: #16a34a;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-transform: capitalize;
    text-align: center;
}

.conjugation-form {
    flex: 1;
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 800;
    color: #106993;
    word-break: break-word;
    overflow-wrap: break-word;
}

.conjugation-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.conjugation-group {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
}

.conjugation-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-top: -4px;
}

.conjugation-audio-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #1cb0f6;
}

.conjugation-audio-btn:hover {
    background: transparent;
}

.conjugation-audio-btn svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   HOME SUBJECTS
========================================= */

.home-subjects {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

/* =========================================
   SUBJECT CARD
========================================= */

.subject-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #1cb0f6;
    padding: 26px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

/* =========================================
   CONTENT
========================================= */

.subject-hero-content {
    position: relative;
    z-index: 2;
}

/* =========================================
   TITLE
========================================= */

.subject-hero-title {
    font-size: clamp(24px, 5vw, 34px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    color: white;
    margin-bottom: 15px;
    transform: translateZ(0);
}

/* =========================================
   SUBTITLE
========================================= */

.subject-hero-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    margin-bottom: 22px;
}

/* =========================================
   PROGRESS
========================================= */

.subject-progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    overflow: hidden;
    margin-bottom: 24px;
    margin-top: 18px;
}

.subject-progress-bar {
    width: 42%;
    height: 100%;
    background: white;
    border-radius: 999px;
}

/* =========================================
   ACTIONS
========================================= */

.subject-hero-actions {
    display: flex;
    gap: 12px;
}

/* =========================================
   BUTTONS
========================================= */

.subject-secondary-btn,
.subject-primary-btn {
    flex: 1;
    width: auto;
    height: 52px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 800;
}

.subject-secondary-btn {
    background: rgba(255,255,255,0.18);
    color: white;
    backdrop-filter: blur(8px);
}

.subject-secondary-btn:hover {
    background: rgba(255,255,255,0.24);
}

.subject-primary-btn {
    background: white;
    color: #1cb0f6;
}

.subject-primary-btn:hover {
    background: #f3f4f6;
}

.subject-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 10px;
}

.subject-hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
}

.subject-hero-stat svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.55));
}

.subject-hero-stat.mastered svg {
    stroke: #ffd54a;
    fill: #ffd54a;
    filter:drop-shadow(0 0 6px rgba(255,213,74,0.45));
}

/* =========================================
   ICON
========================================= */

.subject-hero-icon {
    position: absolute;
    right: 20px;
    bottom: 120px;
    opacity: 0.10;
}

.subject-hero-icon svg {
    width: 100px;
    height: 100px;
    stroke-width: 1.5;
    color: white;
}

/* =========================================
   FAVORITES CARD
========================================= */

.favorites-card {
    margin-top: 24px;
    border-radius: 32px;
    padding: 24px;
    background: linear-gradient( 135deg, #f59e0b, #f97316 );
    color: white;
    overflow: hidden;
    position: relative;
}

.favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.favorites-title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 2px;
}

.favorites-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
}

.favorites-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.favorites-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.favorites-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 9px;
    padding: 0;
    background: rgba(255,255,255,0.14);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s ease;
}
.favorites-nav-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.8;
}
.favorites-nav-btn:hover {
    background: rgba(255,255,255,0.22);
}

.favorites-icon {
    opacity: 0.14;
}

.favorites-icon svg {
    width: 82px;
    height: 82px;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.favorite-item {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.favorite-audio-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255,255,255,0.18);
    color: white;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-audio-btn:hover {
    background: rgba(255,255,255,0.24);
}

.favorite-spanish {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.05;
}

.favorite-german {
    font-size: 14px;
    color: rgba(255,255,255,0.82);
}

.favorites-open-btn {
    margin-top: 22px;
    height: 56px;
    border-radius: 20px;
    background: white;
    color: #f97316;
    font-size: 16px;
    font-weight: 800;
    border: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.favorites-open-btn:hover {
    background: rgba(255,255,255,0.94);
}

.favorites-list {
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.favorites-list.switching {
    opacity: 0;
    transform: translateY(8px);
}

.favorites-page-info {
    min-width: 34px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255,255,255,0.82);
}
.favorites-nav-btn:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.favorite-open-info {
    cursor: pointer;
}
.favorite-open-info:hover {
    opacity: 0.82;
}

/* =========================================
   RELATED VOCABULARY
========================================= */

.related-vocab-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.related-vocab-card {
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(
    135deg,
    #fffdf8 0%,
    #f7fff9 100%
    );
    border: 2px solid #f3f4f6;
}

.related-vocab-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-vocab-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-vocab-spanish {
    font-size: clamp(16px, 4vw, 22px);
    font-weight: 800;
    color: #58cc02;
}

.related-vocab-german {
    font-size: 13px;
    color: #6b7280;
}

.related-vocab-audio {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1cb0f6;
    cursor: pointer;
    box-shadow: none;
}

.related-vocab-audio:hover,
.related-vocab-audio:active,
.related-vocab-audio:focus {
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* =========================================
   LEARN HUB
========================================= */

.learn-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.learn-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-radius: 30px;
    background: linear-gradient( 135deg, #58cc02 0%, #518f18 100% );
    color: white;
}

.learn-hero-title {
    font-size: clamp(30px, 6vw, 38px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.07em;
}

.learn-hero-subtitle {
    margin-top: 6px;
    font-size: 15px;
    opacity: 0.92;
}

.learn-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(10px);
}

.learn-hero-icon svg {
    width: 34px;
    height: 34px;
}

.learn-mode-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================================
   MODE CARD
========================================= */

.learn-mode-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    min-height: 118px;
    border: 2px solid rgba(255,255,255,0.45);
    border-bottom-width: 6px;
    outline: none;
    border-radius: 32px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.05);
    text-align: left;
    transition: 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.learn-mode-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(88,204,2,0.10) 0%,
        transparent 72%
    );
    pointer-events: none;
}

.learn-mode-card:hover,
.learn-mode-card:focus,
.learn-mode-card:active {
    background: rgba(255,255,255,0.82) !important;
}

/* =========================================
   ICON
========================================= */

.learn-mode-icon {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learn-mode-icon svg {
    width: 30px;
    height: 30px;
}

.learn-mode-icon.match {
    background: rgba(28,176,246,0.14);
    color: #1cb0f6;
}

.learn-mode-icon.audio {
    background: rgba(168,85,247,0.12);
    color: #a855f7;
}
.learn-mode-icon.cards {
    background: rgba(34,197,94,0.12);
    color: #22c55e;
}
.learn-mode-icon.text {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

/* =========================================
   CENTER
========================================= */

.learn-mode-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.learn-mode-title {
    font-size: clamp(20px, 5vw, 30px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #22c55e;
}

.learn-mode-description {
    font-size: 14px;
    line-height: 1.0;
    color: #828282;
    font-weight: 550;
}

/* =========================================
   RIGHT
========================================= */

/* =========================================
   DISABLED
========================================= */

.learn-mode-card.disabled {
    opacity: 0.6;
}

/* =========================================
   MATCH GAME
========================================= */

.match-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.match-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border:2px solid #dcdcdc;
    border-radius: 28px;
    background: linear-gradient( 135deg, #f59e0b, #f97316 );
}

.match-progress {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 8px auto;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.65);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    font-size: 15px;
    font-weight: 800;
    color: #374151;
    letter-spacing: 0.2px;
}

.match-back-btn {
    width: 52px;
    height: 52px;
    border: 2px solid #f3f4f6;
    border-radius: 18px;
    background: #f89d30;
    display: flex;
    align-items: center;
    justify-content: center;
}
.match-back-btn:hover{
    background: #f89d30;
}

.match-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    line-height: 0.9;
    color: #fff;
}

.match-subtitle {
    margin-top: 6px;
    font-size: clamp(13px, 3.5vw, 15px);
    font-weight: 400;
    color: #fbfbfb;
}

.match-game {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    width: 100%;
}

.match-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-column-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid #fbfbfb;
    border-radius: 18px;
    background: #1cb0f6;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-item {
    min-height: clamp(62px, 16vw, 74px);
    padding: clamp(10px, 3vw, 16px);
    border:2px solid #f3f4f6;
    border-radius: 24px;
    background: #fbfbfb;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    font-size: clamp(12px, 4vw, 18px);
    font-weight: 500;
    word-break: break-word;
    color: #1f2937;
    outline: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: 0.15s ease;
}

.match-item.active {
    border-color: #1cb0f6;
    background: rgba(28,176,246,0.10);
    color: #1cb0f6;
}

.match-item.correct {
    border-color: #58cc02;
    background: rgba(88,204,2,0.10);
    color: #58cc02;
}

.match-item.wrong {
    border-color: #ff4b4b;
    background: rgba(255,75,75,0.10);
    color: #ff4b4b;
}

.match-item:not(.active):not(.correct):not(.wrong):hover,
.match-item:not(.active):not(.correct):not(.wrong):focus,
.match-item:not(.active):not(.correct):not(.wrong):active {
    background: #fbfbfb;
    border-color: #f3f4f6;
    color: #1f2937;
    outline: none;
    box-shadow: none;
    transform: none;
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-header-left {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.match-header-icon {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.match-header-icon svg {
    width: 60px;
    height: 60px;
    opacity: 0.15;
    color: white;
}

.match-header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.match-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-audio-toggle {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 18px;
    background: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    outline: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.match-audio-toggle svg {
    width: 22px;
    height: 22px;
}

.match-audio-toggle:not(.active) {
    opacity: 0.40;
}

.match-audio-toggle:hover{
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

#audioMatchReveal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9999;
}

.audio-match-reveal-popup {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 40px;
    font-size: clamp(30px, 6vw, 54px);
    text-align: center;
    font-weight: 800;
    color: #58cc02;
    letter-spacing: 2px;
    z-index: 10000;
    animation: audioRevealIn 0.2s ease, audioRevealOut 0.35s ease 1.1s forwards;
}
.audio-match-reveal-flag {
    font-size: clamp(42px, 8vw, 64px);
    line-height: 1;
}

@keyframes audioRevealIn {
from {
    opacity: 0;
    transform: scale(0.8);
}

to {
    opacity: 1;
    transform: scale(1);
}
}

@keyframes audioRevealOut {
to {
    opacity: 0;
    transform: scale(1.15);
}
}

@keyframes audioRevealBackdrop {
from {
    opacity: 0;
}

to {
    opacity: 1;
}
}

/* =========================================
   LEARN SETUP SHEET
========================================= */

.learn-setup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
    z-index: 500;
}

.learn-setup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.learn-setup-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 14px 18px 120px;
    border-radius: 34px 34px 0 0;
    background: white;
    transform: translateY(100%);
    transition: 0.24s ease;
    z-index: 501;
}

.learn-setup-sheet.active {
    transform: translateY(0);
}

.learn-setup-handle {
    width: 54px;
    height: 6px;
    margin: 0 auto 20px;
    border-radius: 999px;
    background: #e5e7eb;
}

.learn-setup-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.learn-setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 2px solid #f3f4f6;
    border-radius: 28px;
    background: linear-gradient( 135deg, #f59e0b, #f97316 );
}

.learn-setup-title {
    font-size: clamp(20px, 6vw, 28px);
    font-weight: 800;
    line-height: 1;
    color: white;
}

.learn-setup-subtitle {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(255,255,255,0.92);
}

.learn-setup-icon {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.14);
    border: 2px solid rgba(255,255,255,0.24);
}

.learn-setup-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.learn-setup-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.learn-setup-label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.learn-setup-select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #f3f4f6;
    border-radius: 22px;
    background: #fbfbfb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.learn-count-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.learn-count-btn {
    height: 58px;
    border: 2px solid #f3f4f6;
    border-radius: 20px;
    background: #fbfbfb;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.learn-count-btn.active {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.learn-audio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.learn-setup-hint {
    margin-top: 4px;
    font-size: 13px;
    color: #9ca3af;
}

.learn-audio-toggle {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border: 2px solid #f3f4f6;
    border-radius: 20px;
    background: #fbfbfb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
}

.learn-audio-toggle:not(.active) {
    opacity: 0.45;
}

.learn-start-btn {
    width: 100%;
    height: 62px;
    border: none;
    border-radius: 24px;
    background: linear-gradient( 135deg, #f59e0b, #f97316 );
    font-size: 17px;
    font-weight: 800;
    color: white;
}

/* =========================================
   AUDIO MATCH
========================================= */

.audio-match-item {
    justify-content: center;
}

.audio-match-item svg {
    width: 26px;
    height: 26px;
    color: #1cb0f6;
}

/*
|--------------------------------------------------------------------------
| German side centered
|--------------------------------------------------------------------------
*/

#audioGermanList .match-item {
    justify-content: center;
    text-align: center;
}

/* =========================================
   CARDS
========================================= */

.cards-view {
    min-height: 100vh;
}

.cards-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px 16px;
}

/* =========================================
   FLASHCARD
========================================= */

.flashcard {
    width: 100%;
    max-width: 420px;
    perspective: 1200px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    min-height: 400px;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

/* =========================================
   CARD SIDES
========================================= */

.flashcard-front,
.flashcard-back {
    position: absolute;
    inset: 0;
    background: #ffffff;
    border-radius: 32px;
    padding: 32px 24px;
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flashcard-back {
    transform: rotateY(180deg);
}

/* =========================================
   CONTENT
========================================= */

.flashcard-label {
    font-size: 14px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.flashcard-word {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
    color: #111827;
}

/* =========================================
   TOOLS
========================================= */

.flashcard-tools {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.flashcard-audio-btn,
.flashcard-info-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.flashcard-audio-btn:active,
.flashcard-info-btn:active {
    transform: scale(0.96);
}
.flashcard-audio-btn:hover,
.flashcard-info-btn:hover {
    background: #e5f4ff;
    color: #1cb0f6;
}

/* =========================================
   ACTIONS
========================================= */

.flashcard-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 40px;
}

.flashcard-btn {
    flex: 1;
    border: none;
    border-radius: 18px;
    height: 56px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.flashcard-btn.correct {
    background: #22c55e;
    color: white;
}

.flashcard-btn.wrong {
    background: #ef4444;
    color: white;
}

.flashcard-btn:active {
    transform: scale(0.98);
}

/* =========================================
   FINISHED
========================================= */

.cards-finished {
    text-align: center;
    padding: 40px 20px;
}

.cards-finished-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cards-finished-text {
    font-size: 17px;
    color: #6b7280;
}

/* =========================================
   TEXT MODE
========================================= */

.text-view {
    min-height: 100dvh;
}

.text-stage {
    display: flex;
    justify-content: center;
    padding: 12px 0 3px;
}

.text-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 32px;
    padding: 32px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-word {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 650;
    line-height: 1.1;
    text-align: center;
    color: #111827;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.text-card.shake {
    animation: textShake 0.42s ease;
}
@keyframes textShake {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-8px); }
    40%  { transform: translateX(8px); }
    60%  { transform: translateX(-6px); }
    80%  { transform: translateX(6px); }
    100% { transform: translateX(0); }
}

.text-audio-btn {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 18px;
    background: #f3f4f6;
    color: #1cb0f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.text-audio-btn:hover {
    background: #e5f4ff;
}

.text-input {
    width: 100%;
    min-height: 68px;
    border: 2px solid #e5e7eb;
    border-radius: 22px;
    padding: 0 20px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    background: #fbfbfb;
    transition: 0.2s ease;
}

.text-input:focus {
    border-color: #1cb0f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(28,176,246,0.12);
}

.text-actions {
    width: 100%;
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.text-hint-btn,
.text-check-btn {
    flex: 1;
    height: 58px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 800;
}

.text-hint-btn {
    background: #f3f4f6;
    color: #6b7280;
}

.text-hint-btn:hover {
    background: #e5e7eb;
}

.text-check-btn {
    background: #1cb0f6;
    color: white;
}

.text-check-btn:hover {
    background: #169de0;
}

.text-feedback {
    width: 100%;
    margin-top: 24px;
    text-align: center;
}

.text-correct {
    padding: 16px;
    border-radius: 20px;
    background: rgba(88,204,2,0.12);
    color: #58cc02;
    font-size: 18px;
    font-weight: 800;
}

.text-wrong {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255,75,75,0.10);
    color: #ff4b4b;
    font-size: 18px;
    font-weight: 800;
}

.text-solution {
    margin-top: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}

.text-hint {
    padding: 16px;
    border-radius: 20px;
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    font-size: 17px;
    font-weight: 700;
}

.text-almost {
    padding: 16px;
    border-radius: 20px;
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    font-size: 18px;
    font-weight: 800;
}

/* =========================================
   TEXT HEADER
========================================= */

.text-view {
    min-height: 100vh;
}

/* =========================================
   TEXT PROGRESS
========================================= */

.text-progress-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 18px auto 120px;
    padding: 14px 18px;
    border-radius: 24px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
}

.text-progress-bar {
    flex: 1;
    height: 12px;
    background: #eceff3;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.text-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient( 90deg, #1cb0f6, #38bdf8 );
    transition: width 0.35s ease;
}

.text-progress-text {
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    min-width: 48px;
    text-align: right;
}

/* =========================================
   CARDS PROGRESS
========================================= */

.cards-progress-wrapper {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    margin-top: 0;
    transform: translateY(-18px);
}

.cards-progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #edf2f7;
}

.cards-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #22c55e 0%,
        #16a34a 100%
    );
    transition: width 0.25s ease;
}

.cards-progress-text {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #6b7280;
}

/* =========================================
   ROUND RESULT OVERLAY
========================================= */

#roundResultOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

#roundResultOverlay.show {
    pointer-events: auto;
}

.round-result-backdrop {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
    animation: fadeOverlay 0.25s ease;
}

.round-result-modal {
    width: 100%;
    max-width: 420px;
    border-radius: 32px;
    padding: 32px 24px;
    background: linear-gradient( 180deg, #1e293b 0%, #0f172a 100% );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 25px 80px rgba(0,0,0,0.45);
    text-align: center;
    animation: scaleOverlay 0.28s ease;
}

.round-result-percent {
    font-size: 58px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.round-result-message {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
}

.round-result-stats {
    display: flex;
    gap: 14px;
    margin-top: 28px;
}

.round-result-stat {
    flex: 1;
    padding: 18px;
    border-radius: 22px;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
}

.round-result-stat span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.8;
}

.round-result-stat.correct {
    background: rgba(34,197,94,0.18);
    border: 1px solid rgba(34,197,94,0.3);
}

.round-result-stat.wrong {
    background: rgba(239,68,68,0.16);
    border: 1px solid rgba(239,68,68,0.28);
}

.round-result-xp {
    margin-top: 28px;
    font-size: 42px;
    font-weight: 900;
    color: #facc15;
    text-shadow: 0 0 20px rgba(250,204,21,0.35);
}
.round-result-xp.animate {
    animation:  xpPulse 0.18s ease;
}
@keyframes xpPulse {
0% {
    transform: scale(1);
}

50% {
    transform: scale(1.12);
}

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

.round-result-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.round-result-actions button {
    flex: 1;
}

@keyframes fadeOverlay {
from {
    opacity: 0;
}

to {
    opacity: 1;
}
}

@keyframes scaleOverlay {
from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
}

to {
    opacity: 1;
    transform: scale(1) translateY(0);
}
}

.round-result-submessage {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255,255,255,0.68);
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 18px;
    border-radius: 4px;
    opacity: 0.9;
    animation:  confettiFall linear forwards;
}

@keyframes confettiFall {
to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
}
}

/* =========================================
   HOME LEVEL CARD
========================================= */

.home-level-card {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    padding: 26px;
    border-radius: 32px;
    background: linear-gradient(
    135deg,
    #7c3aed 0%,
    #5b21b6 100%
    );
    color: white;
    box-shadow: var(--shadow);
}
.home-level-card::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient( circle, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.10) 35%, transparent 72% );
    pointer-events: none;
}
.home-level-card::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -120%;
    width: 70%;
    height: 220%;
    transform: rotate(18deg);
    background: linear-gradient( 90deg, transparent 0%, rgba(255,255,255,0.06) 35%, rgba(255,255,255,0.30) 50%, rgba(255,255,255,0.06) 65%, transparent 100% );
    animation: levelCardShine 5s linear infinite;
    pointer-events: none;
}
@keyframes levelCardShine {
0% {
    left: -120%;
}

100% {
    left: 160%;
}
}

.home-level-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.home-level-badge {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient( 135deg, #facc15 0%, #eab308 100% );
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 800;
    gap: 8px;
    backdrop-filter: blur(10px);
    cursor: pointer;
}
.home-level-badge svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.home-level-xp {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
}

.home-level-title {
    font-size: clamp(24px, 6vw, 42px);
    font-weight: 700;
    line-height: 1;
}
.home-level-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.home-level-translation {
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 600;
    opacity: 0.72;
    line-height: 1;
    transform: translateY(3px);
}

.home-level-progress {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.18);
    margin-bottom: 10px;
}

.home-level-progress-bar {
    width: 72%;
    height: 100%;
    border-radius: 999px;
    background: white;
}

.home-level-progress-text {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
}

/* =========================================
   VOCAB STATS
========================================= */

.vocab-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.vocab-stat-card {
    background: #ffffff;
    border: 2px solid #eef2f1;
    border-bottom-width: 5px;
    border-radius: 24px;
    padding: 20px 16px;
    text-align: center;
}

.vocab-stat-value {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 8px;
}

.vocab-stat-label {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
}

.vocab-streaks {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vocab-streak-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 2px solid #eef2f1;
    border-bottom-width: 5px;
}

.vocab-streak-card.current {
    border-color: #fed7aa;
    border-bottom-color: #fb923c;
}

.vocab-streak-card.best {
    border-color: #fde68a;
    border-bottom-color: #facc15;
}

.vocab-streak-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vocab-streak-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.vocab-streak-card.current .vocab-streak-icon {
    background: rgba(245,158,11,0.14);
    color: #f97316;
}

.vocab-streak-card.best .vocab-streak-icon {
    background: rgba(250,204,21,0.14);
    color: #eab308;
}

.vocab-streak-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: #111827;
    margin-bottom: 6px;
}

.vocab-streak-label {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
}

.vocab-stats-loading,
.vocab-stats-error {
    padding: 40px 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #9ca3af;
}

/* =========================================
   MASTERED INLINE
========================================= */

.vocab-mastered-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 7px;
    background: rgba(220,252,231,0.82);
    border: 1.5px solid #86efac;
    color: #166534;
    font-family: "Inter", sans-serif;
    font-size: clamp(10px, 2.4vw, 13px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transform: translateY(-6px);
    backdrop-filter: blur(8px);
}

.vocab-mastered-inline svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.8;
}

.vocab-mastered-inline.hidden {
    display: none;
}


/* =========================================
   HOME LEARNING TIME
========================================= */

.home-time-card {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    padding: 26px;
    border-radius: 32px;
    background: linear-gradient(
    135deg,
    #58cc02 0%,
    #46a302 100%
    );
    color: white;
    box-shadow: var(--shadow);
}

.home-time-card::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,255,255,0.14) 0%,
        transparent 72%
    );
}

.home-time-content {
    position: relative;
    z-index: 2;
}

.home-time-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.home-time-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-time-icon svg {
    width: 30px;
    height: 30px;
    opacity: 0.92;
}

.home-time-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.home-time-grid {
    display: flex;
    gap: 14px;
}

.home-time-box {
    flex: 1;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
}

.home-time-value {
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 800;
    line-height: 1;
}

.home-time-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
}

.achievement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.achievement-modal {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: 32px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: scaleIn 0.25s ease;
}

.achievement-icon {
    font-size: 64px;
    margin-bottom: 18px;
}

.achievement-title {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
}

.achievement-text {
    font-size: 16px;
    line-height: 1.5;
    color: #6b7280;
    margin-bottom: 22px;
}

.achievement-xp {
    font-size: 34px;
    font-weight: 900;
    color: #58cc02;
    margin-bottom: 24px;
}

.achievement-btn {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 20px;
    background: #58cc02;
    color: white;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.achievement-btn:hover {
    transform: translateY(-2px);
    background: #67c820;
}

@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}

/* =========================================
   HOME STREAK CARD
========================================= */

.home-streak-card {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    padding: 26px;
    border-radius: 32px;
    background: linear-gradient(
        135deg,
        #ff7a00 0%,
        #ff5200 100%
    );
    color: white;
    box-shadow: var(--shadow);
}

.home-streak-card::before {
    content: "";
    position: absolute;
    top: -90px;
    right: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,255,255,0.12) 0%,
        transparent 72%
    );
}

.home-streak-content {
    position: relative;
    z-index: 2;
}

.home-streak-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.home-streak-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255,255,255,0.10);
    border: 2px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.home-streak-icon svg {
    width: 28px;
    height: 28px;
    opacity: 0.92;
    animation: flameStreak 1.8s ease-in-out infinite;
}
@keyframes flameStreak {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.home-streak-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.home-streak-current {
    margin-bottom: 22px;
}

.home-streak-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.home-streak-label {
    margin-top: 8px;
    font-size: 17px;
    font-weight: 700;
    color: rgba(255,255,255,0.84);
}

.home-streak-next {
    padding: 16px 18px;
    border-radius: 24px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
}

.home-streak-next-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    color: rgba(255,255,255,0.96);
}

.home-streak-next-subtitle {
    margin-top: 0px;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.78);
}

@media (max-width: 640px) {

    .streak-overlay-modal {
        padding: 20px;
        border-radius: 28px;
    }

    .streak-overlay-heading {
        font-size: 28px;
    }

    .streak-overlay-row {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 16px;
        border-radius: 22px;
    }

    .streak-overlay-icon {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        flex-shrink: 0;
    }

    .streak-overlay-main {
        flex: 1;
        min-width: 0;
    }

    .streak-overlay-title {
        font-size: 18px;
    }

    .streak-overlay-subtitle {
        margin-top: 2px;
        font-size: 13px;
    }

    .streak-overlay-xp {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
        margin-left: auto;
        align-self: center;
    }
}

/* =========================================
   MASCOT
========================================= */

.hero-mascot {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.hero-mascot img {
    transition: transform 0.18s ease;
}

.hero-mascot:active img {
    transform: scale(0.96);
}

.mascot-bubble {
    position: fixed;
    top: 42%;
    left: 50%;
    z-index: 9999;
    min-width: 220px;
    max-width: 90vw;
    padding: 18px 22px;
    border-radius: 28px;
    background: white;
    border: 4px solid #7ce77c;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    word-break: break-word;
    transform: translate(-50%, -50%);
}

.mascot-bubble.active {
    animation: mascotBubble 2.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mascot-spanish {
    font-family: "Indie Flower";
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: #58cc02;
}

.mascot-german {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

@keyframes mascotBubble {

    0% {
        opacity: 0;
        transform: translate(-50%, -20%);
    }

    10% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    75% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -400%);
    }
}

@media (max-width: 640px) {

    .mascot-bubble {
        min-width: 240px;
        max-width: 92vh;
        padding: 16px 18px;
    }

    .mascot-spanish {
        font-size: 22px;
    }

    .mascot-german {
        font-size: 12x;
    }
}