/* =============================================
   LINGUAAI DESIGN SYSTEM — CSS Custom Properties
   ============================================= */
:root {
    /* Primary Palette */
    --lai-primary: #4f46e5;
    --lai-primary-dark: #4338ca;
    --lai-primary-light: rgba(79, 70, 229, 0.08);
    --lai-primary-glow: rgba(79, 70, 229, 0.15);
    --lai-primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    /* Accent Colors */
    --lai-green: #10b981;
    --lai-green-light: rgba(16, 185, 129, 0.1);
    --lai-amber: #f59e0b;
    --lai-amber-light: rgba(245, 158, 11, 0.1);
    --lai-red: #ef4444;
    --lai-red-light: rgba(239, 68, 68, 0.08);
    --lai-blue: #3b82f6;
    --lai-blue-light: rgba(59, 130, 246, 0.1);

    /* Text Colors */
    --lai-text-heading: #0f172a;
    --lai-text-body: #334155;
    --lai-text-muted: #64748b;
    --lai-text-subtle: #94a3b8;

    /* Surface & Borders */
    --lai-surface: rgba(255, 255, 255, 0.75);
    --lai-surface-solid: #ffffff;
    --lai-surface-hover: rgba(255, 255, 255, 0.9);
    --lai-border: rgba(226, 232, 240, 0.7);
    --lai-border-hover: rgba(79, 70, 229, 0.25);
    --lai-bg-page: #f8fafc;

    /* Spacing */
    --lai-space-xs: 4px;
    --lai-space-sm: 8px;
    --lai-space-md: 16px;
    --lai-space-lg: 24px;
    --lai-space-xl: 32px;
    --lai-space-2xl: 48px;

    /* Border Radius */
    --lai-radius-sm: 8px;
    --lai-radius-md: 12px;
    --lai-radius-lg: 16px;
    --lai-radius-xl: 20px;
    --lai-radius-2xl: 24px;
    --lai-radius-pill: 50px;

    /* Shadows */
    --lai-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --lai-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --lai-shadow-md: 0 8px 25px rgba(0, 0, 0, 0.04);
    --lai-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.06);
    --lai-shadow-glow: 0 8px 30px rgba(79, 70, 229, 0.12);
    --lai-shadow-card-hover: 0 20px 40px rgba(79, 70, 229, 0.1);

    /* Transitions */
    --lai-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --lai-ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --lai-duration: 0.25s;
    --lai-duration-slow: 0.4s;
}

/* Prevent external theme font-size scaling on LinguaAI pages */
html:has(body:has([id^="linguaai-"])) {
    font-size: 15px !important;
}

/* Page-level background for all LinguaAI pages */
body:has([id^="linguaai-"]) {
    background: var(--lai-bg-page) !important;
    background-image:
        radial-gradient(ellipse 600px 400px at 10% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 85% 60%, rgba(124, 58, 237, 0.03) 0%, transparent 70%) !important;
}

/* Standardized page entry animation */
@keyframes lai-fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lai-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lai-scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Apply entry animation to main containers */
#linguaai-app,
#linguaai-vocab-v2,
#linguaai-grammar,
#linguaai-stories,
#linguaai-dialogues,
#linguaai-chat,
#linguaai-profile,
#linguaai-sentence-practice,
.linguaai-mentor-container {
    animation: lai-fadeIn 0.4s var(--lai-ease) both;
}

/* LinguaAI Standarized Layout Canvas for All Pages (Matches AI Mentor page exactly) */
#linguaai-app,
#linguaai-vocab-v2,
#linguaai-grammar,
#linguaai-stories,
#linguaai-podcasts,
#linguaai-dialogues,
#linguaai-chat,
#linguaai-profile,
#linguaai-sentence-practice,
.linguaai-mentor-container {
    max-width: 1100px !important;
    padding: 20px !important;
    position: relative !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.linguaai-header {
    background: var(--lai-surface);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--lai-border);
    border-left: 4px solid var(--lai-primary);
    color: var(--lai-text-heading);
    padding: 28px 32px;
    border-radius: var(--lai-radius-xl);
    text-align: left;
    margin-bottom: var(--lai-space-lg);
    box-shadow: var(--lai-shadow-md);
    animation: lai-fadeInUp 0.5s var(--lai-ease) both;
    position: relative;
    overflow: hidden;
}

.linguaai-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(79, 70, 229, 0.03) 100%);
    pointer-events: none;
}

.linguaai-header h1 {
    font-size: 1.75em;
    margin: 0;
    font-weight: 800;
    color: var(--lai-text-heading);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.linguaai-header p {
    font-size: 0.95em;
    color: var(--lai-text-muted);
    margin-top: 6px;
    margin-bottom: 0;
    font-weight: 500;
}

.lang-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.lang-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    transform: translateY(-3px);
}

.lang-btn.tr {
    border-left: 5px solid #e74c3c;
}

.lang-btn.en {
    border-left: 5px solid #3498db;
}

.lang-btn.nl {
    border-left: 5px solid #f39c12;
}

.exercise-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

/* Auth Sayfaları - Premium Modern Redesign */
.linguaai-auth-box {
    max-width: 450px;
    margin: 60px auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.05), 0 1px 3px rgba(79, 70, 229, 0.01), 0 0 0 1px rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.linguaai-auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
}

.linguaai-auth-logo {
    text-align: center;
    margin-bottom: 25px;
}

.linguaai-auth-logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.linguaai-auth-logo img:hover {
    transform: scale(1.05);
}

.linguaai-auth-box h2 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.linguaai-auth-box p {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 500;
}

.linguaai-field {
    margin-bottom: 22px;
}

.linguaai-field label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 8px;
    color: #334155;
    letter-spacing: -0.01em;
}

.linguaai-field input,
.linguaai-field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-weight: 500;
}

.linguaai-field input::placeholder {
    color: #94a3b8;
}

.linguaai-field input:focus,
.linguaai-field select:focus {
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.linguaai-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.linguaai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    opacity: 0.95;
}

.linguaai-btn:active {
    transform: translateY(0);
}

.linguaai-switch {
    text-align: center;
    margin-top: 25px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.linguaai-switch a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.linguaai-switch a:hover {
    color: #7c3aed;
}

.linguaai-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Apply Plus Jakarta Sans font to all LinguaAI pages, sidebar, and topbar elements */
#linguaai-app,
#linguaai-app *,
#linguaai-vocab-v2,
#linguaai-vocab-v2 *,
#linguaai-grammar,
#linguaai-grammar *,
#linguaai-stories,
#linguaai-stories *,
#linguaai-podcasts,
#linguaai-podcasts *,
#linguaai-dialogues,
#linguaai-dialogues *,
#linguaai-chat,
#linguaai-chat *,
#linguaai-profile,
#linguaai-profile *,
#linguaai-sentence-practice,
#linguaai-sentence-practice *,
.linguaai-mentor-container,
.linguaai-mentor-container *,
.linguaai-sidebar,
.linguaai-sidebar *,
.linguaai-topbar,
.linguaai-topbar *,
.linguaai-global-nav,
.linguaai-global-nav * {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
}

/* Sidebar Navigation Layout */
.linguaai-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(102, 126, 234, 0.12);
    padding: 24px 16px;
    z-index: 9999;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.linguaai-sidebar .sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.linguaai-sidebar .sidebar-logo-img {
    height: 48px;
    width: auto;
    border-radius: 10px;
    mix-blend-mode: multiply;
}

.linguaai-sidebar .sidebar-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.linguaai-sidebar .sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: #6366f1 rgba(255, 255, 255, 0.05) !important;
    flex-grow: 1;
    max-height: calc(100vh - 100px);
    padding-right: 4px;
}

/* Custom Sleek Scrollbar for Chrome, Edge, Safari */
.linguaai-sidebar .sidebar-menu::-webkit-scrollbar {
    width: 6px !important;
}
.linguaai-sidebar .sidebar-menu::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.2) !important;
    border-radius: 10px !important;
}
.linguaai-sidebar .sidebar-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4f46e5 0%, #7c3aed 100%) !important;
    border-radius: 10px !important;
}
.linguaai-sidebar .sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #6366f1 !important;
}

