/* CSS Variables for Lionheart branding */
:root {
    --lionheart-primary: #006490;
    --lionheart-secondary: #4A93B7;
    --lionheart-dark: #222e3a;
    --lionheart-light-blue: rgba(74, 147, 183, 0.1);
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --bg-color: white;
    --card-bg: white;
    --text-color: var(--lionheart-dark);
    --border-color: var(--lionheart-secondary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--lionheart-dark);
    min-height: 100vh;
    position: relative;
}

/* Background color themes for light mode */
body[data-bg="white"] {
    --bg-color: white;
    --card-bg: white;
}

body[data-bg="cream"] {
    --bg-color: #FFF8DC;
    --card-bg: #FFF8DC;
}

body[data-bg="lightblue"] {
    --bg-color: #E6F3FF;
    --card-bg: #E6F3FF;
}

body[data-bg="lightgreen"] {
    --bg-color: #E8F5E9;
    --card-bg: #E8F5E9;
}

body[data-bg="lightyellow"] {
    --bg-color: #FFFDE7;
    --card-bg: #FFFDE7;
}

body[data-bg="lightpink"] {
    --bg-color: #FCE4EC;
    --card-bg: #FCE4EC;
}

body[data-bg="lightgray"] {
    --bg-color: #F5F5F5;
    --card-bg: #F5F5F5;
}

body[data-bg="beige"] {
    --bg-color: #F5F5DC;
    --card-bg: #F5F5DC;
}

/* Dark Mode Variables */
body.dark-mode {
    --lionheart-primary: #4A93B7;
    --lionheart-secondary: #6BAED6;
    --lionheart-dark: #E0E0E0;
    --lionheart-light-blue: rgba(74, 147, 183, 0.2);
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #E0E0E0;
    --border-color: #4A93B7;

    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-color);
}

/* Dyslexia-friendly text settings */
.dyslexia-mode {
    font-size: 1.1em;
    line-height: 1.8;
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
}

