/* ============================================
   Studiamo – Custom Styles
   ============================================ */

:root {
    --color-primary: #e85d26;
    --color-primary-dark: #c94d1a;
    --color-primary-light: #fff3ee;
    --color-bg: #faf9f7;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #1a1a2e;
    --color-muted: #6b7280;

    /* Highlight colors */
    --hl-verb-bg: #dbeafe;
    --hl-verb-color: #1d4ed8;
    --hl-vocab-bg: #fef9c3;
    --hl-vocab-color: #a16207;
    --hl-grammar-bg: #ede9fe;
    --hl-grammar-color: #6d28d9;
    --hl-phrase-bg: #dcfce7;
    --hl-phrase-color: #15803d;
    --hl-flashcard-bg: #fed7aa;
    --hl-flashcard-color: #c2410c;
}

/* Base */
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
}

/* ============ NAVBAR ============ */
.studiamo-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.navbar-brand {
    font-size: 1.2rem;
    color: var(--color-primary) !important;
    letter-spacing: -0.01em;
}

.brand-icon { font-size: 1.3rem; }

.nav-link { color: var(--color-muted) !important; font-weight: 500; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--color-primary) !important; }

/* ============ BUTTONS ============ */
.btn-studiamo {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.5rem 1.2rem;
}
.btn-studiamo:hover { background: var(--color-primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,93,38,0.3); }

.btn-outline-studiamo {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-outline-studiamo:hover { background: var(--color-primary); color: white; }

.btn-outline-orange { border: 1.5px solid #ea580c; color: #ea580c; background: transparent; border-radius: 8px; font-weight: 500; }
.btn-outline-orange:hover { background: #ea580c; color: white; }

/* ============ HERO SECTION ============ */
.hero-section {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, #fffbf8 0%, #fff3ee 50%, #faf9f7 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    color: var(--color-muted);
    font-weight: 500;
}

.badge-dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-muted);
    margin: 1rem 0 2rem;
    max-width: 520px;
}

.hero-trust { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--color-muted); }
.trust-item { display: flex; align-items: center; }

/* Hero Preview Card */
.hero-preview-card {
    background: white;
    border-radius: 18px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.preview-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--color-border);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-dots { display: flex; gap: 6px; }