.linguaai-sidebar .sidebar-item {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569 !important;
    text-decoration: none !important;
    padding: 10px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.linguaai-sidebar .sidebar-item:hover {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.06) !important;
}

.linguaai-sidebar .sidebar-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25) !important;
}

.linguaai-sidebar .sidebar-item.logout {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    margin-top: auto;
}

.linguaai-sidebar .sidebar-item.logout:hover {
    color: #ffffff !important;
    background: #ef4444 !important;
}

/* Sticky Topbar Header */
.linguaai-topbar {
    position: sticky;
    top: 32px; /* Admin bar spacing */
    margin: 15px auto 30px auto;
    max-width: 1100px;
    height: 56px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.linguaai-topbar .topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.linguaai-topbar .topbar-hamburger {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1e293b;
}

.linguaai-topbar .topbar-page-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

/* Premium Segmented Selector in Topbar */
.nav-level-selector {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-level-selector .level-pill {
    border: none;
    background: transparent;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-level-selector .level-pill.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Right Topbar widgets */
.linguaai-topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.linguaai-topbar .topbar-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
}

.linguaai-topbar .topbar-badge .badge-icon {
    font-size: 1rem;
}

.linguaai-topbar .topbar-badge .badge-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

.linguaai-topbar .topbar-user-dropdown {
    position: relative;
    cursor: pointer;
}

.linguaai-topbar .topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(79, 70, 229, 0.25);
    display: block;
}

.linguaai-topbar .user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.08);
    z-index: 10000;
    padding: 6px 0;
    margin-top: 10px;
}

.linguaai-topbar .topbar-user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.linguaai-topbar .dropdown-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569 !important;
    text-decoration: none !important;
    padding: 10px 16px;
    display: block;
}

.linguaai-topbar .dropdown-item:hover {
    background: rgba(79, 70, 229, 0.05);
    color: #4f46e5 !important;
}

.linguaai-topbar .dropdown-item.logout-item {
    color: #ef4444 !important;
    border-top: 1px solid #f1f5f9;
}

/* Page Shifting on Desktop */
/* Make all theme content wrappers full-width on Linguataal pages to align with the left sidebar */
body:has([id^="linguaai-"]) #page,
body:has([id^="linguaai-"]) .site,
body:has([id^="linguaai-"]) .site-content,
body:has([id^="linguaai-"]) #content,
body:has([id^="linguaai-"]) #primary,
body:has([id^="linguaai-"]) .content-area,
body:has([id^="linguaai-"]) .site-main,
body:has([id^="linguaai-"]) #main,
body:has([id^="linguaai-"]) .container,
body:has([id^="linguaai-"]) .wrap,
body:has([id^="linguaai-"]) .entry-content,
body:has([id^="linguaai-"]) .entry-content-wrap,
body:has([id^="linguaai-"]) .page-content,
body:has([id^="linguaai-"]) .post-content,
body:has([id^="linguaai-"]) article,
body:has([id^="linguaai-"]) .page,
body:has([id^="linguaai-"]) .post-inner,
body:has([id^="linguaai-"]) .post {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

#linguaai-app,
#linguaai-vocab-v2,
#linguaai-grammar,
#linguaai-stories,
#linguaai-podcasts,
#linguaai-dialogues,
#linguaai-chat,
#linguaai-profile,
#linguaai-sentence-practice,
#linguaai-vocab,
#linguaai-wordlist,
.linguaai-mentor-container,
.linguaai-main-container,
.linguaai-topbar {
    margin-left: calc(260px + max(20px, calc(50% - 690px))) !important;
    margin-right: auto !important;
    max-width: 1100px !important;
    width: calc(100% - 300px) !important;
    box-sizing: border-box !important;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.linguaai-topbar {
    margin-top: 25px !important;
    margin-bottom: 20px !important;
}

/* Sidebar Reset & Bulletproof Spacing */
.linguaai-sidebar,
.linguaai-sidebar * {
    box-sizing: border-box !important;
}
.linguaai-sidebar .sidebar-menu {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    text-indent: 0 !important;
}
.linguaai-sidebar .sidebar-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    margin: 0 0 4px 0 !important;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    text-align: left !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
}
.linguaai-sidebar .sidebar-item::before,
.linguaai-sidebar .sidebar-item::after {
    display: none !important;
}
.linguaai-sidebar .sidebar-item .item-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    position: static !important;
}
.linguaai-sidebar .sidebar-item .item-text {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    color: inherit !important;
}

/* Hide Old Level Selectors globally */
.grammar-level-selector,
.grammar-level-selector + br {
    display: none !important;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .nav-level-selector {
        transform: scale(0.9);
    }
}

@media (max-width: 860px) {
    .linguaai-sidebar {
        transform: translateX(-100%);
    }
    
    .linguaai-sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0,0,0,0.15);
    }
    
    .linguaai-topbar .topbar-hamburger {
        display: block;
    }
    
    #linguaai-app,
    #linguaai-vocab-v2,
    #linguaai-grammar,
    #linguaai-stories,
    #linguaai-podcasts,
    #linguaai-dialogues,
    #linguaai-chat,
    #linguaai-profile,
    #linguaai-sentence-practice,
    #linguaai-vocab,
    #linguaai-wordlist,
    .linguaai-mentor-container,
    .linguaai-main-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .linguaai-topbar {
        margin-left: 15px !important;
        margin-right: 15px !important;
        width: calc(100% - 30px) !important;
        max-width: calc(100% - 30px) !important;
        top: 10px !important;
    }
    
    .topbar-right .lang-badge {
        display: none;
    }
}

@media (max-width: 600px) {
    .nav-level-selector {
        display: none; /* Hide level selector on very small screens to fit title */
    }
}

.linguaai-global-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.linguaai-global-nav .nav-item {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569 !important;
    text-decoration: none;
    padding: 7px 9px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.linguaai-global-nav .nav-item:hover {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.08) !important;
}

.linguaai-global-nav .nav-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3) !important;
}

.linguaai-global-nav .nav-item.logout {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    margin-left: 6px;
}

.linguaai-global-nav .nav-item.logout:hover {
    color: #ffffff;
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Modern Landing Page Styles */
#linguaai-app {
    position: relative;
    max-width: 1100px !important;
    margin: 0 auto;
    padding: 20px 15px 60px 15px;
    overflow: hidden;
}

/* Background glowing mesh circles */
.glow-bg-circle {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.45;
    pointer-events: none;
    animation: floatGlow 12s ease-in-out infinite alternate;
}

.glow-bg-circle.circle-1 {
    background: radial-gradient(circle, #818cf8 0%, #6366f1 100%);
    top: 5%;
    left: -10%;
}

.glow-bg-circle.circle-2 {
    background: radial-gradient(circle, #c084fc 0%, #a855f7 100%);
    bottom: 20%;
    right: -10%;
    animation-delay: -6s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 20px) scale(1.15);
    }
}

/* Premium banner styles */
.hero-banner-image-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 25px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.hero-banner-image {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.hero-banner-image:hover {
    transform: scale(1.02);
}

/* Modernized Hero section (Split Layout) */
#linguaai-app .linguaai-hero.split-layout {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    padding: 60px 50px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    color: #1e293b;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

#linguaai-app .linguaai-hero::before {
    display: none;
}

.hero-text-side {
    position: relative;
    z-index: 5;
}

.hero-badge {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: #4f46e5;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 70, 229, 0.15);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4f46e5;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 rgba(79, 70, 229, 0.4);
    animation: badge-pulse-anim 2s infinite;
}

@keyframes badge-pulse-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

#linguaai-app .linguaai-hero.split-layout h1 {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    line-height: 1.2;
    color: #0f172a !important;
    letter-spacing: -1px;
    margin: 0 0 20px 0 !important;
}

#linguaai-app .linguaai-hero.split-layout p {
    font-size: 1.15rem !important;
    color: #475569 !important;
    margin: 0 0 35px 0 !important;
    line-height: 1.6;
}

/* Modern Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

#linguaai-app .hero-btn {
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 1.02rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#linguaai-app .hero-btn.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3) !important;
}

#linguaai-app .hero-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.4) !important;
}

#linguaai-app .hero-btn.secondary {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

#linguaai-app .hero-btn.secondary:hover {
    transform: translateY(-3px);
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

/* Hero Visual Side & CSS Mockup */
.hero-visual-side {
    position: relative;
    z-index: 5;
    width: 100%;
}

