/* AIBRO Mini App - Clean Mobile Design */

:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --accent-color: #852194;
    --accent-light: #a855f7;
    --accent-dark: #6b1a78;
    --impact-high: #ff3b30;
    --impact-medium: #ff9500;
    --impact-low: #8e8e93;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* Space for bottom tabs */
}

/* Remove old header - we'll use bottom tabs */
.header {
    display: none;
}

/* Bottom Navigation - HIDDEN (no glossary) */
.tabs {
    display: none !important;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-icon {
    font-size: 24px;
    line-height: 1;
}

.tab-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.tab.active .tab-icon-img {
    opacity: 1;
}

.tab-text {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.tab.active .tab-text {
    color: var(--accent-color);
}

/* Hide search container by default */
.search-container {
    display: none;
    padding: 16px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 8px;
    flex-direction: row;
}

.search-container.show {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    background: #f5f5f5;
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: var(--accent-color);
}

.search-btn {
    padding: 12px 20px;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-btn:active {
    transform: scale(0.95);
    background: #6b1a78;
}

/* Content containers */
.tab-content {
    display: none;
    padding: 16px;
    min-height: calc(100vh - 80px);
}

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

/* View containers */
.view {
    max-width: 100%;
}

.view.hidden {
    display: none;
}

/* Loading & Empty states */
.loading, .empty-state, .error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.error {
    color: #ff3b30;
}

/* ==================== GLOSSARY STYLES ==================== */

.glossary-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.glossary-header-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.glossary-header-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    padding: 4px;
}

.letter-btn {
    padding: 14px 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}

.letter-btn:active {
    background: linear-gradient(135deg, #852194 0%, #a855f7 100%);
    color: white;
    border-color: #852194;
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.letter-btn.disabled {
    color: var(--text-tertiary);
    opacity: 0.3;
    cursor: default;
    background: #fafafa;
    border-color: #f0f0f0;
}

.letter-btn.disabled:active {
    transform: none;
    background: #fafafa;
    color: var(--text-tertiary);
    border-color: #f0f0f0;
}

/* Letter Card (AIBRO style with counters) */
.letter-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.letter-card:active {
    background: linear-gradient(135deg, #852194 0%, #a855f7 100%);
    border-color: #852194;
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.letter-card:active .letter {
    color: white;
}

.letter-card:active .letter-count {
    color: rgba(255, 255, 255, 0.9);
}

.letter-card.disabled {
    opacity: 0.3;
    cursor: default;
    background: #fafafa;
    border-color: #f0f0f0;
}

.letter-card.disabled:active {
    transform: none;
    background: #fafafa;
    border-color: #f0f0f0;
}

.letter-card.disabled:active .letter {
    color: var(--text-tertiary);
}

.letter-card.disabled:active .letter-count {
    color: var(--text-tertiary);
}

.letter {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.letter-card.disabled .letter {
    color: var(--text-tertiary);
}

.letter-count {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1;
}

.letter-card.disabled .letter-count {
    color: var(--text-tertiary);
}

.term-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.term-card:nth-child(odd) {
    background: #fafafa;
}

.term-card:active {
    box-shadow: var(--shadow-md);
}

.term-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.term-name-en {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.term-definition {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 16px;
}

.back-btn:active {
    background: #f5f5f5;
}

.term-detail {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.term-detail h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.term-detail-en {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.term-detail-definition {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.term-detail-article {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.7;
}

.term-detail-article p {
    margin-bottom: 16px;
}

.term-link {
    color: #852194;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #852194;
}

/* ==================== LESSONS STYLES ==================== */

/* Lessons Category (AIBRO style) */
.lessons-category {
    margin-bottom: 32px;
}

.lessons-category .category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid var(--accent-color);
}

.lesson-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.lesson-card:nth-child(odd) {
    background: #fafafa;
}

.lesson-card:active {
    box-shadow: var(--shadow-md);
}

/* Пара урок + практика в одном боксе */
.lesson-pair-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.lesson-pair-card:active {
    box-shadow: var(--shadow-md);
}

.lesson-pair-card.completed {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

/* Заголовок пары (лекция/практика) */
.lesson-pair-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lesson-type-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lesson-type-label.practice {
    color: #2ecc71;
}

/* Основной заголовок урока */
.lesson-title-main {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Подзаголовок практики */
.lesson-title-sub {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* Разделитель между лекцией и практикой */
.practice-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
    margin: 16px 0;
}

/* Секция практики внутри пары */
.lesson-practice {
    margin-top: 12px;
    padding-top: 12px;
}

/* Чекбокс урока */
.lesson-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
    flex-shrink: 0;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    position: relative;
    margin: 0;
}

.lesson-checkbox:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.lesson-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lesson-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    margin-bottom: 4px;
}

.lesson-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.lesson-difficulty {
    font-size: 14px;
    flex-shrink: 0;
}

.lesson-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.lesson-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.lesson-detail {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.lesson-header {
    margin-bottom: 24px;
}

.lesson-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.lesson-content {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.7;
}

.lesson-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.lesson-content h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.lesson-content p {
    font-size: 16px;
    margin-bottom: 16px;
}

.lesson-content ul, .lesson-content ol {
    margin: 12px 0 16px 20px;
}

.lesson-content li {
    font-size: 16px;
    margin-bottom: 8px;
}

.lesson-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'SF Mono', Monaco, monospace;
}

.lesson-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.lesson-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Tables in lessons */
.lesson-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}

.lesson-content table thead {
    background: var(--bg-secondary);
}

.lesson-content table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ddd;
    color: var(--text-primary);
}

.lesson-content table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    color: var(--text-primary);
}

.lesson-content table tr:nth-child(even) {
    background: var(--bg-secondary);
}

/* Horizontal lines */
.lesson-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 24px 0;
}

/* Task checkboxes */
.lesson-content .task-item {
    list-style: none;
    margin-left: -20px;
}

.lesson-content .task-checkbox {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

/* Code blocks */
.lesson-content pre {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.lesson-content pre code {
    background: none;
    padding: 0;
}

/* External links */
.lesson-content .external-link {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

.lesson-content .external-link:hover {
    color: #6b1a78;
}

/* ==================== COURSES STYLES ==================== */

.courses-header {
    text-align: center;
    margin-bottom: 24px;
}

.header-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.courses-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.courses-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.course-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.course-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.course-badge {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}

.course-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.course-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.course-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: center;
}

.course-stats {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.course-stats span {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 8px;
}

.course-stats-secondary {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.course-stats-secondary span {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #852194 0%, #a855f7 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.course-status {
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    font-style: italic;
    padding: 8px 0;
}

/* Course Detail Header */
.course-detail-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.course-badge-large {
    font-size: 64px;
    margin-bottom: 12px;
}

.course-detail-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.course-detail-header p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Lesson Completion Mark */
.completion-mark {
    font-size: 16px;
    margin-left: 8px;
}

.lesson-card.completed {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

/* Lesson Tasks Section */
.lesson-tasks {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.lesson-tasks h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s;
}

.task-item:has(input:checked) {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.task-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.task-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--accent-color);
    flex-shrink: 0;
}

.task-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
}

.task-checkbox input[type="checkbox"]:checked + .task-text {
    color: var(--text-secondary);
    text-decoration: line-through;
}

/* Lesson Detail Header */
.lesson-detail-header {
    margin-bottom: 24px;
}

.lesson-type-header {
    font-size: 15px; /* Увеличено с 14px */
    font-weight: 700; /* Увеличен вес */
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px; /* Увеличен отступ */
    padding-bottom: 10px; /* Увеличен отступ */
    border-bottom: 2px solid var(--accent-color);
}

.lesson-detail-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    margin-top: 16px;
}

.lesson-short-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.lesson-category {
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive */
/* Адаптивность для мобильных (Telegram на телефоне) */
@media (max-width: 480px) {
    .tab-content {
        padding: 12px;
    }

    .calendar-event {
        padding: 12px;
    }

    .term-card, .lesson-card {
        padding: 14px;
    }

    .course-card {
        padding: 16px;
    }

    .course-badge {
        font-size: 40px;
    }

    .course-badge-large {
        font-size: 56px;
    }
}

/* ==================== ONBOARDING ==================== */

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #852194 0%, #a855f7 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-overlay.hidden {
    display: none;
}

.onboarding-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 400px;
}

.onboarding-slide.active {
    display: flex;
}

.onboarding-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.onboarding-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.onboarding-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.onboarding-dots .dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}

.onboarding-btn {
    background: white;
    color: #852194;
    border: none;
    padding: 14px 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.onboarding-btn:active {
    transform: scale(0.95);
}

/* ==================== EMPTY STATES ==================== */

.empty-state-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 40px auto 20px;
    display: block;
    border-radius: 12px;
}

/* ==================== NEXT LESSON NAVIGATION ==================== */

.next-lesson-container {
    margin-top: 32px;
    padding: 0 16px 16px;
}

.next-lesson-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(133, 33, 148, 0.3);
    text-align: center;
    line-height: 1.4;
}

.next-lesson-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(133, 33, 148, 0.3);
}

.course-complete-container {
    margin-top: 32px;
    padding: 24px 16px;
    text-align: center;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 16px;
    margin-left: 16px;
    margin-right: 16px;
}

.course-complete-container p {
    font-size: 18px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 16px;
}

.back-to-course-btn {
    padding: 14px 32px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-course-btn:active {
    transform: scale(0.98);
    background: #16a34a;
}

/* ==================== COPY BUTTON FOR CODE BLOCKS ==================== */

.code-block-wrapper {
    position: relative;
    margin: 16px 0;
}

.copy-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.code-block-wrapper pre {
    margin: 0;
    border-radius: 0 0 10px 10px;
    border: 1px solid #dee2e6;
    border-top: none;
}

.code-block-wrapper pre code {
    display: block;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ==================== QUIZ STYLES ==================== */

#quiz-view {
    padding: 16px;
}

.quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

.quiz-header {
    margin-bottom: 24px;
}

.quiz-header h2 {
    font-size: 20px;
    margin: 12px 0 8px;
    color: var(--text-primary);
}

.quiz-progress {
    font-size: 14px;
    color: var(--text-secondary);
}

.quiz-question {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-answer {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-answer:hover {
    background: #f0f0f0;
}

.quiz-answer.selected {
    background: rgba(133, 33, 148, 0.1);
    border-color: var(--accent-color);
}

.answer-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.quiz-answer.selected .answer-letter {
    background: var(--accent-dark);
}

.answer-text {
    font-size: 15px;
    line-height: 1.4;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.quiz-btn {
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-btn.primary {
    background: var(--accent-color);
    color: white;
}

.quiz-btn.primary:hover {
    background: var(--accent-dark);
}

.quiz-btn.secondary {
    background: #f0f0f0;
    color: var(--text-primary);
}

.quiz-btn.secondary:hover {
    background: #e5e5e5;
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 20px;
}

.result-emoji {
    font-size: 64px;
    margin-bottom: 16px;
}

.quiz-results h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.result-percentage {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.result-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.result-details {
    text-align: left;
    margin: 24px 0;
}

.result-item {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.result-item.correct {
    background: rgba(52, 199, 89, 0.1);
}

.result-item.incorrect {
    background: rgba(255, 59, 48, 0.1);
}

.result-question {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.result-icon {
    font-size: 18px;
}

.result-item.correct .result-icon {
    color: #34c759;
}

.result-item.incorrect .result-icon {
    color: #ff3b30;
}

.result-explanation {
    margin-top: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.quiz-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* Quiz button in course view */
.quiz-card {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin-top: 20px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease;
}

.quiz-card:hover {
    transform: scale(1.02);
}

.quiz-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.quiz-card p {
    font-size: 14px;
    opacity: 0.9;
}

/* ==================== GAMIFICATION STYLES ==================== */

/* User Stats Header */
.user-stats-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #852194 0%, #a855f7 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(133, 33, 148, 0.3);
}

.user-stats-header.hidden {
    display: none;
}

.streak-badge, .xp-badge, .level-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.streak-badge:active, .xp-badge:active, .level-badge:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.streak-icon, .xp-icon {
    font-size: 16px;
    line-height: 1;
}

.xp-label {
    font-size: 12px;
    opacity: 0.9;
}

#level-badge-emoji {
    font-size: 16px;
}

/* XP Toast Animation */
#xp-toast-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 1000;
}

.xp-toast {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #1a1a1a;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(255, 183, 0, 0.4);
    animation: xpToastAnim 2s ease-out forwards;
    margin-bottom: 8px;
}

@keyframes xpToastAnim {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1.1);
    }
    30% {
        transform: translateY(0) scale(1);
    }
    70% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Streak bonus toast */
.xp-toast.streak-bonus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
}

/* Daily bonus toast */
.xp-toast.daily-bonus {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Level Up Modal */
.level-up-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.level-up-modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.level-up-content {
    background: white;
    border-radius: 24px;
    padding: 32px 40px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: levelUpPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes levelUpPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.level-up-emoji {
    font-size: 72px;
    margin-bottom: 16px;
    animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.level-up-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.level-up-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.level-up-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.level-up-btn:active {
    transform: scale(0.95);
}

/* Streak Fire Animation */
.streak-badge.active {
    animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
    0%, 100% {
        background: rgba(255, 255, 255, 0.2);
    }
    50% {
        background: rgba(255, 107, 107, 0.4);
    }
}

/* XP Progress Bar (optional, for level progress) */
.xp-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.xp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffb700);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Stats in course header */
.course-stats-gamification {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== ACHIEVEMENTS STYLES ==================== */

/* Achievement Toast */
.achievement-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--accent-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(133, 33, 148, 0.3);
    animation: achievementToastAnim 4s ease-out forwards;
    max-width: 320px;
}

.achievement-toast.rare {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.achievement-toast.epic {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.achievement-toast.legendary {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4);
}

@keyframes achievementToastAnim {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    10% {
        opacity: 1;
        transform: translateY(0) scale(1.05);
    }
    20% {
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.achievement-toast-icon {
    font-size: 40px;
    line-height: 1;
    animation: achievementIconBounce 0.6s ease infinite alternate;
}

@keyframes achievementIconBounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.achievement-toast-content {
    flex: 1;
}

.achievement-toast-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.achievement-toast-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.achievement-toast-xp {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
}

/* Achievements Modal */
.achievements-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.achievements-modal.hidden {
    display: none;
}

.achievements-modal-content {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.achievements-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.achievements-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.achievements-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievements-summary {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
    font-weight: 600;
}

.achievements-list {
    padding: 16px 24px 32px;
}

.achievements-section {
    margin-bottom: 24px;
}

.achievements-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Achievement Card */
.achievement-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.2s ease;
}

.achievement-card.earned {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #22c55e;
}

.achievement-card.locked {
    opacity: 0.6;
    border-left-color: #d1d5db;
}

.achievement-card.rare {
    border-left-color: #3b82f6;
}

.achievement-card.rare.earned {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.achievement-card.epic {
    border-left-color: #8b5cf6;
}

.achievement-card.epic.earned {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.achievement-card.legendary {
    border-left-color: #f59e0b;
}

.achievement-card.legendary.earned {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.achievement-icon {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}

.achievement-icon.locked {
    filter: grayscale(100%);
    opacity: 0.5;
}

.achievement-info {
    flex: 1;
    min-width: 0;
}

.achievement-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.achievement-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.achievement-xp {
    color: var(--accent-color);
    font-weight: 600;
}

.achievement-date {
    color: var(--text-tertiary);
}

/* Achievements button in header */
.achievements-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    cursor: pointer;
    border: none;
    color: white;
    transition: transform 0.2s ease, background 0.2s ease;
}

.achievements-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== CERTIFICATE STYLES ==================== */

/* Certificate Modal */
.certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.certificate-modal.hidden {
    display: none;
}

.certificate-modal-content {
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: certificatePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@keyframes certificatePop {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.certificate-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.certificate-emoji {
    font-size: 64px;
    margin-bottom: 12px;
    animation: bounce 0.6s ease infinite alternate;
}

.certificate-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.certificate-modal-header p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.certificate-course-name {
    font-size: 18px !important;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin-top: 8px !important;
}

/* Certificate Preview */
.certificate-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.certificate-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.certificate-loading {
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* Certificate Actions */
.certificate-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.certificate-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.certificate-btn.download {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
}

.certificate-btn.download:active {
    transform: scale(0.98);
    background: var(--accent-dark);
}

.certificate-btn.share {
    background: linear-gradient(135deg, #0088cc, #00a8e8);
    color: white;
}

.certificate-btn.share:active {
    transform: scale(0.98);
    background: #006699;
}

.certificate-close-btn {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.certificate-close-btn:active {
    background: #e5e5e5;
}

/* Certificate card in course completion */
.certificate-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.certificate-card h3 {
    font-size: 18px;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.certificate-card p {
    font-size: 14px;
    color: #a16207;
}

/* ==================== DAILY GOAL STYLES ==================== */

/* Daily Goal Badge in Header */
.daily-goal-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.daily-goal-badge:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.daily-goal-badge.completed {
    background: rgba(52, 199, 89, 0.4);
    animation: goalCompletePulse 2s ease-in-out infinite;
}

@keyframes goalCompletePulse {
    0%, 100% {
        background: rgba(52, 199, 89, 0.4);
    }
    50% {
        background: rgba(52, 199, 89, 0.6);
    }
}

.daily-goal-icon {
    font-size: 16px;
    line-height: 1;
}

/* Daily Goal Modal */
.daily-goal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.daily-goal-modal.hidden {
    display: none;
}

.daily-goal-modal-content {
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.daily-goal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.daily-goal-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.daily-goal-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background 0.2s ease;
}

.daily-goal-close-btn:active {
    background: #e0e0e0;
}

/* Current Progress Display */
.daily-goal-current {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.daily-goal-current p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.daily-goal-progress-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}

#modal-lessons-today {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.daily-goal-separator {
    font-size: 32px;
    color: var(--text-tertiary);
}

#modal-daily-goal {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1;
}

/* Progress Bar */
.daily-goal-progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.daily-goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.daily-goal-progress-fill.completed {
    background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

/* Goal Settings */
.daily-goal-settings {
    margin-bottom: 20px;
}

.daily-goal-settings p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    text-align: center;
}

.daily-goal-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.daily-goal-option {
    flex: 1;
    max-width: 90px;
    padding: 16px 12px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.daily-goal-option:active {
    transform: scale(0.95);
}

.daily-goal-option.active {
    background: rgba(133, 33, 148, 0.1);
    border-color: var(--accent-color);
}

.daily-goal-option .goal-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.daily-goal-option.active .goal-number {
    color: var(--accent-color);
}

.daily-goal-option .goal-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Info Section */
.daily-goal-info {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 16px;
}

.daily-goal-info p {
    font-size: 13px;
    color: #166534;
    margin: 0;
    line-height: 1.5;
}

.daily-goal-info p + p {
    margin-top: 8px;
}

/* Daily Goal Complete Toast */
.daily-goal-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.4s ease, toastSlideOut 0.4s ease 3s forwards;
}

.daily-goal-toast.hidden {
    display: none;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}

.daily-goal-toast .toast-icon {
    font-size: 20px;
}

.daily-goal-toast .toast-text {
    font-size: 15px;
}