.preview-dots span { width: 12px; height: 12px; border-radius: 50%; background: #ddd; }
.preview-dots span:first-child { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #febc2e; }
.preview-dots span:last-child { background: #28c840; }

.preview-title { font-size: 0.85rem; color: var(--color-muted); font-weight: 500; }

.preview-body { padding: 1.5rem; }
.preview-text { font-family: 'Lora', serif; font-size: 1.05rem; line-height: 1.8; margin-bottom: 0.8rem; }

.preview-ai-panel {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
.ai-chip {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============ SECTIONS ============ */
.section-light { background: #f8f7f5; }

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}
.section-subtitle { color: var(--color-muted); font-size: 1.1rem; }

/* Step Cards */
.step-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.step-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.step-card-featured { border-color: var(--color-primary); background: var(--color-primary-light); }

/* Clickable card */
.step-card-link {
    cursor: pointer;
    user-select: none;
}
.step-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(232, 93, 38, 0.2);
    border-color: var(--color-primary);
}
.step-number { font-size: 0.75rem; font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.1em; }
.step-icon { font-size: 2.5rem; margin: 0.5rem 0; }
.step-card h5 { font-weight: 700; margin-bottom: 0.5rem; }

/* Feature Cards */
.feature-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: white;
    border-radius: 14px;
    padding: 1.4rem;
    border: 1px solid var(--color-border);
    height: 100%;
}
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.feature-card h6 { font-weight: 700; margin-bottom: 0.25rem; }
.feature-card p { color: var(--color-muted); font-size: 0.9rem; margin: 0; }

/* Highlight Legend Card */
.highlight-legend-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 2rem;
}
.legend-example-text {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}
.legend-items { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.legend-item { font-size: 0.85rem; font-weight: 500; color: var(--color-muted); display: flex; align-items: center; gap: 0.4rem; }

/* CTA Section */
.cta-section { background: linear-gradient(135deg, #1a1a2e 0%, #2d1a3d 100%); color: white; }
.cta-title { font-size: 2.2rem; font-weight: 800; color: white; }
.cta-subtitle { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ============ HIGHLIGHTS ============ */
.highlight-verb {
    background: var(--hl-verb-bg);
    color: var(--hl-verb-color);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.highlight-vocab {
    background: var(--hl-vocab-bg);
    color: var(--hl-vocab-color);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.highlight-grammar {
    background: var(--hl-grammar-bg);
    color: var(--hl-grammar-color);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.highlight-phrase {
    background: var(--hl-phrase-bg);
    color: var(--hl-phrase-color);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.highlight-flashcard {
    background: var(--hl-flashcard-bg);
    color: var(--hl-flashcard-color);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}

.highlight-verb:hover, .highlight-vocab:hover,
.highlight-grammar:hover, .highlight-phrase:hover, .highlight-flashcard:hover {
    filter: brightness(0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* hl- classes for landing page preview */
.hl-verb { background: var(--hl-verb-bg); color: var(--hl-verb-color); border-radius: 3px; padding: 1px 4px; }
.hl-vocab { background: var(--hl-vocab-bg); color: var(--hl-vocab-color); border-radius: 3px; padding: 1px 4px; }
.hl-grammar { background: var(--hl-grammar-bg); color: var(--hl-grammar-color); border-radius: 3px; padding: 1px 4px; }
.hl-phrase { background: var(--hl-phrase-bg); color: var(--hl-phrase-color); border-radius: 3px; padding: 1px 4px; }

/* ============ READER ============ */
.reader-header {
    background: white;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 65px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reader-lesson-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.reader-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.btn-action {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid #fbd6c3;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s;
}
.btn-action:hover { background: var(--color-primary); color: white; }

.lesson-level-badge { background: var(--color-primary); color: white; border-radius: 5px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700; }
.lesson-level-badge-sm { background: var(--color-primary-light); color: var(--color-primary); border-radius: 5px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700; }

/* Selection toolbar */
.selection-toolbar {
    position: fixed;
    background: #1a1a2e;
    color: white;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 2000;
    pointer-events: all;
}
.stb-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.stb-btn:hover { background: rgba(255,255,255,0.2); }
.stb-btn-orange { background: var(--color-primary) !important; }

/* Highlight legend bar */
.highlight-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.6rem 1rem;
}
.legend-label { color: var(--color-muted); font-weight: 600; }
.legend-chip { border-radius: 4px; padding: 2px 8px; font-size: 0.78rem; cursor: default; }

/* Lesson Sections */
.lesson-section {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 2rem;
    margin-bottom: 1.5rem;
    font-family: 'Lora', serif;
}

.section-type-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    font-family: 'Inter', sans-serif;
    margin-bottom: 0.5rem;
}

.section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--color-primary-light);
    color: var(--color-text);
}

.section-content { font-size: 1.05rem; line-height: 1.9; }
.section-content p { margin-bottom: 1rem; }
.section-content ul, .section-content ol { padding-left: 1.5rem; }
.section-content li { margin-bottom: 0.5rem; }

/* Section type colors */
.section-vocabulary .section-heading { border-color: var(--hl-vocab-bg); }
.section-grammar .section-heading { border-color: var(--hl-grammar-bg); }
.section-phrases .section-heading { border-color: var(--hl-phrase-bg); }
.section-questions .section-heading { border-color: #e5e7eb; }

/* Grammar Box */
.grammar-box {
    background: var(--hl-grammar-bg);
    border: 1px solid #c4b5fd;
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Inter', sans-serif;
}
.grammar-structure {
    background: white;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-size: 0.95rem;
    border: 1px solid #c4b5fd;
}
.grammar-examples { margin: 1rem 0; }
.example-sentence {
    display: block;
    background: white;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    border-left: 4px solid var(--hl-grammar-color);
}
.grammar-note {
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

/* Vocab Table */
.vocab-table { font-family: 'Inter', sans-serif; font-size: 0.95rem; border-radius: 8px; overflow: hidden; }
.vocab-table thead { background: var(--hl-vocab-bg); }
.vocab-table thead th { font-weight: 700; color: var(--hl-vocab-color); }

/* Phrases List */
.phrases-list { list-style: none; padding: 0; }
.phrases-list li {
    background: var(--hl-phrase-bg);
    border-left: 4px solid var(--hl-phrase-color);
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 1rem;
    margin-bottom: 0.7rem;
    font-size: 1.05rem;
    color: var(--hl-phrase-color);
}

/* Questions List */
.questions-list li { margin-bottom: 0.8rem; font-size: 1.05rem; }

/* ============ CLAUDE SIDEBAR ============ */
.claude-panel {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.claude-panel-header {
    background: linear-gradient(135deg, #1a1a2e, #2d1a3d);
    color: white;
    padding: 1rem 1.2rem;
}

.claude-avatar {
    width: 36px; height: 36px;
    background: var(--color-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

.api-status-text { color: rgba(255,255,255,0.6); font-size: 0.78rem; }
.tts-status-text { color: rgba(0,0,0,0.45); font-size: 0.78rem; }

.claude-panel-body { padding: 1rem; }

.selected-text-box {
    background: #f8f9fa;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.9rem;
    min-height: 60px;
    margin-bottom: 0.8rem;
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: var(--color-text);
}

.claude-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 0.8rem; }

.ca-btn {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid #fbd6c3;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.ca-btn:hover:not(:disabled) { background: var(--color-primary); color: white; }
.ca-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.claude-response {
    background: #f8f9fa;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.9rem;
    min-height: 80px;
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.6;
}

.welcome-msg { color: var(--color-muted); font-size: 0.88rem; }
.welcome-msg p { margin-bottom: 0.5rem; }

.ai-response { font-size: 0.88rem; }
.ai-response h6 { font-weight: 700; color: var(--color-primary); margin-bottom: 0.5rem; }
.ai-response table { font-size: 0.82rem; }
.loading-dots::after { content: '...'; animation: dots 1s infinite; }
@keyframes dots { 0%,33% { content:'.'; } 33%,66% { content:'..'; } 66%,100% { content:'...'; } }

/* Speaker panel */
.speaker-panel {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
}

/* ============ UPLOAD PAGE ============ */
.upload-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.upload-icon-wrap {
    width: 72px; height: 72px;
    background: var(--color-primary-light);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    color: var(--color-primary);
    margin: 0 auto;
}

.dropzone {
    border: 2px dashed var(--color-border);
    border-radius: 14px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fafafa;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--color-primary); background: var(--color-primary-light); }
.dropzone.has-file { border-color: #10b981; background: #f0fdf4; }
.dropzone-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.dropzone-icon { font-size: 2.5rem; color: var(--color-muted); display: block; margin-bottom: 0.5rem; }

.tips-list { list-style: none; padding: 0; }
.tips-list li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--color-muted);
    padding-left: 1.5rem;
    position: relative;
}
.tips-list li::before { content: '→'; position: absolute; left: 0; color: var(--color-primary); }

.upload-loading { text-align: center; padding: 2rem; }
.loading-spinner { display: flex; justify-content: center; }
.text-studiamo { color: var(--color-primary) !important; }

/* ============ LESSONS LIST ============ */
.lesson-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.lesson-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.lesson-card-demo { border-color: var(--color-primary); }
.demo-badge {
    position: absolute; top: 0.8rem; right: 0.8rem;
    background: var(--color-primary); color: white;
    border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700;
}
.lesson-card-body { padding: 1.5rem; }
.lesson-title { font-size: 1.05rem; font-weight: 700; margin: 0.5rem 0 0.3rem; line-height: 1.3; }
.lesson-meta { font-size: 0.82rem; color: var(--color-muted); margin-bottom: 1rem; }
.lesson-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ============ FLASHCARDS ============ */
.flashcard-container {
    perspective: 1200px;
    cursor: pointer;
    /* Fixed height so absolutely-positioned faces don't collapse the container */
    height: 260px;
}
.flashcard {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.52s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-radius: 20px;
}
.flashcard.is-flipped {
    transform: rotateY(180deg);
}
.flashcard:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.12); }

/* Both faces share the same absolute footprint */
.flashcard-front,
.flashcard-back {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 2px solid var(--color-border);
    background: white;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    text-align: center;
    overflow-y: auto;
}
/* Back face starts rotated — becomes visible only after flip */
.flashcard-back {
    transform: rotateY(180deg);
}

.card-side-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flashcard-text {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}
.flashcard-answer { font-size: 1.4rem; color: #15803d; }
.flashcard-grammar { font-family: 'Inter', sans-serif; font-size: 0.85rem; }
.flashcard-example { font-family: 'Lora', serif; color: var(--color-muted); }

/* Review buttons */
.btn-review {
    display: flex; flex-direction: column; align-items: center;
    border: none; border-radius: 12px; padding: 0.8rem 1.5rem;
    cursor: pointer; transition: all 0.2s; min-width: 80px;
    font-family: 'Inter', sans-serif;
}
.btn-review-label { font-weight: 700; font-size: 0.95rem; }
.btn-review-sub { font-size: 0.72rem; opacity: 0.8; }
.btn-review:hover { transform: translateY(-2px); }

.btn-again { background: #fee2e2; color: #dc2626; }
.btn-again:hover { background: #dc2626; color: white; }
.btn-hard { background: #fed7aa; color: #c2410c; }
.btn-hard:hover { background: #c2410c; color: white; }
.btn-good { background: #bbf7d0; color: #15803d; }
.btn-good:hover { background: #15803d; color: white; }
.btn-easy { background: #bfdbfe; color: #1d4ed8; }
.btn-easy:hover { background: #1d4ed8; color: white; }

.speak-btn-sm {
    background: none; border: none; color: var(--color-muted);
    padding: 0; cursor: pointer; font-size: 1rem; transition: color 0.2s;
}
.speak-btn-sm:hover { color: var(--color-primary); }

/* Flashcard list panel */
.flashcards-list-panel {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.2rem;
    height: 100%;
}
.fc-list { max-height: 420px; overflow-y: auto; }
.fc-list-item {
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.fc-list-item:hover { background: #f8f9fa; border-color: var(--color-border); }
.fc-list-item-active { background: var(--color-primary-light); border-color: var(--color-primary); }
.fc-front { font-weight: 600; font-size: 0.9rem; }
.fc-back { font-size: 0.82rem; }

.session-complete { padding: 3rem 0; }
.complete-icon { font-size: 4rem; }
.score-box {
    display: inline-block;
    background: var(--color-primary-light);
    border-radius: 16px;
    padding: 1.5rem 3rem;
}
.score-num { font-size: 3rem; font-weight: 800; color: var(--color-primary); }
.score-label { color: var(--color-muted); font-size: 0.9rem; }

.bg-studiamo { background-color: var(--color-primary) !important; }

/* ============ SONGS PAGE ============ */
.songs-icon-wrap {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: white;
    margin: 0 auto;
}

.song-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 2rem;
}

.coming-soon-card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}
.coming-soon-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.coming-soon-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }

.saved-song-item { padding: 0.7rem 0; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; }

/* ============ FOOTER ============ */
.studiamo-footer {
    background: white;
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* ============ EMPTY STATES ============ */
.empty-state { color: var(--color-muted); }

/* ============ MISC ============ */
.form-control:focus, .form-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(232,93,38,0.15); }

.text-studiamo { color: var(--color-primary) !important; }

/* Spinner for API calls */
.ai-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-muted);
    font-size: 0.88rem;
    padding: 0.5rem 0;
}

/* ============ VERB CONJUGATION PANEL ============ */
.verb-panel {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.verb-panel-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}
.verb-panel-body {
    padding: 0.75rem 1rem;
}
.verb-result { font-size: 0.85rem; }
.conj-tense-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6366f1;
    margin-bottom: 0.3rem;
    margin-top: 0.1rem;
}
.conj-table { width: 100%; border-collapse: collapse; }
.conj-table td { padding: 0.18rem 0.3rem; font-size: 0.85rem; }
.conj-table tr:nth-child(even) td { background: #f8f7ff; }

/* Conjugate action button — purple accent */
.ca-btn-conjugate {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe) !important;
    color: #5b21b6 !important;
    border-color: #c4b5fd !important;
}
.ca-btn-conjugate:hover { background: linear-gradient(135deg, #ddd6fe, #c4b5fd) !important; }


/* ============================================================
   LANDING PAGE v2 — lp-* classes  (polished pass)
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.lp-hero {
    padding: 4.5rem 0 4rem;
    background: linear-gradient(150deg, #fffbf5 0%, #fff4ed 40%, #f5fdf7 100%);
    position: relative;
    overflow: hidden;
}
/* Soft decorative blobs — no extra DOM */
.lp-hero::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(232,93,38,0.07) 0%, transparent 70%);
    top: -150px; right: -120px;
    pointer-events: none;
}
.lp-hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(22,163,74,0.06) 0%, transparent 70%);
    bottom: -80px; left: -60px;
    pointer-events: none;
}

/* ── Badge ─────────────────────────────────────────────────── */
.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(232,93,38,0.2);
    border-radius: 20px;
    padding: 0.28rem 0.9rem;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 500;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.lp-badge-dot {
    width: 7px; height: 7px;
    background: #16a34a;
    border-radius: 50%;
    animation: lp-pulse 2s ease-in-out infinite;
}
@keyframes lp-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.85)} }

/* ── Headline ─────────────────────────────────────────────── */
.lp-headline {
    font-size: clamp(2.1rem, 4.8vw, 3.1rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #111827;
    margin-bottom: 0;
}
.lp-headline-accent {
    color: var(--color-primary);
    font-style: italic;
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Body copy ────────────────────────────────────────────── */
.lp-description {
    font-size: 1.07rem;
    color: #4b5563;
    max-width: 480px;
    margin: 1rem 0 1.25rem;
    line-height: 1.8;
}

/* ── Benefits list ────────────────────────────────────────── */
.lp-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1.2rem;
}
.lp-benefits li {
    font-size: 0.93rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.lp-benefits li .bi {
    font-size: 1rem;
    color: #16a34a;
    flex-shrink: 0;
}

/* ── CTA buttons ──────────────────────────────────────────── */
.lp-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn-lp-primary {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.97rem;
    letter-spacing: -0.01em;
    padding: 0.6rem 1.4rem;
    transition: background 0.2s, transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 10px rgba(232,93,38,0.25);
}
.btn-lp-primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232,93,38,0.35);
}
.btn-lp-primary:active { transform: translateY(0); }

.btn-lp-secondary {
    background: rgba(255,255,255,0.7);
    color: #1a1a2e;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.97rem;
    padding: 0.6rem 1.4rem;
    backdrop-filter: blur(6px);
    transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.18s;
}
.btn-lp-secondary:hover {
    background: #fff;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* ── Trust line ───────────────────────────────────────────── */
.lp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-size: 0.8rem;
    color: #9ca3af;
}
.lp-trust span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.lp-trust .bi { font-size: 0.85rem; }

/* ── Mockup wrapper (glow) ────────────────────────────────── */
.lp-mockup-wrap {
    position: relative;
    z-index: 1;
}
.lp-mockup-wrap::before {
    content: '';
    position: absolute;
    inset: -28px;
    background: radial-gradient(ellipse at 60% 40%, rgba(232,93,38,0.13) 0%, rgba(22,163,74,0.07) 60%, transparent 80%);
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

/* ── Mockup card ──────────────────────────────────────────── */
.lp-mockup {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(229,231,235,0.8);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.08),
        0 32px 64px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.5) inset;
    overflow: hidden;
}

.lp-mock-bar {
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.7rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.lp-mock-dots { display: flex; gap: 6px; align-items: center; }
.lp-mock-dots span { width: 11px; height: 11px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.lp-mock-title {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    flex: 1;
}
.lp-mock-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.67rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.1rem 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lp-mock-body { padding: 1.1rem 1.3rem 1.3rem; }

.lp-mock-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #9ca3af;
    margin-bottom: 0.65rem;
}

/* Lines */
.lp-mock-lines { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.85rem; }

.lp-mock-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start;
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}
.lp-mock-line-active { border-color: rgba(232,93,38,0.2); box-shadow: 0 0 0 2px rgba(232,93,38,0.08); }

.lp-mock-it {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.87rem;
    line-height: 1.55;
    color: #1f2937;
    padding: 0.42rem 0.65rem;
    background: #fafafa;
}
.lp-mock-line-active .lp-mock-it { background: #fff9f7; }

.lp-mock-en {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.55;
    padding: 0.42rem 0.65rem;
    background: #fff;
    border-left: 2px solid #f0f0f0;
}
.lp-mock-line-active .lp-mock-en { border-left-color: rgba(232,93,38,0.2); }

/* Grammar + Verb panels */
.lp-mock-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.lp-mock-panel {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    font-size: 0.82rem;
}
.lp-mock-panel-head {
    padding: 0.3rem 0.65rem;
    font-weight: 700;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
}
.lp-mock-panel-body {
    padding: 0.45rem 0.65rem;
    line-height: 1.55;
    background: #fff;
}
.lp-mock-panel-grammar .lp-mock-panel-head { background: #ede9fe; color: #6d28d9; }
.lp-mock-panel-verb    .lp-mock-panel-head { background: #dbeafe; color: #1d4ed8; }

/* Chips */
.lp-mock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.lp-mock-chip {
    background: #fed7aa;
    color: #c2410c;
    border-radius: 20px;
    padding: 0.18rem 0.6rem;
    font-size: 0.76rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.lp-mock-chip-add {
    background: #f3f4f6;
    color: #9ca3af;
    border: 1px dashed #d1d5db;
}

/* Audio bar */
.lp-mock-audio {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #e9e9e9;
}
.lp-mock-play {
    width: 26px; height: 26px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(232,93,38,0.3);
}
.lp-mock-wave {
    display: flex;
    align-items: center;
    gap: 2.5px;
    flex: 1;
}
.lp-mock-wave span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: var(--color-primary);
    opacity: 0.6;
    transform-origin: center;
    animation: lp-wave 1.4s ease-in-out infinite;
}
.lp-mock-wave span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.lp-mock-wave span:nth-child(2) { height: 16px; animation-delay: 0.12s; }
.lp-mock-wave span:nth-child(3) { height: 22px; animation-delay: 0.24s; }
.lp-mock-wave span:nth-child(4) { height: 13px; animation-delay: 0.36s; }
.lp-mock-wave span:nth-child(5) { height: 20px; animation-delay: 0.18s; }
.lp-mock-wave span:nth-child(6) { height: 11px; animation-delay: 0.3s; }
.lp-mock-wave span:nth-child(7) { height: 18px; animation-delay: 0.06s; }
.lp-mock-wave span:nth-child(8) { height: 7px;  animation-delay: 0.42s; }
@keyframes lp-wave {
    0%,100% { transform: scaleY(1); opacity: 0.55; }
    50%      { transform: scaleY(0.35); opacity: 0.3; }
}
.lp-mock-audio-label {
    font-size: 0.77rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

/* ── Learner strip ────────────────────────────────────────── */
.lp-learner-strip {
    background: linear-gradient(90deg, #1a1a2e 0%, #2d1a3d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    flex-wrap: wrap;
}
.lp-learner-flag { font-size: 1.3rem; }
.lp-learner-quote {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.88);
    font-style: italic;
    font-family: 'Lora', Georgia, serif;
}
.lp-learner-tag {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
}

/* ── Learn from real Italian ──────────────────────────────── */
.lp-real { background: #faf9f7; }

.lp-real-card {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 18px;
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.lp-real-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.09);
    border-color: rgba(232,93,38,0.25);
}

.lp-real-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.lp-real-icon-music  { background: linear-gradient(135deg, #fef3c7, #fed7aa); color: #b45309; }
.lp-real-icon-lesson { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.lp-real-icon-chat   { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #047857; }

.lp-real-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.4rem;
}
.lp-real-desc {
    font-size: 0.87rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.65;
}

/* Mini preview areas */
.lp-real-preview {
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 0.83rem;
}
.lp-real-preview-music  { background: #fffbf0; border: 1px solid #fde68a; }
.lp-real-preview-lesson { background: #f8faff; border: 1px solid #bfdbfe; }
.lp-real-preview-chat   { background: #f0fdf8; border: 1px solid #a7f3d0; }

.lp-rp-line {
    font-family: 'Lora', Georgia, serif;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.lp-rp-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.lp-rp-chip {
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 20px;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.lp-rp-chip-orange { background: #fed7aa; color: #c2410c; }

/* Doc preview */
.lp-rp-doc { display: flex; flex-direction: column; gap: 0.3rem; }
.lp-rp-doc-title {
    font-weight: 700;
    color: #1d4ed8;
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}
.lp-rp-doc-line { font-size: 0.82rem; color: #374151; font-family: 'Lora', Georgia, serif; }
.lp-rp-doc-dim  { color: #9ca3af; font-style: italic; font-size: 0.78rem; font-family: 'Inter', sans-serif; }

/* Chat bubbles */
.lp-rp-bubble {
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    font-style: italic;
    margin-bottom: 0.3rem;
    font-size: 0.83rem;
    color: #374151;
}
.lp-rp-bubble-a { background: #e0f2fe; align-self: flex-start; border-radius: 0 10px 10px 10px; }
.lp-rp-bubble-b { background: #dcfce7; align-self: flex-end;   border-radius: 10px 0 10px 10px; }

/* ── How it works ────────────────────────────────────────── */
.lp-how { background: #fff; }

.lp-step {
    background: #faf9f7;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1.8rem 1.5rem;
    height: 100%;
    transition: transform 0.22s, box-shadow 0.22s;
}
.lp-step:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.07); }
.lp-step-accent {
    border-color: rgba(232,93,38,0.35);
    background: #fff8f5;
    box-shadow: 0 4px 16px rgba(232,93,38,0.09);
}
.lp-step-num {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    margin-bottom: 0.65rem;
}
.lp-step-icon { font-size: 2rem; margin-bottom: 0.75rem; color: var(--color-primary); }
.lp-step h6 { font-weight: 700; margin-bottom: 0.5rem; font-size: 0.95rem; color: #111827; }
.lp-step p  { font-size: 0.86rem; color: #6b7280; margin: 0; line-height: 1.65; }

/* ── Why Studiamo ─────────────────────────────────────────── */
.lp-why { background: #f8f7f5; }

.lp-why-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.3rem;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}
.lp-why-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.lp-why-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}
.lp-why-icon-orange { background: #fff3ee; color: var(--color-primary); }
.lp-why-icon-green  { background: #dcfce7; color: #16a34a; }
.lp-why-icon-purple { background: #ede9fe; color: #7c3aed; }
.lp-why-icon-cream  { background: #fef9c3; color: #a16207; }
.lp-why-card h6 { font-weight: 700; margin-bottom: 0.35rem; font-size: 0.94rem; color: #111827; }
.lp-why-card p  { font-size: 0.84rem; color: #6b7280; margin: 0; line-height: 1.6; }

/* ── Grammar library cards ───────────────────────────────── */
.lp-grammar-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e9d5ff;
    padding: 1.4rem;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}
.lp-grammar-card:hover { box-shadow: 0 8px 24px rgba(109,40,217,0.1); transform: translateY(-2px); }
.lp-grammar-icon {
    width: 2.7rem; height: 2.7rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    color: #6d28d9;
    margin-bottom: 0.8rem;
}
.lp-grammar-card strong { font-size: 0.96rem; color: #1f2937; }
.lp-grammar-card p { font-size: 0.83rem; color: #6b7280; margin: 0.35rem 0 0; line-height: 1.6; }

.lp-level-badge {
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.1rem 0.42rem;
}
.lp-level-a2 { background: #d1fae5; color: #065f46; }
.lp-level-b1 { background: #dbeafe; color: #1e40af; }
.lp-level-b2 { background: #fef3c7; color: #92400e; }

/* ── CTA section buttons ─────────────────────────────────── */
.btn-cta-outline {
    border: 2px solid rgba(255,255,255,0.45);
    color: #fff;
    background: transparent;
    border-radius: 12px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s, transform 0.18s;
}
.btn-cta-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.8);
    color: #fff;
    transform: translateY(-2px);
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lp-hero { padding: 3rem 0 2.5rem; }
    .lp-headline { font-size: 2rem; }
    .lp-benefits { grid-template-columns: 1fr; }
    .lp-mock-panels { grid-template-columns: 1fr; }
    .lp-mock-line  { grid-template-columns: 1fr; }
    .lp-mock-en    { border-left: none; border-top: 1px solid #f0f0f0; }
    .lp-ctas { flex-direction: column; }
    .lp-ctas .btn  { width: 100%; text-align: center; }
    .lp-learner-strip { flex-direction: column; text-align: center; gap: 0.4rem; }
}