.mockup-container {
    position: relative;
    width: 100%;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(168, 85, 247, 0.12) 50%, transparent 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    z-index: 1;
    pointer-events: none;
}

.mockup-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.06);
    padding: 18px 24px;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mockup-card:hover {
    transform: translateY(-8px) scale(1.03) !important;
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.3);
}

.flashcard-mockup {
    width: 280px;
    top: 15px;
    left: 10px;
    transform: rotate(-3deg);
}

.feedback-mockup {
    width: 220px;
    bottom: 20px;
    left: 30px;
    transform: rotate(4deg);
    z-index: 3;
}

.chat-mockup {
    width: 260px;
    top: 120px;
    right: 0px;
    transform: rotate(-1deg);
    z-index: 4;
}

.mockup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mockup-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.mockup-sound {
    font-size: 0.95rem;
    cursor: pointer;
    opacity: 0.8;
}

.mockup-word {
    font-size: 1.8rem;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.mockup-meaning {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 10px;
}

.mockup-sentence {
    font-size: 0.84rem;
    font-style: italic;
    color: #475569;
    border-left: 2px solid #e2e8f0;
    padding-left: 8px;
    line-height: 1.4;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.feedback-icon {
    font-size: 1.1rem;
}

.feedback-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.feedback-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.score-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #10b981;
}

.score-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
}

.feedback-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.feedback-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 10px;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-avatar {
    font-size: 1.1rem;
}

.chat-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4f46e5;
}

.chat-bubble {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #334155;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 2px;
    border: 1px solid #e2e8f0;
}

/* Stats Bar */
.landing-stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.landing-stat-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.01);
    transition: all 0.3s ease;
}

.landing-stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.05);
}

.stat-icon {
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

/* Responsive constraints for Hero & Stats */
@media (max-width: 991px) {
    #linguaai-app .linguaai-hero.split-layout {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 50px 30px;
        gap: 40px;
    }
    .hero-text-side {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    #linguaai-app .linguaai-hero.split-layout h1 {
        font-size: 2.3rem !important;
    }
    .mockup-container {
        height: 350px;
        max-width: 500px;
        margin: 0 auto;
    }
    .flashcard-mockup {
        width: 250px;
    }
    .chat-mockup {
        width: 230px;
    }
}

@media (max-width: 768px) {
    .landing-stats-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Feature Grid and Glassmorphic Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.feature-card {
    background: var(--lai-surface) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--lai-border) !important;
    border-radius: var(--lai-radius-xl) !important;
    padding: var(--lai-space-lg) !important;
    text-align: left !important;
    box-shadow: var(--lai-shadow-sm) !important;
    transition: all var(--lai-duration) var(--lai-ease) !important;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    animation: lai-fadeInUp 0.5s var(--lai-ease) both;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: var(--lai-surface-hover) !important;
    border-color: var(--lai-border-hover) !important;
    box-shadow: var(--lai-shadow-card-hover) !important;
}

.feature-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* Theme color accents for feature icon wrappers */
.feature-icon-wrapper.w-vocab {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.feature-icon-wrapper.w-grammar {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.feature-icon-wrapper.w-chat {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.feature-icon-wrapper.w-profile {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.feature-card h3 {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 10px !important;
}

.feature-card p {
    font-size: 0.95rem !important;
    color: #475569 !important;
    line-height: 1.5;
    margin-bottom: 20px !important;
    flex-grow: 1;
}

.feature-card-btn {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s;
}

.feature-card:hover .feature-card-btn {
    transform: translateX(4px);
}

/* Languages Section */
.langs-section {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    margin-top: 30px;
}

.langs-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 25px;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.lang-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
    position: relative;
    overflow: hidden;
}

.lang-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: height 0.2s ease;
}

.lang-card.nl::after { background: #f97316; }
.lang-card.en::after { background: #3b82f6; }
.lang-card.ar::after { background: #10b981; }
.lang-card.tr::after { background: #ef4444; }

.lang-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.08);
    border-color: #cbd5e1;
}

.lang-card:hover::after {
    height: 6px;
}

.lang-flag {
    font-size: 2.2rem;
    line-height: 1;
}

.lang-details {
    flex: 1;
    text-align: left;
}

.lang-details h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0 !important;
}

.lang-details p {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    margin: 0 !important;
}

.lang-arrow {
    font-size: 1.2rem;
    color: #94a3b8;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.lang-card:hover .lang-arrow {
    color: #4f46e5;
    transform: translateX(4px);
}

.langs-note-text {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 15px !important;
}

@media (max-width: 991px) {
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .lang-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Responsive adjustments - tablet: still horizontal, show hamburger */
@media (max-width: 900px) {
    .linguaai-global-nav .nav-item {
        font-size: 0.80rem;
        padding: 6px 8px;
    }

    #linguaai-app .linguaai-hero h1 {
        font-size: 2.2rem !important;
    }
}

/* ==========================================
   GRAMER AKADEMİ (GRAMMAR ACADEMY) STYLES
   ========================================== */

#linguaai-grammar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px 60px 15px;
    position: relative;
}

/* Seviye Seçimi - Tab Buttons */
.grammar-level-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 35px;
}

.level-tab-btn {
    padding: 14px 20px;
    border: 1px solid var(--lai-border);
    border-radius: var(--lai-radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--lai-duration) var(--lai-ease);
    background: var(--lai-surface);
    backdrop-filter: blur(8px);
    box-shadow: var(--lai-shadow-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--lai-text-muted);
}

.level-tab-btn:hover {
    transform: translateY(-2px);
    background: var(--lai-surface-hover);
    box-shadow: var(--lai-shadow-md);
    border-color: var(--lai-border-hover);
}

/* Specific level tab states when active */
#btn-level-A1.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #065f46 !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

#btn-level-A2.active {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #92400e !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

#btn-level-B1.active {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #1e40af !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

#btn-level-B2.active {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #991b1b !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

/* Konu Seçim Bölümü */
.grammar-topic-section {
    margin-bottom: 40px;
}

.grammar-topic-section h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
}

/* Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Topic Card */
.topic-card {
    background: var(--lai-surface-solid);
    border: 1px solid var(--lai-border);
    border-radius: var(--lai-radius-xl);
    padding: var(--lai-space-lg);
    cursor: pointer;
    transition: all var(--lai-duration) var(--lai-ease);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--lai-shadow-sm);
    animation: lai-fadeInUp 0.4s var(--lai-ease) both;
}

.topic-card:hover {
    transform: translateY(-4px);
    background: var(--lai-surface-solid);
    border-color: var(--lai-border-hover);
    box-shadow: var(--lai-shadow-card-hover);
}

.topic-card.active {
    background: var(--lai-surface-solid);
    border-color: var(--lai-primary);
    box-shadow: 0 0 0 2px var(--lai-primary-glow), var(--lai-shadow-glow);
}

.topic-card-icon {
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    margin-bottom: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.topic-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.topic-card-badge {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    color: #4f46e5;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

/* Konu Anlatım Kartı */
.grammar-theory-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
}

.theory-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

#theory-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.toggle-theory-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-theory-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Content inside the theory body styling (Markdown parsed HTML styling) */
.theory-card-body {
    color: #334155;
    line-height: 1.65;
    font-size: 1.05rem;
}

.theory-card-body p {
    margin-bottom: 16px;
}

.theory-card-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 25px;
    margin-bottom: 12px;
}

.theory-card-body ul,
.theory-card-body ol {
    margin-left: 24px;
    margin-bottom: 20px;
}

.theory-card-body li {
    margin-bottom: 8px;
}

/* Premium styled explanation tables inside theory */
.theory-card-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
}

.theory-card-body th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-bottom: 2px solid #e2e8f0;
}

.theory-card-body td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.98rem;
    background: #ffffff;
}

.theory-card-body tr:last-child td {
    border-bottom: none;
}

.theory-card-body tr:hover td {
    background: #f8fafc;
}

.theory-card-body strong {
    color: #0f172a;
    font-weight: 600;
}