/* Header */
.header {
    background: var(--lionheart-primary);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 155px;
    height: 50px;
    background: var(--lionheart-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    overflow: visible;
    padding: 4px;
}

.logo-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.settings-btn {
    background: var(--lionheart-secondary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.settings-btn:hover {
    background: var(--lionheart-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Selection Panel */
.selection-panel {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.selection-group {
    margin-bottom: 1.5rem;
}

.selection-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--lionheart-primary);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.selection-btn {
    padding: 0.5rem;
    border: 2px solid var(--lionheart-secondary);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    word-wrap: break-word;
    white-space: normal;
}

.selection-btn:hover {
    background: var(--lionheart-light-blue);
}

.selection-btn.selected {
    background: var(--lionheart-primary);
    color: white;
}

.year-toggle {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.year-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--lionheart-secondary);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.year-btn.selected {
    background: var(--lionheart-primary);
    color: white;
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mode-tab {
    padding: 1rem 2rem;
    background: var(--card-bg);
    color: var(--text-color);
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lionheart-dark);
    transition: all 0.3s;
}

.mode-tab.active {
    background: var(--lionheart-primary);
    color: white;
}

/* Content Area */
.content-area {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

/* Vocabulary Cards */
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.vocab-card {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--lionheart-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.vocab-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.vocab-card.hidden {
    opacity: 0.3;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.control-btn {
    background: var(--lionheart-secondary);
    border: none;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: var(--lionheart-primary);
}

.word {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--lionheart-primary);
    margin-bottom: 0.5rem;
}

.definition {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--lionheart-dark);
}

.definition.hidden {
    filter: blur(5px);
    user-select: none;
}

.card-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 1rem;
    background-color: var(--lionheart-light-blue);
    border: 1px solid var(--border-color);
}

/* Controls Bar */
.controls-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.selection-summary {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--lionheart-light-blue);
    border-radius: 5px;
    font-weight: 600;
    color: var(--lionheart-primary);
}

.control-button {
    padding: 0.5rem 1rem;
    background: var(--lionheart-secondary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    min-width: 120px;
    white-space: nowrap;
}

.control-button:hover {
    background: var(--lionheart-primary);
}

.search-bar {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--lionheart-secondary);
    border-radius: 5px;
    font-size: 1rem;
}

/* Word Selection */
.word-selector {
    margin-right: 0.5rem;
    transform: scale(1.2);
    cursor: pointer;
}

.known-word {
    opacity: 0.6;
    border-color: var(--success) !important;
}

.known-word .word {
    color: var(--success);
    text-decoration: line-through;
}

.known-btn {
    background: var(--success) !important;
    color: white !important;
}

/* Flashcard Mode */
.flashcard-container {
    max-width: 600px;
    margin: 0 auto;
    perspective: 1000px;
}

.flashcard {
    background: var(--card-bg);
    color: var(--text-color);
    border: 3px solid var(--lionheart-primary);
    border-radius: 15px;
    padding: 3rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
}

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

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    /* Allow scrolling if content is too tall */
}

/* Landscape layout for larger screens when image is present */
@media (min-width: 768px) {
    .flashcard-back.has-image {
        flex-direction: row;
        gap: 2rem;
        text-align: left;
    }

    .flashcard-back.has-image .flashcard-image {
        max-width: 40%;
        max-height: 200px;
        margin-bottom: 0;
    }

    .flashcard-back.has-image .flashcard-text {
        flex: 1;
    }
}

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

.flashcard-text {
    font-size: 1.5rem;
    line-height: 1.6;
}

.flashcard-image {
    max-width: 100%;
    max-height: 150px;
    /* Reduced for mobile */
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.flashcard-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.flashcard-btn {
    padding: 0.75rem 1.5rem;
    background: var(--lionheart-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.flashcard-btn:hover {
    background: var(--lionheart-dark);
}

/* Quiz Mode */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--lionheart-secondary);
}

.quiz-progress {
    font-size: 1.1rem;
    color: var(--lionheart-primary);
}

.quiz-score {
    font-size: 1.1rem;
    font-weight: bold;
}

.question-container {
    background: var(--lionheart-light-blue);
    color: var(--text-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--lionheart-primary);
}

.question-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 5px;
    display: block;
    cursor: zoom-in;
    background-color: white;
    border: 1px solid var(--border-color);
}

.answer-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--lionheart-secondary);
    border-radius: 5px;
    margin-bottom: 1rem;
}

.answer-options {
    display: grid;
    gap: 1rem;
}

.answer-option {
    padding: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--lionheart-secondary);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.answer-option:hover {
    background: var(--lionheart-light-blue);
    border-color: var(--lionheart-primary);
}

.answer-option.selected {
    background: var(--lionheart-primary);
    color: white;
}

.answer-option.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.answer-option.incorrect {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.feedback {
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-weight: 600;
}

.feedback.correct {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.feedback.incorrect {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* Results Screen */
.results-container {
    text-align: center;
    padding: 2rem;
}

.results-title {
    font-size: 2rem;
    color: var(--lionheart-primary);
    margin-bottom: 1rem;
}

.results-score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--lionheart-primary);
    margin-bottom: 2rem;
}

.mistakes-review {
    text-align: left;
    max-width: 600px;
    margin: 2rem auto;
}

.mistake-item {
    background: var(--card-bg);
    color: var(--text-color);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.mistake-word {
    font-weight: bold;
    color: var(--danger);
}

.correct-answer {
    color: var(--success);
    margin-top: 0.5rem;
}

/* Settings Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--lionheart-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.close-modal:hover {
    color: var(--lionheart-primary);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--lionheart-primary);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(30px);
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    color: var(--text-color);
    border-top: 3px solid var(--lionheart-primary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-notice.show {
    transform: translateY(0);
}

/* Feature 4: Practice Today */
.practice-today-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

.practice-today-hero__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.practice-today-hero__subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0 0 1rem;
}

.btn-practice-today {
    background: #fff;
    color: #4f46e5;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-practice-today:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-practice-today:active {
    transform: translateY(0);
}

.practice-progress-container {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.practice-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color, #e5e7eb);
    border-radius: 999px;
    overflow: hidden;
}

.practice-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.practice-progress-label {
    font-size: 0.8rem;
    color: var(--text-color, #6b7280);
    white-space: nowrap;
}

.practice-summary {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.practice-summary__icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.practice-summary__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.practice-summary__reviewed {
    color: var(--text-color, #6b7280);
    font-size: 1rem;
    margin: 0 0 1rem;
}

.summary-highlight {
    font-size: 0.95rem;
    margin: 0.25rem 0;
    font-weight: 600;
}

.summary-highlight--good {
    color: var(--success, #22c55e);
}

.summary-highlight--warn {
    color: var(--warning, #f59e0b);
}

.practice-summary__divider {
    height: 1px;
    background: var(--border-color, #e5e7eb);
    margin: 1rem 0;
}

.summary-tomorrow {
    font-size: 0.9rem;
    color: var(--text-color, #6b7280);
    margin: 0;
}

#due-count-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

.bucket-summary {
    margin-top: 1.5rem;
}

.bucket-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.bucket-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bucket-label {
    width: 80px;
    font-size: 0.85rem;
    color: var(--text-color, #6b7280);
}

.bucket-track {
    flex: 1;
    height: 10px;
    background: var(--border-color, #e5e7eb);
    border-radius: 999px;
    overflow: hidden;
}

.bucket-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.bucket-fill--learning {
    background-color: #f59e0b;
}

.bucket-fill--reviewing {
    background-color: #3b82f6;
}

.bucket-fill--mastered {
    background-color: #22c55e;
}

.bucket-count {
    width: 30px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color, #111827);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    color: var(--lionheart-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cookie-text p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--text-color);
}

.cookie-text ul {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding: 0;
}

.cookie-text li {
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cookie-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.cookie-accept {
    background: var(--lionheart-primary);
    color: white;
}

.cookie-accept:hover {
    background: var(--lionheart-dark);
}

.cookie-decline {
    background: var(--lionheart-secondary);
    color: white;
}

.cookie-decline:hover {
    background: var(--lionheart-primary);
}

.cookie-learn {
    background: transparent;
    color: var(--lionheart-primary);
    border: 2px solid var(--lionheart-primary);
}

.cookie-learn:hover {
    background: var(--lionheart-light-blue);
}

/* Privacy Modal Content */
.privacy-content {
    max-height: 60vh;
    overflow-y: auto;
}

.privacy-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.privacy-section:last-child {
    border-bottom: none;
}

.privacy-section h4 {
    color: var(--lionheart-primary);
    margin-bottom: 0.5rem;
}

.privacy-section p {
    color: var(--text-color);
}

.privacy-section ul {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding: 0;
}

.privacy-section li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
    color: var(--text-color);
}

.privacy-section a {
    color: var(--lionheart-primary);
    text-decoration: none;
}

.privacy-section a:hover {
    text-decoration: underline;
}

/* Toast Notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 4000;
    font-weight: 600;
    max-width: 300px;
    word-wrap: break-word;
    animation: slideInRight 0.3s ease-out;
}

.toast-success {
    background: var(--success);
    color: white;
}

.toast-error {
    background: var(--danger);
    color: white;
}

.toast-info {
    background: var(--lionheart-primary);
    color: white;
}

/* Loading Screen */
.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--lionheart-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state-subtext {
    color: var(--text-color);
    opacity: 0.7;
}

/* Cookie Notice Responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-text h3 {
        font-size: 1.1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .app-title {
        font-size: 1.2rem;
    }

    .selection-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .vocab-grid {
        grid-template-columns: 1fr;
    }

    .mode-tabs {
        flex-direction: column;
    }

    .mode-tab {
        background: var(--card-bg);
        color: var(--text-color);
        width: 100%;
        text-align: center;
    }

    .flashcard {
        padding: 2rem 1rem;
        min-height: 250px;
    }

    .flashcard-text {
        font-size: 1.2rem;
    }

    .quiz-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .control-button,
    .search-bar {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}



/* Color Picker Grid */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: var(--lionheart-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--lionheart-primary);
}

/* Dark mode styles for specific elements */
body.dark-mode .header {
    background: #2d2d2d;
    border-bottom: 2px solid var(--lionheart-primary);
}

body.dark-mode .settings-btn {
    background: var(--lionheart-secondary);
}

body.dark-mode .empty-state {
    color: var(--text-color);
}

body.dark-mode .toast {
    background: #2d2d2d;
    color: var(--text-color);
    border: 1px solid var(--lionheart-primary);
}

body.dark-mode input,
body.dark-mode select {
    background: #3d3d3d;
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Hide background color setting in dark mode */
body.dark-mode #bgColorSetting {
    display: none;
}

/* Additional dark mode refinements */
body.dark-mode .cookie-notice {
    background: #2d2d2d;
    border-top: 2px solid var(--lionheart-primary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .privacy-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .setting-item p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Ensure search bar is readable in dark mode */
body.dark-mode .search-bar {
    background: #3d3d3d;
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .search-bar::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

/* Group Filter Styles */
#groupFilterContainer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.group-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--lionheart-light-blue);
}

.group-checkbox-item {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.group-checkbox-item:hover {
    background-color: rgba(0, 100, 144, 0.1);
}

.group-checkbox-item input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.1);
    cursor: pointer;
}

.group-checkbox-item label {
    font-weight: normal;
    margin-bottom: 0;
    color: var(--text-color);
    cursor: pointer;
    flex-grow: 1;
}

.clear-groups-btn {
    background-color: var(--lionheart-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    min-width: auto;
}

.clear-groups-btn:hover {
    background-color: var(--lionheart-primary);
}

/* Dark mode adjustments for group filter */
body.dark-mode .group-checkbox-grid {
    background-color: rgba(74, 147, 183, 0.1);
    border-color: var(--border-color);
}

body.dark-mode .group-checkbox-item {
    background-color: var(--card-bg);
}

body.dark-mode .group-checkbox-item:hover {
    background-color: rgba(74, 147, 183, 0.2);
}

body.dark-mode .group-checkbox-item label {
    color: var(--text-color);
}

/* =========================================
   NEW STYLES FOR V2 (LOGIN & ADMIN)
   ========================================= */

/* Auth Pages (Login/Signup) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    /* Minus header height */
    padding: 2rem;
}

.auth-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border-top: 5px solid var(--lionheart-primary);
}

.auth-title {
    color: var(--lionheart-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--lionheart-secondary);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
}

.form-control:focus {
    border-color: var(--lionheart-primary);
    outline: none;
}

.auth-btn {
    background: var(--lionheart-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.auth-btn:hover {
    background: var(--lionheart-dark);
}

.auth-divider {
    margin: 2rem 0;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.auth-divider span {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.auth-link {
    color: var(--lionheart-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Admin Dashboard */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.admin-sidebar {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.admin-nav {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 0.5rem;
}

.admin-nav a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--lionheart-light-blue);
    color: var(--lionheart-primary);
    font-weight: 600;
}

.admin-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-title {
    font-size: 1.8rem;
    color: var(--lionheart-primary);
}

/* Upload Form */
.upload-area {
    border: 2px dashed var(--lionheart-secondary);
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 2rem;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    background: var(--lionheart-light-blue);
    border-color: var(--lionheart-primary);
}

.file-input {
    display: none;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    margin-top: 1rem;
    border-radius: 5px;
    display: none;
}

/* Admin Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--lionheart-light-blue);
    color: var(--lionheart-primary);
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.action-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.btn-edit {
    background: var(--warning);
    color: #333;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

/* Responsive Admin */
@media (max-width: 900px) {
    .admin-container {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        margin-bottom: 1rem;
    }

    .admin-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-nav li {
        margin-bottom: 0;
    }
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* === V3 RESTRUCTURE STYLES === */

.main-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-btn {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 700;
}

.app-section {
    display: none;
}

.app-section.active {
    display: block;
}

.home-cta-card {
    background: linear-gradient(135deg, #006490 0%, #004f73 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 100, 144, 0.3);
    margin-bottom: 1.5rem;
}

.home-cta-label {
    font-size: 0.8rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.home-cta-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.home-cta-btn {
    background: #e8720c;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(232, 114, 12, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
}

.home-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(232, 114, 12, 0.5);
}

.home-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.home-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.home-card-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.home-card-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.streak-week {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.streak-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.streak-dot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #f0f0f0;
}

.streak-dot.active {
    background: #e8720c;
}

.streak-day-label {
    font-size: 0.6rem;
    color: #aaa;
}

.progress-bar-track {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
}

.progress-bar-segment {
    transition: width 0.4s ease;
}

.bucket-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bucket-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.rating-buttons {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    justify-content: flex-end;
}

.rating-btn {
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s;
}

.rating-hard {
    border: 1px solid rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.rating-ok {
    border: 1px solid rgba(240, 165, 0, 0.4);
    background: rgba(240, 165, 0, 0.12);
    color: #b07800;
}

.rating-easy {
    border: 1px solid rgba(40, 167, 69, 0.4);
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.flashcard-rating {
    display: none;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.flashcard-rating .rating-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
}

.mode-tabs-v2 {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 1.5rem;
}

.mode-tab-v2 {
    padding: 0.65rem 1.3rem;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.mode-tab-v2:hover {
    color: var(--lionheart-primary);
}

.mode-tab-v2.active {
    font-weight: 700;
    color: var(--lionheart-primary);
    border-bottom-color: var(--lionheart-primary);
}

.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-stat-tile {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.progress-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.progress-stat-label {
    font-size: 0.72rem;
    color: #888;
}

.struggled-word-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: rgba(220, 53, 69, 0.04);
    border: 1px solid rgba(220, 53, 69, 0.12);
    margin-bottom: 0.5rem;
}

.mistake-count-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
    border-radius: 10px;
    padding: 1px 8px;
}

/* ===== Phase 1: Persistent Mistake History ===== */

.review-header {
    margin-bottom: 1rem;
}

.review-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.review-subhead {
    font-size: 0.8rem;
    color: #888;
}

/* Mistake frequency badge on review list items */
.mistake-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.mistake-badge--high {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

.mistake-badge--mid {
    background: rgba(255, 193, 7, 0.2);
    color: #b38600;
}

.mistake-badge--low {
    background: rgba(0, 0, 0, 0.07);
    color: #888;
}

/* No mistakes message */
.no-mistakes-msg {
    text-align: center;
    padding: 2rem 1rem;
    color: #888;
}

.no-mistakes-msg p {
    margin: 0.25rem 0;
}

/* Struggled word rows in My Progress section */
.struggled-word-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    gap: 1rem;
}

.struggled-word-row:last-child {
    border-bottom: none;
}

.struggled-word-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.struggled-word-term {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.struggled-word-def {
    font-size: 0.78rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.struggled-word-count {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.struggled-word-count[data-severity="high"] {
    color: var(--danger);
}

.struggled-word-count[data-severity="mid"] {
    color: var(--warning);
}

.struggled-word-count[data-severity="low"] {
    color: #aaa;
}

/* Dark mode adjustments */
body.dark-mode .struggled-word-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mistake-badge--low {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Phase 1: Flashcard Self-Rating ===== */

/* Rating button row on flashcards */
.flashcard-rating-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.25rem 0 0.5rem;
    flex-wrap: wrap;
}

.rating-btn {
    padding: 0.6rem 1.4rem;
    border: 2px solid transparent;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    min-width: 100px;
}

.rating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rating-btn:active,
.rating-btn--selected {
    transform: scale(0.95);
    opacity: 0.75;
}

.rating-btn--hard {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.rating-btn--hard:hover {
    background: var(--danger);
    color: #fff;
}

.rating-btn--ok {
    background: rgba(255, 193, 7, 0.12);
    border-color: var(--warning);
    color: #b38600;
}

.rating-btn--ok:hover {
    background: var(--warning);
    color: #333;
}

.rating-btn--easy {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.rating-btn--easy:hover {
    background: var(--success);
    color: #fff;
}

/* Word rating badge on study cards */
.word-rating-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.word-rating-badge--hard {
    background: rgba(220, 53, 69, 0.12);
    color: var(--danger);
}

.word-rating-badge--ok {
    background: rgba(255, 193, 7, 0.18);
    color: #b38600;
}

.word-rating-badge--easy {
    background: rgba(40, 167, 69, 0.12);
    color: var(--success);
}

/* Flashcard completion screen */
.flashcard-complete {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}

.flashcard-complete-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.flashcard-complete h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.flashcard-complete-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.rating-summary {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
}

.rating-summary--easy {
    background: rgba(40, 167, 69, 0.12);
    color: var(--success);
}

.rating-summary--ok {
    background: rgba(255, 193, 7, 0.15);
    color: #b38600;
}

.rating-summary--hard {
    background: rgba(220, 53, 69, 0.12);
    color: var(--danger);
}

.flashcard-complete-tip {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-bottom: 1.25rem;
}

/* Dark mode adjustments */
body.dark-mode .rating-btn--ok {
    color: #e0a800;
}

body.dark-mode .word-rating-badge--ok {
    color: #e0a800;
}

body.dark-mode .flashcard-complete h2 {
    color: #f0f0f0;
}

/* Mobile: stack rating buttons if needed */
@media (max-width: 480px) {
    .rating-btn {
        min-width: 80px;
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }
}