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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Navbar */
.navbar {
    background: #2c3e50;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem;
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
    min-height: calc(100vh - 140px);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-error {
    background: #e74c3c;
    color: white;
}

.alert-success {
    background: #27ae60;
    color: white;
}

.alert-info {
    background: #3498db;
    color: white;
}

.alert-warning {
    background: #f39c12;
    color: white;
}

/* Typography */
h1,
h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

a {
    color: #3498db;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

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

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-card .stat-label {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.stat-card.streak .stat-value {
    color: #e67e22;
}

.stat-card.points .stat-value {
    color: #3498db;
}

.stat-card.words .stat-value {
    color: #27ae60;
}

.stat-card.level .stat-value {
    color: #8e44ad;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    border-left: 4px solid #3498db;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-card .action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-card h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.action-card p {
    color: #666;
    font-size: 0.8rem;
}

.action-card.study {
    border-left-color: #3498db;
}

.action-card.reading {
    border-left-color: #27ae60;
}

.action-card.worksheet {
    border-left-color: #e67e22;
}

.action-card.upload {
    border-left-color: #8e44ad;
}

/* Progress Bar */
.progress-bar {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #27ae60;
    transition: width 0.3s;
    border-radius: 10px;
}

.progress-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* Today's Progress */
.today-progress {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.progress-check .check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.progress-check .check-icon.done {
    background: #27ae60;
}

.progress-check .check-icon.pending {
    background: #bdc3c7;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

.form-group .help-text {
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-group .error-text {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-family: inherit;
    transition: background 0.2s;
}

.btn:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

.btn-warning {
    background: #e67e22;
}

.btn-warning:hover {
    background: #d35400;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider span {
    padding: 0 1rem;
    color: #666;
    font-size: 0.875rem;
}

/* Google Login */
.google-login {
    max-width: 400px;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google svg {
    flex-shrink: 0;
}

/* Study Page - Flashcard */
.study-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.study-progress {
    font-size: 0.9rem;
    color: #666;
}

.flashcard {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    min-height: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}

.flashcard:hover {
    transform: scale(1.01);
}

.flashcard .word-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.flashcard .phonetic {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.flashcard .part-of-speech {
    color: #999;
    font-style: italic;
    margin-bottom: 1rem;
}

.flashcard .meaning {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.flashcard .meaning-cn {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.flashcard .example {
    font-size: 0.95rem;
    color: #555;
    font-style: italic;
    max-width: 500px;
    margin-bottom: 0.5rem;
}

.flashcard .example-cn {
    font-size: 0.9rem;
    color: #888;
    max-width: 500px;
}

.flashcard .reveal-hint {
    color: #3498db;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.flashcard .word-meta {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.flashcard .badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-new {
    background: #ebf5fb;
    color: #2980b9;
}

.badge-review {
    background: #fef9e7;
    color: #f39c12;
}

.badge-mastered {
    background: #eafaf1;
    color: #27ae60;
}

/* Rating Buttons */
.rating-section {
    margin-top: 1.5rem;
    text-align: center;
}

.rating-section p {
    margin-bottom: 0.75rem;
    color: #666;
}

.rating-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.rating-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.rating-btn:hover {
    border-color: #3498db;
    background: #ebf5fb;
}

.rating-btn.fail {
    border-color: #e74c3c;
    color: #e74c3c;
}

.rating-btn.fail:hover {
    background: #fdeaea;
}

.rating-btn.hard {
    border-color: #e67e22;
    color: #e67e22;
}

.rating-btn.hard:hover {
    background: #fef5e7;
}

.rating-btn.good {
    border-color: #3498db;
    color: #3498db;
}

.rating-btn.good:hover {
    background: #ebf5fb;
}

.rating-btn.easy {
    border-color: #27ae60;
    color: #27ae60;
}

.rating-btn.easy:hover {
    background: #eafaf1;
}

/* Study Navigation */
.study-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

/* Reading Page */
.article-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.article-card .article-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.article-meta {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #333;
}

.article-content p {
    margin-bottom: 1rem;
}

/* Questions */
.questions-section {
    margin-top: 1.5rem;
}

.question-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.question-card .question-text {
    font-weight: 500;
    margin-bottom: 1rem;
}

.question-card .question-number {
    color: #3498db;
    font-weight: bold;
}

.options-list {
    list-style: none;
}

.options-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.options-list li:hover {
    border-color: #3498db;
    background: #f7fbfe;
}

.options-list li.selected {
    border-color: #3498db;
    background: #ebf5fb;
}

.options-list li.correct {
    border-color: #27ae60;
    background: #eafaf1;
}

.options-list li.wrong {
    border-color: #e74c3c;
    background: #fdeaea;
}

.explanation {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
    display: none;
}

.explanation.show {
    display: block;
}

/* Fill in the Blank */
.fill-blank-text {
    line-height: 2;
    font-size: 1.05rem;
}

.blank-input {
    display: inline-block;
    width: 120px;
    border: none;
    border-bottom: 2px solid #3498db;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    background: transparent;
    text-align: center;
    font-family: inherit;
}

.blank-input:focus {
    outline: none;
    border-bottom-color: #2c3e50;
}

.blank-input.correct {
    border-bottom-color: #27ae60;
    color: #27ae60;
}

.blank-input.wrong {
    border-bottom-color: #e74c3c;
    color: #e74c3c;
}

.word-bank {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.word-bank h4 {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.word-bank .words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-bank .word-chip {
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.word-chip:hover {
    border-color: #3498db;
    background: #ebf5fb;
}

.word-chip.used {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Fill-blank multiple choice */
.blank-marker {
    font-weight: bold;
    color: #3498db;
    border-bottom: 2px dashed #3498db;
    padding: 0 2px;
}

.blank-marker.filled {
    color: #2c3e50;
    border-bottom-style: solid;
}

.blank-marker.correct {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

.blank-marker.wrong {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

.fill-blank-choices {
    margin-top: 1.5rem;
}

.fill-blank-choices h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #555;
}

.blank-choice-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.blank-choice-label {
    font-weight: bold;
    min-width: 2.5rem;
    color: #3498db;
}

.blank-choice-btn {
    padding: 0.35rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.blank-choice-btn:hover {
    border-color: #3498db;
    background: #ebf5fb;
}

.blank-choice-btn.selected {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.blank-choice-btn.correct {
    border-color: #27ae60;
    background: #27ae60;
    color: white;
}

.blank-choice-btn.wrong {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
}

/* Worksheet Page */
.worksheet-preview {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.worksheet-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

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

.worksheet-info .info-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.worksheet-info .info-label {
    font-size: 0.8rem;
    color: #888;
}

.worksheet-info .info-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Travel Calendar */
.travel-calendar {
    margin: 0.75rem 0;
}

.travel-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.travel-day {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 0.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.travel-day:hover {
    border-color: #3498db;
    background: #f7fbfe;
}

.travel-day.selected {
    border-color: #27ae60;
    background: #eafaf1;
}

.travel-day.today {
    border-color: #3498db;
}

.travel-day.today.selected {
    border-color: #27ae60;
}

.travel-day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.25rem;
}

.travel-day-date {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

.travel-day.selected .travel-day-name,
.travel-day.selected .travel-day-date {
    color: #27ae60;
}

@media (max-width: 600px) {
    .travel-calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Upload Page */
.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #3498db;
    background: #f7fbfe;
}

.upload-area .upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #bdc3c7;
}

.upload-area.drag-over .upload-icon {
    color: #3498db;
}

.upload-area p {
    color: #666;
    margin-bottom: 0.5rem;
}

.upload-area .file-types {
    font-size: 0.8rem;
    color: #999;
}

.file-preview {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-preview .file-icon {
    font-size: 2rem;
    color: #3498db;
}

.file-preview .file-info {
    flex: 1;
}

.file-preview .file-name {
    font-weight: 500;
}

.file-preview .file-size {
    font-size: 0.8rem;
    color: #666;
}

.file-preview .file-remove {
    color: #e74c3c;
    cursor: pointer;
    padding: 0.5rem;
    border: none;
    background: none;
    font-size: 1.2rem;
}

.upload-status {
    margin-top: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background: #fef9e7;
    color: #f39c12;
}

.status-approved {
    background: #eafaf1;
    color: #27ae60;
}

.status-rejected {
    background: #fdeaea;
    color: #e74c3c;
}

/* Settings Page */
.settings-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    flex: 1;
    font-weight: 500;
}

.setting-item .setting-control {
    width: 200px;
}

.setting-item input[type="number"],
.setting-item select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: #3498db;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(22px);
}

/* Progress Page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Calendar */
.calendar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 1rem;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    padding: 0.25rem;
    font-weight: 600;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.no-activity {
    background: #f0f0f0;
}

.calendar-day.low-activity {
    background: #d5f5e3;
}

.calendar-day.medium-activity {
    background: #82e0aa;
}

.calendar-day.high-activity {
    background: #27ae60;
    color: white;
}

.calendar-day.today {
    border: 2px solid #3498db;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-table th,
.history-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 0.85rem;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover td {
    background: #f7fbfe;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.achievement {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.achievement.locked {
    opacity: 0.5;
}

.achievement .achievement-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.achievement .achievement-name {
    font-weight: 500;
    font-size: 0.85rem;
}

.achievement .achievement-desc {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Hero / Landing */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-card .feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: #666;
}

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

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: inherit;
}

.tab:hover {
    color: #333;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #eee;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover,
.pagination .active {
    background: #3498db;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: #666;
    background: #ecf0f1;
}

/* Utility */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

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

/* Mobile */
@media (max-width: 600px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 1rem;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

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

    .flashcard .word-text {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .worksheet-info {
        grid-template-columns: 1fr;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .setting-item .setting-control {
        width: 100%;
    }

    .history-table {
        font-size: 0.85rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.5rem;
    }

    .study-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Icon Button */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Admin Dashboard */
.admin-dashboard table {
    width: 100%;
    border-collapse: collapse;
}

.admin-dashboard th,
.admin-dashboard td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.admin-dashboard th {
    background: #f8f9fa;
    font-weight: 600;
}

.admin-dashboard tr:hover {
    background: #fcfcfc;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

/* Wanqu Home Styles */
.hero-logo {
    margin-bottom: 1.5rem;
}

.main-logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #34495e;
    margin-bottom: 2rem;
}

.wanqu-intro {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 2rem auto;
    text-align: left;
    border-left: 5px solid #3498db;
}

.wanqu-intro h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.wanqu-intro p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 0;
    /* Reset helper */
}

/* Inline Logo Header */
.hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.logo-small {
    height: 50px;
    width: auto;
    border-radius: 8px;
    background: white;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* About Page Styles */
.about-card {
    max-width: 900px;
    margin: 0 auto;
}

.about-header {
    margin-bottom: 2rem;
}

.about-logo {
    max-width: 200px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.about-header .subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-top: 0.5rem;
}

.about-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.bay-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .bay-grid {
        grid-template-columns: 1fr;
    }
}

.bay-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
    border: 1px solid #eee;
}

.bay-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    background: #fff;
    border-color: #3498db;
}

.bay-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.bay-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 1rem;
}

.bay-item p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
}

.feature-list {
    list-style: none;
    margin-top: 1rem;
}

.feature-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* Bay Area Images */
.bay-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: 120px;
    /* Fixed height for consistency */
    margin: 0 auto 1rem auto;
    border-radius: 4px;
    object-fit: contain;
}