.theory-card-body em {
    color: #64748b;
    font-style: italic;
}

/* Egzersiz Etabı (Exercise Box) */
.grammar-box {
    background: var(--lai-surface);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid var(--lai-border);
    border-radius: var(--lai-radius-2xl);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--lai-shadow-md);
    animation: lai-fadeInUp 0.5s var(--lai-ease) both;
}

.grammar-category-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lai-primary);
    background: var(--lai-primary-light);
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--lai-radius-pill);
    margin-bottom: var(--lai-space-lg);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.story-context-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(168, 85, 247, 0.04) 100%);
    border-left: 4px solid #6366f1;
    border-radius: 8px 16px 16px 8px;
    padding: 20px;
    margin-bottom: 25px;
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.6;
}

.story-context-box strong {
    color: #4f46e5;
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grammar-question {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 12px;
}

.grammar-direction {
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dinamik Girdi Bölümü */
#grammar-input-container {
    margin-bottom: 25px;
}

/* Choices Grid Layout (1x4 or 2x2 depending on content length) */
.choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.choice-option-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
}

.choice-option-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.choice-option-btn.correct {
    background: #d1fae5 !important;
    border-color: #34d399 !important;
    color: #065f46 !important;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

.choice-option-btn.wrong {
    background: #fee2e2 !important;
    border-color: #f87171 !important;
    color: #991b1b !important;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

.choice-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Cümle Kurma (Order) */
.order-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-workspace {
    min-height: 56px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    transition: border-color 0.2s;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.word-chip:hover:not(.used) {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.word-chip.used {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #cbd5e1;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.chip-reset-btn {
    align-self: flex-start;
    background: transparent;
    border: 1px dashed #ef4444;
    color: #ef4444;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-reset-btn:hover {
    background: rgba(239, 68, 68, 0.05);
}

/* Yazma ve Boşluk Doldurma Girdisi */
.grammar-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    resize: none;
}

.grammar-input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Kontrol Buton Eylemi */
.grammar-action-btns {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.grammar-action-btns .linguaai-btn {
    width: auto;
    min-width: 160px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
}

/* Sonuç / Geribildirim Alanı */
.grammar-result {
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grammar-result.correct {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.grammar-result.wrong {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.grammar-correct {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 16px;
    font-size: 1rem;
    color: #334155;
}

.grammar-correct strong {
    color: #0f172a;
}

.grammar-correct-answer {
    font-weight: 700;
    color: #10b981;
}

/* İlerleme ve Skor Tahtası */
.grammar-progress {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 12px 24px;
}

.progress-item {
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
}

.progress-item.correct span {
    color: #10b981;
}

.progress-item.wrong span {
    color: #ef4444;
}

.progress-item.skip span {
    color: #f59e0b;
}

/* Alt Navigasyon Butonları */
.grammar-nav-btns {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.vocab-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.vocab-btn:hover {
    transform: translateY(-2px);
}

.vocab-btn.skip {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.vocab-btn.skip:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.vocab-btn.know {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.vocab-btn.know:hover {
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* Responsive grid layouts */
@media (max-width: 768px) {
    .grammar-level-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .choices-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   HİKAYE VE SENARYOLAR (STORIES) MODÜLÜ STYLES
   ========================================== */

.story-text-container {
    background: #ffffff !important;
    border: 1px solid var(--lai-border, #e2e8f0) !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    font-size: 1.15rem !important; /* Compact modern font size */
    line-height: 1.6 !important; /* Standard clean line spacing */
    color: #334155 !important;
    font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, sans-serif !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.015) !important;
    white-space: pre-wrap;
    position: relative;
}

@media (max-width: 768px) {
    .story-text-container {
        padding: 16px 18px !important;
        font-size: 1.05rem !important;
        line-height: 1.55 !important;
    }
}

.story-word {
    display: inline;
    padding: 1px 2px;
    margin: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    color: #334155 !important; /* Default Slate color */
    text-decoration: none !important;
}

.story-word:hover {
    background: rgba(79, 70, 229, 0.05) !important;
}

/* Color Coding Indicators (Restored original distinct colors for language learning) */
.story-word.known {
    color: #059669 !important; /* Distinct Green for known words */
    border-bottom: 2px solid rgba(16, 185, 129, 0.25) !important;
}

.story-word.known:hover {
    background: rgba(16, 185, 129, 0.08) !important;
    border-bottom-color: #059669 !important;
}

.story-word.new-word {
    color: #d97706 !important; /* Distinct Orange for new words */
    border-bottom: 2px solid rgba(245, 158, 11, 0.25) !important;
}

.story-word.new-word:hover {
    background: rgba(245, 158, 11, 0.08) !important;
    border-bottom-color: #d97706 !important;
}

.story-word.separable {
    color: #4f46e5 !important; /* Distinct Indigo for separable verbs */
    font-weight: 700;
    border-bottom: 2px dashed rgba(79, 70, 229, 0.45) !important;
}

.story-word.separable:hover {
    background: rgba(79, 70, 229, 0.08) !important;
    border-bottom-color: #4f46e5 !important;
}

/* Active Highlight of Clicked Word (Dictionary Focus) */
.story-word.active-word {
    background: rgba(79, 70, 229, 0.12) !important;
    color: #4f46e5 !important;
    border-bottom-color: #4f46e5 !important;
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.04) !important;
}

/* TTS Voice highlighting word */
.story-word.highlight {
    background: #fef08a !important; /* Soft velvet highlight */
    color: #0f172a !important;
    transform: scale(1.08) translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.25) !important;
    border-radius: 6px !important;
    z-index: 5;
}

/* Reading Controls Font Adjuster Buttons */
.read-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--lai-border, #e2e8f0);
    background: var(--lai-surface-solid, #ffffff);
    color: var(--lai-text-muted, #64748b);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.read-control-btn:hover {
    background: var(--lai-primary-light, rgba(79, 70, 229, 0.05));
    border-color: var(--lai-primary, #4f46e5);
    color: var(--lai-primary, #4f46e5);
    transform: scale(1.08);
}

/* Study Workspace Header */
.study-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.dashboard-back-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-back-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.story-category-badge {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: #4f46e5;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

/* Glossary Card & Quiz Card Glassmorphism */
.glossary-card,
.story-quiz-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease;
}

.glossary-card:hover,
.story-quiz-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04) !important;
}

/* Responsive columns */
@media (max-width: 900px) {
    .story-bottom-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* =============================================
   PANEL – Istatistik Karti
   ============================================= */
.panel-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 auto 30px;
    max-width: 900px;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    .panel-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .panel-stats-grid {
        grid-template-columns: 1fr;
    }
}

.panel-stat-card {
    background: var(--lai-surface-solid);
    border: 1px solid var(--lai-border);
    border-radius: var(--lai-radius-xl);
    padding: var(--lai-space-lg) var(--lai-space-md);
    text-align: center;
    color: var(--lai-text-heading);
    position: relative;
    transition: all var(--lai-duration) var(--lai-ease);
    box-shadow: var(--lai-shadow-sm);
    animation: lai-fadeInUp 0.5s var(--lai-ease) both;
}

.panel-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lai-shadow-card-hover);
    border-color: var(--lai-border-hover);
}

.panel-stat-card.streak {
    border-color: rgba(251, 146, 60, 0.4);
}

.panel-stat-card.words {
    border-color: rgba(99, 102, 241, 0.4);
}

.panel-stat-card.grammar {
    border-color: rgba(52, 211, 153, 0.4);
}

.panel-stat-card.review {
    border-color: rgba(251, 191, 36, 0.4);
}

.panel-stat-icon {
    font-size: 1.8em;
    margin-bottom: 6px;
}

.panel-stat-value {
    font-size: 2.4em;
    font-weight: 900;
    line-height: 1;
    color: #4f46e5;
}

.panel-stat-label {
    font-size: 0.82em;
    margin-top: 4px;
    font-weight: 600;
    color: #475569;
}

.panel-stat-sub {
    font-size: 0.72em;
    margin-top: 2px;
    color: #64748b;
}

.panel-stat-action {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.panel-stat-action:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

/* =============================================
   HAMBURGER MENU – Mobil Nav
   ============================================= */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: #4f46e5;
    font-size: 1.5em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-hamburger:hover {
    background: rgba(79, 70, 229, 0.1);
}

@media (max-width: 860px) {
    .linguaai-global-nav .nav-container {
        position: relative;
        flex-wrap: wrap;
    }

    .nav-hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        border-radius: 0 0 16px 16px;
        padding: 16px;
        gap: 6px;
        z-index: 999;
        border-top: 1px solid rgba(79, 70, 229, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .nav-item {
        padding: 12px 16px;
        border-radius: 10px;
        text-align: left;
        width: 100%;
        color: #1e293b !important;
    }
}

/* =============================================
   GRAMER – Ilerleme Cubugu
   ============================================= */
.grammar-progress-bar-wrap {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    height: 8px;
    margin: 16px 0 4px;
    overflow: hidden;
}

.grammar-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 20px;
    transition: width 0.4s ease;
}

.grammar-progress-info {
    text-align: right;
    font-size: 0.82em;
    color: #888;
    margin-bottom: 16px;
}

/* =============================================
   GRAMER – Tamamlama Ekrani
   ============================================= */
.grammar-completion-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    margin: 20px 0;
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.completion-icon {
    font-size: 4em;
    margin-bottom: 12px;
}

.grammar-completion-card h2 {
    color: #065f46;
    font-size: 2em;
    margin: 0 0 10px;
}

.grammar-completion-card p {
    color: #047857;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.completion-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cs-item {
    background: white;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cs-item.correct {
    color: #065f46;
}

.cs-item.wrong {
    color: #991b1b;
}

.cs-item.skip {
    color: #854d0e;
}

/* =============================================
   GRAMER – Konu Kartlari (Tamamlandi rozeti)
   ============================================= */
.topic-card {
    position: relative;
}

.topic-card.topic-done {
    border-color: rgba(16, 185, 129, 0.5) !important;
}

.topic-card.topic-done .topic-card-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #065f46;
}

.topic-card-icon {
    position: relative;
    display: inline-block;
}

.done-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 11px;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
    z-index: 10;
}

/* =============================================
   FEATURE CARD – Hikayeler rengi
   ============================================= */
.feature-icon-wrapper.w-stories {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #059669;
}

/* Specific story level tab states when active */
#story-btn-level-A1.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #065f46 !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

#story-btn-level-A2.active {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #92400e !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

#story-btn-level-B1.active {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #1e40af !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

#story-btn-level-B2.active {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #991b1b !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

/* =============================================
   AI MENTOR PANEL STYLES
   ============================================= */
.linguaai-mentor-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* Stat Grid */
.mentor-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mentor-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.mentor-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--border-light);
    transition: var(--transition);
}

.mentor-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mentor-stat-card.streak:hover::before { background: var(--accent); }
.mentor-stat-card.level:hover::before { background: var(--primary); }
.mentor-stat-card.words:hover::before { background: var(--secondary); }
.mentor-stat-card.grammar:hover::before { background: var(--primary-light); }

.mentor-stat-icon {
    font-size: 2.2em;
    margin-bottom: 8px;
}

.mentor-stat-value {
    font-size: 2.2em;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 4px;
}

.mentor-stat-label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-dark);
}

.mentor-stat-sub {
    font-size: 0.75em;
    color: var(--text-gray);
    margin-top: 2px;
}

/* Report Card (AI Advice) */
.mentor-report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.mentor-report-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
    pointer-events: none;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding-bottom: 15px;
}

.report-avatar {
    font-size: 2.5em;
    position: relative;
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 1; }
}

.report-title-area h3 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-dark);
}

.report-status-badge {
    display: inline-block;
    font-size: 0.75em;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    margin: 5px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-status-badge.ready {
    background: #dcfce7;
    color: #15803d;
}

.report-body {
    font-size: 1.05em;
    line-height: 1.6;
    color: #334155;
}

.report-body strong {
    color: var(--primary-dark);
}

.report-body ul, .report-body ol {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 20px;
}

.report-body li {
    margin-bottom: 6px;
}

/* Skeleton Shimmer Loading */
.skeleton-shimmer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }

@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Split Layout */
.mentor-dashboard-split {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .mentor-dashboard-split {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Actions */
.sidebar-card {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-dark);
}

.sidebar-card p {
    font-size: 0.9em;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 20px;
}

.mentor-eval-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.mentor-eval-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.mentor-eval-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.quick-questions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-questions button {
    text-align: left;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-questions button:hover {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.3);
    color: var(--primary);
}

/* Chat Wrapper */
.mentor-chat-wrapper {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 520px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.mentor-chat-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mentor-chat-header h4 {
    margin: 0;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-dark);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.mentor-chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafbfe;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-message.user .chat-avatar {
    background: var(--primary);
    color: white;
}

.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
}

.chat-bubble {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.92em;
    line-height: 1.5;
}

.chat-message.assistant .chat-bubble {
    background: white;
    color: #334155;
    border-top-left-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-top-right-radius: 2px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Chat Input Area */
.mentor-chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.mentor-chat-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 0.9em;
    resize: none;
    height: 44px;
    line-height: 1.4;
    transition: border-color 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.mentor-chat-input:focus {
    border-color: var(--primary);
    outline: none;
}

.mentor-chat-send-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 16px;
    min-width: 80px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.mentor-chat-send-btn:hover {
    transform: scale(1.05);
    opacity: 0.95;
}

.mentor-chat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Chat Loading */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-gray);
}

.chat-loading span {
    animation: pulseDot 1s infinite alternate;
}

.chat-loading span:nth-child(2) { animation-delay: 0.2s; }
.chat-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulseDot {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.1); }
}

