/* SynapseLingo Corporate Identity Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for SynapseLingo CI */
:root {
    --primary-teal: #009688;
    --primary-blue: #1976D2;
    --accent-orange: #FF6F00;
    --accent-orange-deep: #E65100;
    --accent-purple: #8E24AA;
    --accent-white: #FFFFFF;
    --light-gray: #F5F5F5;
    --text-dark: #212121;
    --text-medium: #424242;
    --text-light: #757575;
    --border-color: #E0E0E0;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-float: 0 8px 32px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --font-heading: 'Poppins', 'Montserrat', 'Arial', sans-serif;
    --font-body: 'Open Sans', 'Lato', 'Segoe UI', sans-serif;
    --gradient-primary: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    --gradient-orange: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-deep) 100%);
    --teal: #009688;
    --teal-dark: #00796B;
    --blue: #1976D2;
    --light-blue: #E3F2FD;
}

body {
    font-family: 'Open Sans', 'Lato', 'Segoe UI', sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Top Navigation Styles */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-link.nav-active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav-link.nav-home {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
}

.container {
    background: var(--accent-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-float);
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

h1 {
    font-family: 'Poppins', 'Montserrat', 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    font-family: 'Poppins', 'Montserrat', 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--text-medium);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Poppins', 'Montserrat', 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.branding {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    height: 60px;
    width: auto;
    display: block;
}

.book-cover-link {
    display: inline-block;
}

.cover-image {
    height: 60px;
    width: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.cover-image:hover {
    transform: scale(1.05);
}

.website-link-container {
    text-align: center;
    margin-bottom: 0.5rem;
}

.website-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.website-link:hover {
    color: var(--primary-teal);
    text-decoration: underline;
}

h1 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

h2 {
    color: var(--text-medium);
    font-size: 1.2rem;
    font-weight: normal;
}

.support-section {
    background: var(--gradient-primary);
    color: var(--accent-white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.register-cta {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.collapsible-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.collapsible-section .section-header:hover {
    opacity: 0.9;
}

.collapsible-section .section-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s;
}

.section-content {
    margin-top: 1rem;
    display: block;
}

.support-section .section-content p,
.register-cta .section-content p {
    margin-bottom: 1rem;
    opacity: 0.95;
}

.store-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0;
}

.store-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    min-width: 120px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.store-link:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.store-icon {
    font-size: 2rem;
}

.store-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.register-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: white;
    color: #28a745;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    background: var(--light-gray);
}

.mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.8rem;
    background: var(--light-gray);
    color: var(--text-dark);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.mode-btn:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.mode-btn.active {
    background: var(--gradient-orange);
    color: var(--accent-white);
    border-color: var(--accent-orange);
    box-shadow: 0 6px 20px rgba(255, 111, 0, 0.4);
    font-weight: 600;
}

.chapter-selector {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chapter-selector label {
    font-weight: bold;
    color: #555;
}

.chapter-selector select {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.difficulty-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.difficulty-selector label {
    font-weight: bold;
    color: #555;
    margin-right: 0.5rem;
}

.diff-btn {
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, #fafafa, #f0f0f0);
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: #333;
}

.diff-btn:hover {
  background: linear-gradient(180deg, #fff3e0, #ffe0b2);
  border-color: #ffb74d;
  color: #000;
}

.diff-btn.active {
  background: linear-gradient(180deg, #ff9800, #f57c00);
  border-color: #f57c00;
  color: #fff;
  font-weight: 600;
}

#diff-easy.active {
    background: rgba(0, 150, 136, 0.1);
    color: var(--primary-teal);
    border-color: var(--primary-teal);
}

#diff-medium.active {
    background: rgba(255, 111, 0, 0.1);
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

#diff-hard.active {
    background: rgba(142, 36, 170, 0.1);
    color: var(--accent-purple);
    border-color: var(--accent-purple);
}

.stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.stat-item span:not(.stat-label) {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.card {
    margin-top: 2rem;
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.word-stats {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--accent-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.word-stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-around;
}

.word-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 80px;
}

.word-stats .stat-item.last-7 {
    flex-direction: column;
    min-width: 150px;
}

.word-stats .stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.word-stats .stat-value {
    font-size: 1.1rem;
    font-weight: bold;
}

.stat-correct {
    color: #28a745;
}

.stat-wrong {
    color: #dc3545;
}

.stats-empty {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
}

.attempts-display {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.attempt-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: help;
}

.attempt-correct {
    background: #d4edda;
    color: #155724;
}

.attempt-wrong {
    background: #f8d7da;
    color: #721c24;
}

.question {
    font-size: 1.8rem;
    text-align: center;
    padding: 2rem;
    background: white;
    color: #333;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.word-display {
    text-align: center;
}

.source-word {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
}

.word-header h3 {
    color: #667eea;
    font-size: 1.8rem;
}

.sentence-practice h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.sentence {
    padding: 1rem;
    margin: 0.5rem 0;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 1.1rem;
}

.sentence.target {
    background: #e8f5e9;
    color: #2e7d32;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-btn {
    padding: 1.2rem;
    font-size: 1.1rem;
    background: var(--accent-white);
    color: var(--text-medium);
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    font-weight: 500;
}

.option-btn:hover:not(:disabled) {
    background: var(--light-gray);
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    color: var(--text-dark);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.option-btn.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option-btn.wrong {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.true-false-btn {
    font-size: 1.3rem;
    font-weight: bold;
    min-height: 80px;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    background: var(--gradient-orange);
    color: var(--accent-white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.25);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 111, 0, 0.4);
    filter: brightness(1.05);
}

#showBtn {
    background: var(--text-medium);
    color: var(--accent-white);
}

#showBtn:hover {
    background: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(33, 33, 33, 0.4);
}

#nextBtn {
    background: var(--primary-teal);
    color: var(--accent-white);
}

#nextBtn:hover {
    background: var(--teal-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 150, 136, 0.4);
}

.feedback {
    padding: 1.2rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    box-shadow: var(--shadow-soft);
}

.feedback.correct {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: var(--teal);
    border: 2px solid var(--teal);
}

.feedback.wrong {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #dc3545;
    border: 2px solid #dc3545;
}

.feedback.info {
    background: linear-gradient(135deg, var(--light-blue) 0%, #cce7f0 100%);
    color: var(--blue);
    border: 2px solid var(--blue);
}

.anchor-content {
    margin-top: 1.5rem;
}

.anchors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.anchor-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.anchor-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.anchor-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.anchor-label {
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin-bottom: 0.5rem;
}

.anchor-text {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.vocabulary-list {
    margin-top: 1rem;
}

.vocabulary-list h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.vocab-filter {
    margin-bottom: 1.5rem;
}

.vocab-filter input {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.vocab-filter input:focus {
    outline: none;
    border-color: #667eea;
}

.vocab-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vocab-header {
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    padding: 1rem;
}

.vocab-row {
    display: flex;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.vocab-row:hover {
    background-color: #f8f9fa;
}

.vocab-row:last-child {
    border-bottom: none;
}

.vocab-cell {
    flex: 1;
    padding: 1rem;
    word-break: break-word;
}

.vocab-header .vocab-cell {
    font-size: 1.1rem;
}

.vocab-row .vocab-cell {
    color: #333;
    font-size: 1rem;
}

.source-word {
    border-right: 1px solid #eee;
}

.no-vocab {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.podcast-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff3cd;
    border-radius: 10px;
    border: 2px solid #ffc107;
}

.podcast-section h3 {
    color: #856404;
    margin-bottom: 1rem;
}

.podcast-section h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.podcast-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.podcast-time {
    color: #856404;
    font-weight: bold;
}

.podcast-access {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e6c76f;
    text-align: center;
}

.access-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.access-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #5568d3 0%, #6a3d91 100%);
    color: white;
    text-decoration: none;
}

.completion {
    text-align: center;
    padding: 2rem;
}

.completion h2 {
    color: #28a745;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.completion p {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: #555;
}

.answer-reveal {
    font-size: 1.2rem;
}

.languagescript-text {
    font-size: 1.3em;
    color: #667eea;
    font-weight: bold;
}

.latin-text {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-left: 0.3em;
}

.audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 0.3em;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    transition: all 0.2s;
    vertical-align: middle;
}

.audio-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.audio-btn:active {
    transform: scale(0.95);
}

.languagescript-text .audio-btn,
.latin-text .audio-btn {
    display: inline-block;
}

.card .question,
.option-btn {
    line-height: 1.6;
}

 .filter-select {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-family: var(--font-body, 'Open Sans', sans-serif);
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    line-height: 1.5;
    
    /* Removes native OS styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Add space for custom arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23009688' viewBox='0 0 16 16'><path d='M3 6l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.filter-select:hover {
    border-color: #009688; /* teal highlight */
    box-shadow: 0 2px 8px rgba(0, 150, 136, 0.15);
}

.filter-select:focus {
    outline: none;
    border-color: #009688;
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.2);
}


@media (max-width: 768px) {
    .top-nav {
        padding: 0 15px;
    }
    
    .nav-container {
        height: 60px;
        justify-content: space-between;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background: var(--gradient-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 2rem 0;
        transition: right 0.3s ease;
        box-shadow: var(--shadow-soft);
        z-index: 1000;
        gap: 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: left;
        transition: background 0.3s ease;
        display: block;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: none;
    }
    
    .nav-link.nav-active {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .container {
        padding: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .nav-links {
        width: 200px;
        padding: 1.5rem 0;
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .nav-logo-img {
        height: 35px;
    }
    
    .top-nav {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .branding {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .cover-image {
        height: 50px;
    }
    
    .website-link {
        font-size: 0.85rem;
    }
    
    .question {
        font-size: 1.3rem;
        padding: 1rem;
    }
    
    .mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .vocab-header {
        font-size: 0.9rem;
    }
    
    .vocab-cell {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .vocab-row {
        flex-direction: column;
    }
    
    .source-word {
        border-right: none;
        border-bottom: 1px solid #eee;
        background-color: #f8f9fa;
        font-weight: 500;
    }
    
    .word-stats-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .word-stats .stat-item {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .word-stats .stat-item.last-7 {
        flex-direction: column;
        align-items: center;
    }
    
    /* Mobile Navigation */
    body {
        padding-top: 120px; /* More space for mobile nav */
    }
    
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 0.5rem 0;
        gap: 0.8rem;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Course Levels Styles - Compact Design */
.course-levels-compact {
    background: white;
    margin: 1rem auto;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.current-level {
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

.level-selector {
    flex: 1;
    min-width: 200px;
}

.level-dropdown {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.level-dropdown:focus {
    outline: none;
    border-color: #667eea;
}

.level-dropdown:hover {
    border-color: #667eea;
}

@media (max-width: 768px) {
    .course-levels-compact {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem;
    }
    
    .current-level {
        margin-bottom: 0.5rem;
    }
    
    .level-selector {
        min-width: auto;
    }
}

/* ============================================================
   🌟 SynapseLingo Article Redesign 2025
   ============================================================ */

.article-wrapper {
  background: #ffffff;
  max-width: 880px;
  margin: 4.5rem auto;
  padding: 3rem 3.5rem;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  line-height: 1.75;
  color: #263238;
  font-family: "Open Sans", "Lato", "Segoe UI", sans-serif;
}

.article-wrapper header h1 {
  color: var(--teal-dark);
  font-size: 2.4rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  text-shadow: 0 2px 3px rgba(0,0,0,0.08);
  text-align: center;
}

.article-wrapper header .intro {
  color: #444;
  font-size: 1.1rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

/* Headings -------------------------------------------------- */
.article-wrapper h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.2rem;
  padding-left: 1rem;
  border-left: 6px solid var(--primary-teal);
  font-size: 1.6rem;
  color: var(--primary-teal);
  font-weight: 600;
  background: linear-gradient(to right, rgba(0,150,136,0.05), transparent);
  border-radius: 4px;
}

.article-wrapper h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: var(--teal-dark);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Text & Lists --------------------------------------------- */
.article-wrapper p,
.article-wrapper ul,
.article-wrapper ol {
  margin-top: 0.7rem;
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.article-wrapper ul {
  padding-left: 1.6rem;
}

.article-wrapper ul li {
  position: relative;
  margin-bottom: 0.5rem;
  list-style: none;
  padding-left: 1rem;
}

.article-wrapper ul li::before {
  content: "▹";
  color: var(--accent-orange);
  position: absolute;
  left: -1rem;
}

/* FAQ ------------------------------------------------------- */
.article-wrapper .faq {
  background: #f9f9f9;
  border-radius: 14px;
  padding: 2rem 2.5rem;
  margin-top: 3rem;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.05);
}

.article-wrapper .faq h2 {
  border: none;
  margin-top: 0;
  color: var(--teal-dark);
}

.article-wrapper .faq dt {
  color: var(--teal-dark);
  font-weight: 700;
  margin-top: 1rem;
}

.article-wrapper .faq dd {
  margin: 0.4rem 0 1.2rem 1rem;
  color: #444;
}

/* 🎬 Video Section ------------------------------------------ */
#videos {
  margin-top: 3rem;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.video-list li {
  background: #f7f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
}

.video-list li:hover {
  transform: translateY(-4px);
  background: #e3f2fd;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.video-thumb {
  position: relative;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  display: block;
}

.play-icon {
  position: absolute;
  top: 45%;
  left: 45%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 2rem;
  border-radius: 50%;
  padding: 0.3em 0.45em;
}

.video-title {
  padding: 0.8rem 1rem;
  font-weight: 600;
  color: var(--primary-blue);
  background: #fff;
}

/* Related Articles ------------------------------------------ */
.related-articles {
  margin-top: 3.5rem;
  border-top: 2px dashed #B2DFDB;
  padding-top: 1.8rem;
}

.related-articles h2 {
  color: var(--teal-dark);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border: none;
}

.related-articles ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.related-articles li {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.related-articles li:hover {
  background: #e0f2f1;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.related-articles a {
  color: var(--primary-teal);
  font-weight: 600;
  text-decoration: none;
}

.related-articles a:hover {
  text-decoration: underline;
  color: var(--accent-orange);
}

/* Footer ---------------------------------------------------- */
.article-footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

/* Responsive ------------------------------------------------ */
@media (max-width: 768px) {
  .article-wrapper {
    padding: 2rem 1.5rem;
    margin: 2rem 1rem;
  }
  .article-wrapper h1 { font-size: 1.7rem; }
  .article-wrapper h2 { font-size: 1.3rem; }
  .video-list { grid-template-columns: 1fr; }
  .related-articles ul { grid-template-columns: 1fr; }
}
.article-wrapper section {
  margin-top: 3.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}



/* ============================================================
   🎓 SynapseLingo Training Page 2025
   ============================================================ */

.training-container {
  background: var(--accent-white);
  max-width: 900px;
  margin: 6rem auto 3rem;
  padding: 2.5rem 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-float);
}

.training-container h1 {
  text-align: center;
  color: var(--primary-blue);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.08);
}

/* Section headers */
.articles-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-teal);
  margin-bottom: 1rem;
  border-left: 5px solid var(--primary-teal);
  padding-left: 0.75rem;
}

/* Grid layout for articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Card styling */
.article-card {
  background: var(--light-gray);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: var(--primary-teal);
  background: #ffffff;
}

.article-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--primary-teal);
}

.article-card h4 a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.article-card h4 a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.article-preview {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.read-more-btn {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.read-more-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Back button */
.train-btn {
  display: inline-block;
  background: var(--primary-teal);
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.train-btn:hover {
  background: var(--teal-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,150,136,0.3);
}

/* Announcement block (if used) */
.announcement {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 2rem 0;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.announcement h3 {
  margin-bottom: 0.5rem;
}

.announcement a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.announcement a:hover {
  color: #fff3cd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .training-container {
    padding: 1.5rem;
    margin: 4rem 1rem;
  }

  .training-container h1 {
    font-size: 1.6rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }
}