.error-text {
    color: #ef4444;
    font-weight: 500;
}

/* =============================================
   AI VOICE PRACTICE STYLES
   ============================================= */
.chat-mic-btn.recording {
    background: #ef4444 !important;
    color: white !important;
    animation: micPulse 1.5s infinite;
}

.chat-speech-btn {
    transition: transform 0.2s, opacity 0.2s;
}

.chat-speech-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

.voice-toggle-label {
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.voice-toggle-label:hover {
    background: #e2e8f0;
}

@keyframes micPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Hide theme's native headers, footers and page titles on all Linguataal pages */
body:has([id^="linguaai-"]) header,
body:has([id^="linguaai-"]) .site-header,
body:has([id^="linguaai-"]) #masthead,
body:has([id^="linguaai-"]) .entry-header,
body:has([id^="linguaai-"]) .wp-block-post-title,
body:has([id^="linguaai-"]) .entry-title,
body:has([id^="linguaai-"]) .page-header,
body:has([id^="linguaai-"]) .post-title,
body:has([id^="linguaai-"]) footer,
body:has([id^="linguaai-"]) .site-footer,
body:has([id^="linguaai-"]) #colophon,
body:has([id^="linguaai-"]) .wp-block-template-part,
body:has([id^="linguaai-"]) [data-elementor-type="header"],
body:has([id^="linguaai-"]) [data-elementor-type="footer"],
body:has([id^="linguaai-"]) .elementor-location-header,
body:has([id^="linguaai-"]) .elementor-location-footer {
    display: none !important;
}

/* =============================================
   CÜMLE PRATİĞİ (SENTENCE PRACTICE) STYLES
   ============================================= */
/* =====================================================
   SENTENCE PRACTICE — Duolingo-Inspired Premium Redesign
   ===================================================== */

/* ---- Main Practice Container ---- */
.sp-practice-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 32px 36px;
    margin: 20px auto;
    max-width: 720px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    animation: sp-fadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sp-fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Duolingo Progress Bar ---- */
.sp-progress-bar-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.sp-exit-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1.1rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}

.sp-exit-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: scale(1.08);
}

.sp-progress-bar-track {
    flex-grow: 1;
    height: 18px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.sp-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #58cc02 0%, #7ae018 100%);
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.sp-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: sp-shimmer 2.5s infinite;
}

@keyframes sp-shimmer {
    0%   { left: -60%; }
    100% { left: 120%; }
}

.sp-progress-counter {
    font-size: 0.9rem;
    font-weight: 800;
    color: #64748b;
    min-width: 38px;
    text-align: right;
    letter-spacing: -0.3px;
}

/* ---- Question Card ---- */
.sp-question-card {
    margin-bottom: 28px;
}

.sp-focus-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.08);
    color: #7c3aed;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1.5px solid rgba(139, 92, 246, 0.18);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sp-focus-tag::before {
    content: '✦';
    font-size: 0.65rem;
}

.sp-question-prompt {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 26px 0;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

/* ---- Answer Drop Zone ---- */
.sp-answer-area {
    min-height: 110px;
    background: #f8fafc;
    border: 2.5px dashed #cbd5e1;
    border-radius: 20px;
    padding: 16px 18px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.sp-answer-area:empty::after {
    content: attr(data-placeholder);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.sp-answer-area.has-content {
    border-style: solid;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.02);
}

.sp-answer-slots-area {
    min-height: 110px;
}

/* ---- Text Input (Write Mode) ---- */
.sp-answer-write-area {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-height: unset !important;
}

.sp-text-input {
    width: 100%;
    padding: 18px 22px;
    border: 2.5px solid #e2e8f0;
    border-radius: 18px;
    font-size: 1.15rem;
    color: #1e293b;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafbfc;
}

.sp-text-input:focus {
    border-color: #8b5cf6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
    background: #ffffff;
}

/* ---- Fill-in-the-Blank ---- */
.sp-answer-fill-area {
    background: transparent !important;
    border: none !important;
    min-height: unset !important;
    padding: 0 !important;
}

.sp-fill-sentence {
    font-size: 1.25rem;
    font-weight: 700;
    color: #334155;
    line-height: 2.2;
    background: #f8fafc;
    border-radius: 18px;
    padding: 22px 24px;
    border: 2px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}

.sp-inline-input {
    display: inline-block;
    width: 140px;
    padding: 4px 12px;
    border: 2.5px solid #8b5cf6;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #7c3aed;
    text-align: center;
    background: #faf5ff;
    transition: all 0.2s ease;
    vertical-align: middle;
    outline: none;
}

.sp-inline-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    width: 170px;
}

/* ---- Word Chips Basket ---- */
.sp-words-basket {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 16px 0 4px;
}

/* ---- 3D Premium Word Chips ---- */
.sp-word-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 11px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    user-select: none;
    letter-spacing: 0.1px;
    position: relative;
}

.sp-word-chip:hover:not(.used) {
    border-color: var(--primary-light);
    background: #F8FAFC;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sp-word-chip:active:not(.used) {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

.sp-word-chip.used {
    background: var(--bg-main);
    border-color: var(--border-light);
    color: var(--text-muted);
    cursor: default;
    box-shadow: none;
    transform: none;
    opacity: 0.5;
}

.sp-word-chip.selected {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: var(--shadow-primary);
    animation: sp-popIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes sp-popIn {
    from { opacity: 0; transform: scale(0.8) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Multiple Choice Buttons ---- */
.sp-answer-choice-area {
    display: flex;
    flex-direction: column;
    gap: 11px;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-height: unset !important;
}

.sp-choice-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-bottom: 4px solid #d1dae8;
    border-radius: 18px;
    padding: 17px 22px;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.sp-choice-btn::before {
    content: '';
    width: 28px;
    height: 28px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sp-choice-btn:hover {
    border-color: #a5b4fc;
    border-bottom-color: #818cf8;
    background: #faf5ff;
    color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.1);
}

.sp-choice-btn:hover::before {
    border-color: #8b5cf6;
}

.sp-choice-btn.selected {
    border-color: #8b5cf6;
    border-bottom-color: #7c3aed;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    color: #5b21b6;
    transform: translateY(1px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.sp-choice-btn.selected::before {
    background: #8b5cf6;
    border-color: #8b5cf6;
    box-shadow: inset 0 0 0 5px #faf5ff;
}

.sp-choice-btn.correct-reveal {
    border-color: #58cc02 !important;
    border-bottom-color: #4aa602 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    color: #166534 !important;
}

.sp-choice-btn.wrong-reveal {
    border-color: #ff4b4b !important;
    border-bottom-color: #cc3d3d !important;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    color: #991b1b !important;
}

/* ---- Action Footer ---- */
.sp-action-footer {
    margin-top: 28px;
    border-top: 1.5px solid #f1f5f9;
    padding-top: 22px;
}

/* ---- Feedback Banners (Duolingo full-width style) ---- */
.sp-feedback-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 20px;
    margin-bottom: 16px;
    animation: sp-slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

@keyframes sp-slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sp-feedback-banner.correct {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    color: #065f46;
}

.sp-feedback-banner.wrong {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fca5a5;
    color: #991b1b;
}

.sp-feedback-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    flex-shrink: 0;
    animation: sp-popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sp-feedback-banner.correct .sp-feedback-icon {
    background: #58cc02;
    box-shadow: 0 4px 12px rgba(88, 204, 2, 0.35);
}

.sp-feedback-banner.wrong .sp-feedback-icon {
    background: #ff4b4b;
    box-shadow: 0 4px 12px rgba(255, 75, 75, 0.35);
}

.sp-feedback-text {
    flex-grow: 1;
}

.sp-feedback-text h4 {
    margin: 0 0 3px 0;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.sp-feedback-text p {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 700;
    opacity: 0.85;
}

.sp-explain-btn {
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px solid rgba(255, 75, 75, 0.25);
    color: #b91c1c;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.sp-explain-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
    transform: translateY(-1px);
}

/* ---- AI Explanation Box ---- */
.sp-ai-explanation {
    margin-top: 14px;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.2);
    border-radius: 18px;
    padding: 18px 22px;
    font-size: 0.92rem;
    color: #3b0764;
    line-height: 1.65;
    animation: sp-fadeUp 0.3s ease;
}

.sp-ai-explanation strong {
    color: #5b21b6;
}

.sp-spinner {
    display: inline-block;
    animation: sp-spin 0.8s linear infinite;
    margin-right: 6px;
}

@keyframes sp-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---- Footer Buttons ---- */
.sp-footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.sp-check-btn, .sp-next-btn {
    min-width: 150px;
    padding: 15px 28px;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.1px;
    text-transform: uppercase;
    font-family: inherit;
}

.sp-check-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35), inset 0 -3px 0 rgba(0,0,0,0.15);
    border-bottom: 3px solid #6d28d9;
}

.sp-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45), inset 0 -3px 0 rgba(0,0,0,0.15);
}

.sp-check-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
    border-bottom-width: 1px;
}

.sp-next-btn {
    background: linear-gradient(135deg, #58cc02 0%, #4aa602 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(88, 204, 2, 0.35), inset 0 -3px 0 rgba(0,0,0,0.15);
    border-bottom: 3px solid #3d8a01;
}

.sp-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 204, 2, 0.45), inset 0 -3px 0 rgba(0,0,0,0.15);
}

.sp-next-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(88, 204, 2, 0.2);
    border-bottom-width: 1px;
}

/* ---- List Panel & Unit Grid ---- */
.sp-list-panel h3 {
    margin: 0 0 22px 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.sp-sentences-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .sp-sentences-grid {
        grid-template-columns: 1fr;
    }
    .sp-practice-box {
        padding: 22px 20px;
    }
}

/* ---- Unit Cards — Duolingo Tree Style ---- */
.sp-unit-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-bottom: 5px solid #d1dae8;
    border-radius: 22px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.sp-unit-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(139,92,246,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sp-unit-card:hover:not(.sp-status-locked) {
    transform: translateY(-4px);
    border-color: #8b5cf6;
    border-bottom-color: #7c3aed;
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.15);
}

.sp-unit-card:hover:not(.sp-status-locked)::after {
    opacity: 1;
}

.sp-unit-card:active:not(.sp-status-locked) {
    transform: translateY(1px);
    border-bottom-width: 2px;
}

.sp-status-locked {
    background: #f8fafc;
    border-color: #e2e8f0;
    border-bottom-color: #d1dae8;
    cursor: not-allowed;
    opacity: 0.6;
}

.sp-status-completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #86efac;
    border-bottom-color: #4ade80;
}

.sp-status-completed:hover:not(.sp-status-locked) {
    border-color: #22c55e !important;
    border-bottom-color: #16a34a !important;
    box-shadow: 0 12px 32px rgba(34, 197, 94, 0.18) !important;
}

.sp-status-unlocked {
    background: #ffffff;
    border-color: #8b5cf6;
    border-bottom-color: #7c3aed;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.12);
}

.sp-unit-icon-wrapper {
    font-size: 2rem;
    width: 62px;
    height: 62px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-unit-card:hover:not(.sp-status-locked) .sp-unit-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.sp-status-completed .sp-unit-icon-wrapper {
    background: rgba(88, 204, 2, 0.1);
}

.sp-status-unlocked .sp-unit-icon-wrapper {
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.sp-status-locked .sp-unit-icon-wrapper {
    background: #f1f5f9;
    color: #94a3b8;
}

.sp-unit-details {
    flex-grow: 1;
    min-width: 0;
}

.sp-unit-details h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-status-locked .sp-unit-details h4 {
    color: #94a3b8;
}

.sp-unit-desc {
    margin: 0 0 12px 0;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.4;
}

.sp-status-locked .sp-unit-desc {
    margin-bottom: 6px;
    color: #94a3b8;
}

.sp-unit-progress-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.sp-unit-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #58cc02 0%, #7ae018 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

.sp-status-completed .sp-unit-progress-bar {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.sp-unit-progress-text {
    font-size: 0.78rem;
    font-weight: 800;
    color: #58cc02;
}

.sp-status-completed .sp-unit-progress-text {
    color: #16a34a;
}

.sp-unit-locked-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
}

/* ---- Completion Trophy Card ---- */
.sp-completion-card {
    background: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 60%, #bbf7d0 100%);
    border: 2.5px solid #86efac;
    border-radius: 28px;
    padding: 50px 36px;
    text-align: center;
    margin: 20px auto;
    max-width: 520px;
    animation: sp-popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 16px 48px rgba(88, 204, 2, 0.12);
}

.sp-completion-icon {
    font-size: 5rem;
    margin-bottom: 18px;
    animation: sp-bounce 2s ease infinite;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.1));
}

@keyframes sp-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-10px) scale(1.05); }
}

.sp-completion-card h2 {
    color: #065f46;
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.sp-completion-card p {
    color: #047857;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 28px 0;
}

.sp-completion-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
}

.sp-stat-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 28px;
    min-width: 110px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 2px solid rgba(255,255,255,0.8);
}

.sp-stat-val {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.sp-stat-box:first-child .sp-stat-val {
    color: #58cc02;
}

.sp-stat-box:last-child .sp-stat-val {
    color: #ff4b4b;
}

.sp-stat-lbl {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Drag and Drop ---- */
.sp-word-chip.dragging {
    opacity: 0.3 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    transform: none !important;
}

.sp-answer-area.drag-over {
    background: rgba(139, 92, 246, 0.05) !important;
    border: 2.5px dashed #8b5cf6 !important;
    box-shadow: inset 0 0 0 3px rgba(139, 92, 246, 0.08);
}

.sp-words-basket.drag-over {
    background: rgba(0, 0, 0, 0.02) !important;
    border-radius: 16px;
}



/* Premium Nav Dropdown styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    z-index: 10000;
    padding: 8px 0;
    margin-top: 10px;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.nav-dropdown-menu.dropdown-menu-right {
    left: auto;
    right: 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
    transform: translateY(0);
}

.nav-dropdown-menu .dropdown-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569 !important;
    text-decoration: none;
    padding: 10px 16px;
    display: block;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: left;
}

.nav-dropdown-menu .dropdown-item:hover {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.08) !important;
}

.nav-dropdown-menu .dropdown-item.active {
    color: #4f46e5 !important;
    font-weight: 700;
    background: rgba(79, 70, 229, 0.05) !important;
}

.nav-dropdown-menu .dropdown-item.logout-item {
    color: #ef4444 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-dropdown-menu .dropdown-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.05) !important;
}

/* User avatar and profile name inside nav bar */
.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.nav-user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

.nav-arrow {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

/* Responsive adjustment for Mobile view */
@media (max-width: 860px) {
    .nav-dropdown {
        display: block;
        width: 100%;
    }
    .nav-dropdown-menu {
        position: static !important;
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding-left: 20px !important;
        background: transparent !important;
        transform: none !important;
        margin-top: 0 !important;
        min-width: unset !important;
    }
    .nav-dropdown-menu .dropdown-item {
        padding: 10px 16px !important;
        color: #1e293b !important;
    }
    .nav-arrow {
        display: none !important;
    }
    .nav-user-avatar {
        display: none !important;
    }
}

/* =============================================
   STORY CARD & STATISTICS BANNER STYLES
   ============================================= */
.story-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.story-difficulty-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-metadata-row {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.story-meta-pill {
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.03);
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.story-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 8px;
}

.story-action-link {
    color: #4f46e5;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease;
}

.topic-card.story-card:hover .story-action-link {
    transform: translateX(4px);
}

.stories-stats-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(168, 85, 247, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.stories-stats-banner .metric-box {
    text-align: center;
    background: white;
    padding: 10px 18px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
    min-width: 90px;
}

/* =============================================
   STAGGERED CARD ANIMATIONS
   ============================================= */
.topic-grid .topic-card:nth-child(1) { animation-delay: 0.05s; }
.topic-grid .topic-card:nth-child(2) { animation-delay: 0.1s; }
.topic-grid .topic-card:nth-child(3) { animation-delay: 0.15s; }
.topic-grid .topic-card:nth-child(4) { animation-delay: 0.2s; }
.topic-grid .topic-card:nth-child(5) { animation-delay: 0.25s; }
.topic-grid .topic-card:nth-child(6) { animation-delay: 0.3s; }
.topic-grid .topic-card:nth-child(7) { animation-delay: 0.35s; }
.topic-grid .topic-card:nth-child(8) { animation-delay: 0.4s; }
.topic-grid .topic-card:nth-child(9) { animation-delay: 0.45s; }

.feature-grid .feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-grid .feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-grid .feature-card:nth-child(3) { animation-delay: 0.15s; }
.feature-grid .feature-card:nth-child(4) { animation-delay: 0.2s; }
.feature-grid .feature-card:nth-child(5) { animation-delay: 0.25s; }
.feature-grid .feature-card:nth-child(6) { animation-delay: 0.3s; }

.panel-stats-grid .panel-stat-card:nth-child(1) { animation-delay: 0.05s; }
.panel-stats-grid .panel-stat-card:nth-child(2) { animation-delay: 0.1s; }
.panel-stats-grid .panel-stat-card:nth-child(3) { animation-delay: 0.15s; }
.panel-stats-grid .panel-stat-card:nth-child(4) { animation-delay: 0.2s; }

/* =============================================
   DIALOGUE PLAYER — Moved from inline styles
   ============================================= */
#dialogue-player-view {
    padding: 25px !important;
    border-radius: var(--lai-radius-2xl) !important;
    background: var(--lai-surface) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid var(--lai-border) !important;
    box-shadow: var(--lai-shadow-lg) !important;
}

/* Dialogue Mode Switcher (pill tabs) */
.dialogue-mode-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--lai-radius-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.dialogue-mode-switcher .mode-pill {
    border: none !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: 9px !important;
    cursor: pointer !important;
    transition: all var(--lai-duration) var(--lai-ease) !important;
    background: transparent !important;
    color: var(--lai-text-muted) !important;
}

.dialogue-mode-switcher .mode-pill.active {
    background: var(--lai-surface-solid) !important;
    color: var(--lai-primary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.dialogue-mode-switcher .mode-pill:hover:not(.active) {
    color: var(--lai-text-body) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Dialogue title and desc */
#dialogue-title {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 800;
    color: var(--lai-text-heading);
    font-size: 1.8rem;
}

#dialogue-desc {
    color: var(--lai-text-muted);
    margin-bottom: 25px;
    font-style: italic;
    font-size: 1rem;
}

/* Dialogue audio button */
.dialogue-audio-btn {
    background: var(--lai-primary-light);
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--lai-primary);
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    box-shadow: var(--lai-shadow-xs);
    transition: all var(--lai-duration) var(--lai-ease);
}

.dialogue-audio-btn:hover {
    background: rgba(79, 70, 229, 0.15);
    transform: scale(1.05);
    box-shadow: var(--lai-shadow-sm);
}

/* Dialogue header row */
.dialogue-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dialogue-header-content {
    flex: 1;
}

/* =============================================
   GRAMMAR THEORY CARD — Enhanced
   ============================================= */
.grammar-theory-card {
    background: var(--lai-surface);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid var(--lai-border);
    border-radius: var(--lai-radius-2xl);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--lai-shadow-md);
    animation: lai-fadeInUp 0.4s var(--lai-ease) both;
}

/* =============================================
   GLOSSARY & QUIZ CARDS — Enhanced
   ============================================= */
.glossary-card,
.story-quiz-card {
    background: var(--lai-surface) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--lai-border) !important;
    box-shadow: var(--lai-shadow-sm) !important;
    transition: all var(--lai-duration) var(--lai-ease);
    border-radius: var(--lai-radius-xl) !important;
}

.glossary-card:hover,
.story-quiz-card:hover {
    box-shadow: var(--lai-shadow-md) !important;
    border-color: var(--lai-border-hover) !important;
}

/* =============================================
   STORIES STATS BANNER — Enhanced
   ============================================= */
.stories-stats-banner {
    background: linear-gradient(135deg, var(--lai-primary-light) 0%, rgba(168, 85, 247, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    padding: var(--lai-space-lg);
    border-radius: var(--lai-radius-xl);
    margin-bottom: var(--lai-space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--lai-space-lg);
    flex-wrap: wrap;
    box-shadow: var(--lai-shadow-xs);
    animation: lai-fadeInUp 0.4s var(--lai-ease) both;
}

/* =============================================
   SIDEBAR — Enhanced with design tokens
   ============================================= */
.linguaai-sidebar .sidebar-item {
    transition: all var(--lai-duration) var(--lai-ease) !important;
}

.linguaai-sidebar .sidebar-item:hover {
    color: var(--lai-primary) !important;
    background: var(--lai-primary-light) !important;
}

.linguaai-sidebar .sidebar-item.active {
    color: #ffffff !important;
    background: var(--lai-primary-gradient) !important;
    box-shadow: 0 4px 15px var(--lai-primary-glow) !important;
}

/* =============================================
   TOPBAR — Enhanced with design tokens
   ============================================= */
.linguaai-topbar {
    box-shadow: var(--lai-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-level-selector .level-pill.active {
    background: var(--lai-surface-solid);
    color: var(--lai-primary);
    box-shadow: var(--lai-shadow-sm);
}

/* =============================================
   VOCAB BUTTONS — Enhanced consistency
   ============================================= */
.vocab-btn {
    transition: all var(--lai-duration) var(--lai-ease);
    border-radius: var(--lai-radius-md);
}

.vocab-btn.know {
    background: var(--lai-primary-gradient);
    box-shadow: 0 4px 12px var(--lai-primary-glow);
}

.vocab-btn.know:hover {
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
    transform: translateY(-2px);
}

.vocab-btn.skip {
    background: #f1f5f9;
    color: var(--lai-text-muted);
    border: 1px solid var(--lai-border);
}

.vocab-btn.skip:hover {
    background: #e2e8f0;
    color: var(--lai-text-heading);
    transform: translateY(-2px);
}

/* =============================================
   GLOBAL FRAME, BORDER & SHADOW UNIFICATION
   ============================================= */
.linguaai-topbar,
.linguaai-image-hero,
.todo-overlap-box,
.exact-level-bar-container,
.img-task-card,
.img-explore-card,
.langs-section {
    border-radius: 20px !important;
    border: 1px solid var(--lai-border, #e2e8f0) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.01) !important;
}

.linguaai-topbar {
    background: #ffffff !important;
}

.linguaai-image-hero {
    background: #ffffff !important;
    padding: 35px 40px !important;
}

.exact-level-bar-container {
    background: #ffffff !important;
}

.langs-section {
    background: #ffffff !important;
}

/* Ensure sidebar and topbar are always clickable and on top of any page content */
.linguaai-sidebar {
    z-index: 99999 !important;
    pointer-events: auto !important;
}
.linguaai-topbar {
    z-index: 99990 !important;
    pointer-events: auto !important;
}

/* =============================================
   HATA BILDIR (REPORT ERROR) STYLES
   ============================================= */
.sp-report-btn {
    background: transparent;
    border: 1px solid var(--lai-border);
    color: var(--lai-text-muted);
    font-size: 0.9em;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.sp-report-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: translateY(-1px);
}
.sp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeInModal 0.25s ease-out;
}
.sp-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: slideUpModal 0.25s ease-out;
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.sp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}
.sp-modal-header h3 {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
    color: #1e293b;
}
.sp-modal-close {
    background: none;
    border: none;
    font-size: 1.25em;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
}
.sp-modal-close:hover {
    color: #475569;
}
.sp-modal-body {
    padding: 24px;
}
.sp-modal-body p {
    margin-top: 0;
    font-size: 0.9em;
    line-height: 1.5;
    color: #64748b;
}
.sp-modal-body textarea {
    width: 100%;
    height: 120px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.95em;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    margin-top: 10px;
}
.sp-modal-body textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.sp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}
.sp-modal-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}
.sp-btn-cancel {
    background: #e2e8f0;
    color: #475569;
}
.sp-btn-cancel:hover {
    background: #cbd5e1;
}
.sp-btn-submit {
    background: #6366f1;
    color: #ffffff;
}
.sp-btn-submit:hover {
    background: #4f46e5;
}
.sp-btn-submit:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUpModal {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

/* Guest Header & CSS Logo Styles */
.guest-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.05) !important;
    position: relative !important;
    z-index: 99999 !important;
}

.guest-logo {
    display: flex;
    align-items: center;
}

.guest-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.guest-nav-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.guest-nav-link:hover {
    color: #4f46e5;
}

.guest-nav-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    transition: all 0.2s ease;
}

.guest-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

/* Guest Header Official Logo */
.guest-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Sidebar Official Logo styling */
.sidebar-logo-img {
    height: 38px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* Centering Layout when Logged Out */
#linguaai-app.logged-out-app {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 1200px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    background: #ffffff !important;
}

@media (max-width: 600px) {
    .guest-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    .guest-nav {
        gap: 15px;
    }
    .guest-nav-btn {
        display: none;
    }
}

/* WordPress Admin Bar Compatibility */
.admin-bar .linguaai-sidebar {
    top: 32px !important;
}
.admin-bar .linguaai-topbar {
    top: 47px !important; /* 32px adminbar + 15px margin-top */
}

@media screen and (max-width: 860px) {
    .admin-bar .linguaai-sidebar {
        top: 32px !important;
        height: calc(100vh - 32px) !important;
    }
    .admin-bar .linguaai-topbar {
        top: 42px !important; /* 32px adminbar + 10px top margin */
    }
}

@media screen and (max-width: 782px) {
    .admin-bar .linguaai-sidebar {
        top: 46px !important;
        height: calc(100vh - 46px) !important;
    }
    .admin-bar .linguaai-topbar {
        top: 56px !important; /* 46px adminbar + 10px top margin */
    }
}

/* Google / Social Login Styling */
.linguaai-social-login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

.linguaai-social-login-separator::before,
.linguaai-social-login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.linguaai-social-login-separator:not(:empty)::before {
    margin-right: .75em;
}

.linguaai-social-login-separator:not(:empty)::after {
    margin-left: .75em;
}

.linguaai-social-login-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    width: 100%;
}

.linguaai-social-login-buttons .nsl-container {
    width: 100% !important;
}

.linguaai-social-login-buttons .nsl-container-grid .nsl-button-google {
    width: 100% !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.02) !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #334155 !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.linguaai-social-login-buttons .nsl-container-grid .nsl-button-google:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}



.linguaai-social-login-buttons .nsl-button-label-container { justify-content: center !important; align-items: center !important; display: flex !important; width: 100% !important; margin: 0 !important; padding: 0 !important; text-align: center !important; }
.linguaai-social-login-buttons .nsl-container-block .nsl-button { display: flex !important; justify-content: center !important; }
