/* ==========================================
   KOODI STREAK PAGE — TWO-COLUMN LAYOUT
   ========================================== */

/* Примусовий скрол для streak-сторінки */
html.streak-page-html {
    overflow: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.streak-page-body {
    padding-top: 0 !important;
    overflow: auto !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    position: relative !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto !important;
    transition: background 0.6s ease;
}

/* Динамічний фон */
body.streak-page-body.streak-inactive {
    background: linear-gradient(160deg, #e0dede 0%, #d4d2d2 50%, #c8c5c5 100%) !important;
}

body.streak-page-body.streak-active {
    background: linear-gradient(160deg, #FFF5E6 0%, #FFE8CC 50%, #FFD9A8 100%) !important;
}

/* ==================== FLYING SQUARES ==================== */
.flying-squares {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.flying-square {
    position: absolute;
    border-radius: 10px;
    opacity: 0;
    animation: floatUp linear infinite;
}

.flying-square:nth-child(1) { width: 50px; height: 50px; background: #FF4E99; left: 5%; animation-duration: 22s; animation-delay: 0s; }
.flying-square:nth-child(2) { width: 35px; height: 35px; background: #FF9F00; left: 12%; animation-duration: 18s; animation-delay: -4s; }
.flying-square:nth-child(3) { width: 70px; height: 70px; background: #C6DF2B; left: 22%; animation-duration: 28s; animation-delay: -8s; }
.flying-square:nth-child(4) { width: 25px; height: 25px; background: #009DFF; left: 32%; animation-duration: 20s; animation-delay: -2s; }
.flying-square:nth-child(5) { width: 45px; height: 45px; background: #FF4E99; left: 42%; animation-duration: 25s; animation-delay: -6s; }
.flying-square:nth-child(6) { width: 60px; height: 60px; background: #FF9F00; left: 52%; animation-duration: 23s; animation-delay: -10s; }
.flying-square:nth-child(7) { width: 30px; height: 30px; background: #C6DF2B; left: 62%; animation-duration: 19s; animation-delay: -3s; }
.flying-square:nth-child(8) { width: 55px; height: 55px; background: #009DFF; left: 72%; animation-duration: 26s; animation-delay: -7s; }
.flying-square:nth-child(9) { width: 40px; height: 40px; background: #FF4E99; left: 82%; animation-duration: 21s; animation-delay: -12s; }
.flying-square:nth-child(10) { width: 65px; height: 65px; background: #FF9F00; left: 90%; animation-duration: 24s; animation-delay: -5s; }
.flying-square:nth-child(11) { width: 20px; height: 20px; background: #C6DF2B; left: 8%; animation-duration: 17s; animation-delay: -9s; }
.flying-square:nth-child(12) { width: 75px; height: 75px; background: #009DFF; left: 48%; animation-duration: 30s; animation-delay: -15s; }

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    5% { opacity: 0.12; }
    95% { opacity: 0.12; }
    100% { transform: translateY(-150px) rotate(360deg); opacity: 0; }
}

/* ==================== TWO-COLUMN LAYOUT ==================== */
.streak-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    padding-top: 160px;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

.streak-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 30px;
    align-items: start;
}

.streak-sidebar {
    position: sticky;
    top: 160px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

.streak-sidebar::-webkit-scrollbar { width: 4px; }
.streak-sidebar::-webkit-scrollbar-track { background: transparent; }
.streak-sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

.streak-main {
    min-width: 0;
}

/* ==================== HERO CARD ==================== */
.streak-hero-card {
    border-radius: 25px;
    padding: 35px 25px 30px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    transition: background 0.5s ease;
    border: 3px solid #131010;
    box-shadow: 6px 6px 0px #131010;
}

.streak-hero-card.inactive { background: #4a4a4a; }
.streak-hero-card.active { background: #FF9F00; }

.level-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ffffff;
    color: #131010;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 2px solid #131010;
}

.streak-hero-card.active .level-badge { background: #C6DF2B; }

.streak-fire-icon {
    font-size: 64px;
    margin-bottom: 5px;
    animation: fireBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 25px rgba(0,0,0,0.2));
}

@keyframes fireBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.streak-hero-card.inactive .streak-fire-icon {
    filter: grayscale(1) drop-shadow(0 8px 25px rgba(0,0,0,0.1));
    animation: none;
}

.streak-main-number { font-size: 72px; font-weight: 900; color: #fff; line-height: 1; }
.streak-main-label { font-size: 1.2em; color: rgba(255,255,255,0.85); margin-top: 5px; font-weight: 500; }

.streak-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: rgba(0,0,0,0.15);
    border-radius: 16px;
    padding: 15px;
    margin-top: 20px;
}

.streak-stat { text-align: center; }
.streak-stat-icon { font-size: 22px; margin-bottom: 5px; display: block; }
.streak-stat-value { font-size: 24px; font-weight: 800; color: #fff; }
.streak-stat-label { font-size: 0.75em; color: rgba(255,255,255,0.7); margin-top: 2px; }

/* ==================== CTA ==================== */
.cta-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0px #131010;
}

.cta-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px #131010; }
.cta-card.completed { border-color: #C6DF2B; background: #f9fce8; box-shadow: 4px 4px 0px #131010; }

.cta-icon { width: 48px; height: 48px; background: #f5f5f5; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; border: 2px solid #131010; }
.cta-card.completed .cta-icon { background: #C6DF2B; }
.cta-content { flex: 1; min-width: 0; }
.cta-title { font-size: 0.95em; font-weight: 700; color: #131010; margin-bottom: 2px; }
.cta-subtitle { font-size: 0.8em; color: #666; }
.cta-arrow { font-size: 1.1em; color: #666; }

/* ==================== SECTIONS ==================== */
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.1em; font-weight: 700; color: #131010; margin: 20px 0 12px; }
.section-title span { font-size: 1.2em; }

.goals-container { display: flex; flex-direction: column; gap: 10px; }

.goal-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.goal-card:hover { border-color: #131010; transform: translateX(4px); }

.goal-icon { width: 42px; height: 42px; background: #f5f5f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.goal-content { flex: 1; min-width: 0; }
.goal-title { font-weight: 600; color: #131010; margin-bottom: 2px; font-size: 0.9em; }
.goal-subtitle { font-size: 0.8em; color: #666; }
.goal-arrow { color: #ccc; font-size: 1em; }

/* ==================== QUOTE ==================== */
.quote-card { background: #fff; border: 2px solid #e5e5e5; border-radius: 18px; padding: 20px; margin-bottom: 16px; position: relative; }
.quote-icon { font-size: 32px; margin-bottom: 10px; display: block; }
.quote-text { font-size: 1em; line-height: 1.5; color: #131010; font-weight: 500; }
.quote-author { margin-top: 12px; font-size: 0.85em; color: #666; text-align: right; }
.quote-refresh { position: absolute; top: 12px; right: 12px; background: #f5f5f5; border: none; width: 34px; height: 34px; border-radius: 50%; color: #666; cursor: pointer; transition: all 0.3s ease; }
.quote-refresh:hover { background: #131010; color: #fff; transform: rotate(180deg); }

/* ==================== CALENDAR ==================== */
.calendar-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 6px 6px 0px #131010;
}

.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.calendar-nav-btn { width: 40px; height: 40px; background: #f5f5f5; border: 2px solid #131010; border-radius: 12px; cursor: pointer; transition: all 0.2s ease; color: #131010; font-size: 1em; }
.calendar-nav-btn:hover { background: #131010; color: #fff; }
.calendar-month-title { font-size: 1.2em; font-weight: 700; color: #131010; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 12px; }
.weekday { text-align: center; font-size: 0.85em; font-weight: 600; color: #666; padding: 8px 0; }

.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

.cal-day { aspect-ratio: 1; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 0.95em; font-weight: 600; color: #131010; position: relative; transition: all 0.2s ease; background: #f5f5f5; border: 2px solid transparent; }
.cal-day.empty { background: transparent; border: none; }
.cal-day.inactive { background: #f5f5f5; color: #999; }
.cal-day.active { background: #FF9F00; color: transparent; border-color: #E88A00; box-shadow: 0 4px 15px rgba(255, 159, 0, 0.4); }
.cal-day.active::after { content: '\1F525'; font-size: 20px; position: absolute; }
.cal-day.active:hover { transform: scale(1.15); z-index: 10; }
.cal-day.today { background: #C6DF2B; color: #131010; border: 3px solid #131010; font-weight: 800; }
.cal-day.today.active { background: #C6DF2B; border-color: #131010; }
.cal-day.today.active::after { content: '\2B50'; }
.cal-day.future { background: transparent; border: 2px dashed #ddd; color: #ccc; }

.calendar-legend { display: flex; justify-content: center; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 2px solid #f5f5f5; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.85em; color: #666; }
.legend-color { width: 20px; height: 20px; border-radius: 6px; }

/* ==================== PROGRESS ==================== */
.progress-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
}

.progress-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.progress-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95em; }
.progress-title span { font-size: 1.2em; }
.progress-percent { font-size: 1em; font-weight: 700; color: #FF9F00; }
.progress-bar-container { height: 14px; background: #f5f5f5; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.progress-bar-fill { height: 100%; background: #FF9F00; border-radius: 10px; transition: width 1s ease; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.85em; color: #666; }

/* ==================== MODAL ==================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content { background: #fff; border-radius: 28px 28px 0 0; padding: 25px 22px 35px; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); }
.modal-overlay.show .modal-content { transform: translateY(0); }
.modal-handle { width: 40px; height: 5px; background: #ddd; border-radius: 3px; margin: 0 auto 20px; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 1.25em; font-weight: 700; }
.modal-close { width: 40px; height: 40px; background: #f5f5f5; border: none; border-radius: 50%; cursor: pointer; font-size: 1.2em; color: #666; transition: all 0.2s ease; }
.modal-close:hover { background: #131010; color: #fff; }
.modal-subtitle { color: #666; margin-bottom: 20px; line-height: 1.5; }
.goal-input-wrapper { position: relative; margin-bottom: 20px; }
.goal-input { width: 100%; padding: 16px; border: 2px solid #e5e5e5; border-radius: 14px; font-family: 'Rubik', sans-serif; font-size: 1em; resize: none; min-height: 70px; background: #fff; color: #131010; }
.goal-input:focus { outline: none; border-color: #131010; }
.goal-counter { position: absolute; bottom: 12px; right: 15px; font-size: 0.8em; color: #666; }
.emoji-picker-btn { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: #f5f5f5; border: none; border-radius: 10px; cursor: pointer; font-size: 1.2em; }
.preset-label { font-weight: 600; margin-bottom: 12px; }
.preset-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.preset-option { padding: 14px 16px; border: 2px solid #e5e5e5; border-radius: 14px; cursor: pointer; display: flex; justify-content: space-between; transition: all 0.2s ease; }
.preset-option:hover { border-color: #131010; }
.preset-option.selected { border-color: #131010; background: #f5f5f5; }
.preset-option.selected .preset-check { opacity: 1; }
.preset-check { opacity: 0; }
.save-goal-btn { width: 100%; padding: 16px; background: #131010; color: #fff; border: none; border-radius: 14px; font-family: 'Rubik', sans-serif; font-size: 1.05em; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.save-goal-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

.time-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.time-option { padding: 18px 15px; border: 2px solid #e5e5e5; border-radius: 14px; cursor: pointer; text-align: center; transition: all 0.2s ease; }
.time-option:hover { border-color: #131010; }
.time-option.selected { border-color: #131010; background: #f5f5f5; }
.time-option-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.time-option-title { font-weight: 600; color: #131010; }
.time-option-desc { font-size: 0.8em; color: #666; }

.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; padding: 15px; background: #f5f5f5; border-radius: 14px; margin-bottom: 20px; }
.emoji-item { font-size: 1.5em; padding: 8px; text-align: center; cursor: pointer; border-radius: 8px; }
.emoji-item:hover { background: #fff; transform: scale(1.2); }

/* ==================== NOTIFICATION TOGGLE ==================== */
.notification-toggle { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: #f5f5f5; border-radius: 14px; margin-top: 16px; }
.notification-toggle-info { display: flex; align-items: center; gap: 12px; }
.notification-toggle-icon { font-size: 24px; }
.notification-toggle-text h4 { font-size: 0.95em; font-weight: 600; margin-bottom: 2px; }
.notification-toggle-text p { font-size: 0.8em; color: #666; margin: 0; }
.toggle-switch { position: relative; width: 50px; height: 28px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 28px; cursor: pointer; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .toggle-slider { background: #FF9F00; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.notification-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px; font-size: 0.8em; font-weight: 600; }
.notification-status.enabled { background: #e6f7ec; color: #10b981; }
.notification-status.disabled { background: #f5f5f5; color: #999; }

/* ==================== TOAST ==================== */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: #131010; color: #fff; padding: 14px 24px; border-radius: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; z-index: 2000; opacity: 0; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== CLUB SECTIONS (PREMIUM GATING) ==================== */
.club-section {
    position: relative;
    margin-bottom: 20px;
    border-radius: 25px;
    overflow: hidden;
}

.club-section.locked .club-section-content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.club-lock-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    border-radius: 25px;
}

.club-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #131010;
    color: #fff;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95em;
    border: 2px solid #131010;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}

.club-lock-badge i { color: #FF9F00; }

.club-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #FF9F00;
    color: #131010;
    border: 3px solid #131010;
    border-radius: 14px;
    font-family: 'Rubik', sans-serif;
    font-size: 1em;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0px #131010;
}

.club-unlock-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #131010;
}

/* ==================== ACTIVITY GRAPH ==================== */
.activity-graph-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 22px;
    box-shadow: 6px 6px 0px #131010;
}

.activity-graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.activity-graph-title { font-weight: 700; color: #131010; }
.activity-graph-total { font-weight: 700; color: #FF9F00; }

.activity-graph-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
}

.activity-bar {
    flex: 1;
    min-height: 8px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease, background 0.3s ease;
}

.activity-bar.active {
    height: 100%;
    background: #FF9F00;
}

.activity-bar.today {
    border: 2px solid #131010;
    border-bottom: none;
}

.activity-bar.today.active { background: #C6DF2B; }

.activity-graph-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8em;
    color: #999;
}

/* ==================== SELF-COMPARISON ==================== */
.compare-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.compare-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 22px;
    text-align: center;
    box-shadow: 6px 6px 0px #131010;
}

.compare-label { font-size: 0.8em; color: #666; margin-bottom: 12px; font-weight: 600; }

.compare-values {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.compare-current { font-size: 2em; font-weight: 800; color: #131010; }
.compare-vs { font-size: 0.85em; color: #999; font-weight: 600; }
.compare-previous { font-size: 1.5em; font-weight: 600; color: #999; }

.compare-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
}

.compare-trend.up { background: #e6f7ec; color: #10b981; }
.compare-trend.down { background: #ffe6e6; color: #d50000; }
.compare-trend.neutral { background: #f5f5f5; color: #999; }

/* ==================== TIME ON PLATFORM ==================== */
.time-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.time-stat-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 22px;
    text-align: center;
    box-shadow: 6px 6px 0px #131010;
}

.time-stat-icon { font-size: 28px; margin-bottom: 8px; }
.time-stat-value { font-size: 2em; font-weight: 800; color: #131010; }
.time-stat-label { font-size: 0.8em; color: #666; margin-top: 4px; }

/* ==================== PER-COURSE PROGRESS ==================== */
.course-progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.streak-course-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 4px 4px 0px #131010;
}

.streak-course-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px #131010; }

.streak-course-icon { font-size: 28px; flex-shrink: 0; }
.streak-course-info { flex: 0 0 auto; }
.streak-course-name { font-weight: 700; color: #131010; font-size: 0.95em; }
.streak-course-stats { font-size: 0.8em; color: #666; }

.streak-course-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.streak-course-bar {
    flex: 1;
    height: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
}

.streak-course-bar-fill {
    height: 100%;
    background: #FF9F00;
    border-radius: 6px;
    transition: width 1s ease;
}

.streak-course-percent {
    font-size: 0.85em;
    font-weight: 700;
    color: #FF9F00;
    min-width: 35px;
    text-align: right;
}

.no-courses-msg, .no-tests-msg {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    color: #666;
    font-size: 0.95em;
    box-shadow: 4px 4px 0px #131010;
}

.no-courses-msg a, .no-tests-msg a {
    color: #FF9F00;
    font-weight: 700;
    text-decoration: none;
}

/* ==================== WEAK TOPICS ==================== */
.weak-topics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weak-topic-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 4px 4px 0px #131010;
}

.weak-topic-card.success { border-color: #C6DF2B; background: #f9fce8; }

.weak-topic-icon { font-size: 24px; flex-shrink: 0; }
.weak-topic-info { flex: 1; }
.weak-topic-text { font-weight: 600; color: #131010; }
.weak-topic-name { font-weight: 700; color: #131010; }
.weak-topic-hint { font-size: 0.85em; color: #666; margin-top: 2px; }
.weak-topic-score { font-weight: 700; color: #d50000; font-size: 1.1em; }

/* ==================== RECOMMENDATIONS ==================== */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 4px 4px 0px #131010;
}

.recommendation-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px #131010; }

.rec-icon { font-size: 28px; flex-shrink: 0; }
.rec-info { flex: 1; }
.rec-text { font-weight: 500; color: #131010; line-height: 1.4; }

.rec-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FF9F00;
    font-weight: 700;
    font-size: 0.85em;
    white-space: nowrap;
}

/* ==================== GITHUB-STYLE HEATMAP ==================== */
.heatmap-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 6px 6px 0px #131010;
}

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

.heatmap-title { font-weight: 700; color: #131010; font-size: 1em; }
.heatmap-total { font-weight: 700; color: #FF9F00; font-size: 0.95em; }

.heatmap-weekdays {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 6px;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    padding-right: 8px;
}

.heatmap-weekdays span {
    font-size: 0.7em;
    font-weight: 600;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    line-height: 1;
}

.heatmap-grid-wrapper {
    position: relative;
    padding-left: 32px;
}

.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
}

.heatmap-dot-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    background: #ebedf0;
    transition: all 0.2s ease;
    cursor: default;
    max-width: 28px;
    max-height: 28px;
    min-width: 12px;
    min-height: 12px;
}

.heatmap-dot-cell:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.heatmap-dot-cell.empty { background: #ebedf0; }
.heatmap-dot-cell.low { background: #FFE0A3; }
.heatmap-dot-cell.medium { background: #FF9F00; }
.heatmap-dot-cell.high { background: #E87000; }
.heatmap-dot-cell.today { box-shadow: 0 0 0 3px #FF4E99; }

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
}

.heatmap-legend-label {
    font-size: 0.75em;
    color: #999;
    font-weight: 600;
}

.heatmap-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.heatmap-dot.empty { background: #ebedf0; }
.heatmap-dot.low { background: #FFE0A3; }
.heatmap-dot.medium { background: #FF9F00; }
.heatmap-dot.high { background: #E87000; }

/* ==================== SKILL OVERVIEW ==================== */
.skill-overview-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 6px 6px 0px #131010;
}

.skill-overview-header {
    margin-bottom: 20px;
}

.skill-overview-title { font-weight: 700; color: #131010; font-size: 1em; }

.skill-bars-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-bars-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 0.9em;
}

.skill-bar-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.skill-bar-lang {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: 800;
    flex-shrink: 0;
    border: 2px solid #131010;
}

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

.skill-bar-name {
    font-weight: 700;
    font-size: 0.85em;
    color: #131010;
    margin-bottom: 6px;
}

.skill-bar-track {
    height: 14px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #131010;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-bar-percent {
    font-weight: 800;
    font-size: 1em;
    color: #131010;
    min-width: 42px;
    text-align: right;
}

/* ==================== WEAK TOPICS — COLORED BY COURSE ==================== */
.weak-topic-score-bar {
    height: 6px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.weak-topic-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

/* ==================== AI WIDGET ==================== */
.ai-widget {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 8px 8px 0px #131010;
    margin-bottom: 20px;
}

.ai-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    background: #131010;
    color: #fff;
}

.ai-widget-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #FF9F00;
}

.ai-widget-avatar img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.ai-widget-info { flex: 1; }
.ai-widget-name { font-weight: 700; font-size: 1.05em; }
.ai-widget-status { font-size: 0.8em; color: #C6DF2B; display: flex; align-items: center; gap: 6px; }

.ai-status-dot {
    width: 8px;
    height: 8px;
    background: #C6DF2B;
    border-radius: 50%;
    display: inline-block;
    animation: aiDotPulse 2s ease-in-out infinite;
}

@keyframes aiDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ai-widget-expand {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ai-widget-expand:hover { background: #FF9F00; color: #131010; }

.ai-widget-quick {
    padding: 16px 22px;
    border-bottom: 2px solid #f0f0f0;
}

.ai-widget-quick-title {
    font-size: 0.8em;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.ai-widget-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-chip {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    font-family: 'Rubik', sans-serif;
    font-size: 0.82em;
    font-weight: 600;
    color: #131010;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ai-chip:hover {
    border-color: #FF9F00;
    background: #FFF5E6;
    transform: translateY(-2px);
}

.ai-widget-chat {
    padding: 18px 22px;
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.ai-widget-chat::-webkit-scrollbar { width: 4px; }
.ai-widget-chat::-webkit-scrollbar-track { background: transparent; }
.ai-widget-chat::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.ai-widget-welcome {
    background: #f5f5f5;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ai-widget-welcome span {
    font-size: 1.4em;
    flex-shrink: 0;
}

.ai-widget-msg {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.9em;
    line-height: 1.5;
    max-width: 90%;
    animation: aiMsgAppear 0.3s ease-out;
}

@keyframes aiMsgAppear {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-widget-msg.user {
    background: #FF9F00;
    color: #131010;
    font-weight: 600;
    align-self: flex-end;
    border-radius: 18px 18px 4px 18px;
}

.ai-widget-msg.bot {
    background: #f5f5f5;
    color: #131010;
    align-self: flex-start;
    border-radius: 18px 18px 18px 4px;
}

.ai-widget-typing {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: #f5f5f5;
    border-radius: 18px;
    align-self: flex-start;
    width: fit-content;
}

.ai-widget-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: aiTypingBounce 1.4s ease-in-out infinite;
}

.ai-widget-typing span:nth-child(1) { animation-delay: 0s; }
.ai-widget-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-widget-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiTypingBounce {
    0%, 80%, 100% { transform: scale(1); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

.ai-widget-input-row {
    display: flex;
    gap: 10px;
    padding: 16px 22px;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
}

.ai-widget-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    font-family: 'Rubik', sans-serif;
    font-size: 0.9em;
    background: #fff;
    color: #131010;
    transition: border-color 0.2s;
}

.ai-widget-input:focus {
    outline: none;
    border-color: #FF9F00;
}

.ai-widget-input::placeholder { color: #bbb; }

.ai-widget-send {
    width: 48px;
    height: 48px;
    background: #FF9F00;
    border: 3px solid #131010;
    border-radius: 14px;
    color: #131010;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 3px 3px 0px #131010;
    flex-shrink: 0;
}

.ai-widget-send:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #131010;
    background: #C6DF2B;
}

/* ==================== DASHBOARD DONUT CHARTS ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: #fff;
    border: 3px solid #131010;
    border-radius: 25px;
    padding: 22px;
    box-shadow: 6px 6px 0px #131010;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #131010;
}

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

.dashboard-card-header h3 {
    font-size: 0.95em;
    font-weight: 700;
    color: #131010;
    margin: 0;
}

.dashboard-refresh {
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    border: 2px solid #131010;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
}

.dashboard-refresh:hover {
    background: #FF9F00;
    color: #131010;
    transform: rotate(180deg);
}

/* Donut Chart */
.donut-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-segment {
    transition: all 0.3s ease;
    animation: fadeInDonut 0.8s ease-out backwards;
}

@keyframes fadeInDonut {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.donut-segment:nth-child(1) { animation-delay: 0.1s; }
.donut-segment:nth-child(2) { animation-delay: 0.2s; }
.donut-segment:nth-child(3) { animation-delay: 0.3s; }
.donut-segment:nth-child(4) { animation-delay: 0.4s; }

.donut-segment:hover {
    stroke-width: 17;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s backwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.donut-total {
    font-size: 2em;
    font-weight: 900;
    color: #131010;
    line-height: 1;
}

.donut-label {
    font-size: 0.75em;
    color: #666;
    font-weight: 600;
    margin-top: 4px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f5f5f5;
    border-radius: 10px;
    font-size: 0.8em;
    animation: slideInUp 0.4s ease-out backwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-stat-item:nth-child(1) { animation-delay: 0.6s; }
.dashboard-stat-item:nth-child(2) { animation-delay: 0.7s; }
.dashboard-stat-item:nth-child(3) { animation-delay: 0.8s; }
.dashboard-stat-item:nth-child(4) { animation-delay: 0.9s; }

.stat-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #131010;
}

.dashboard-stat-item span:nth-child(2) {
    flex: 1;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-weight: 800;
    color: #131010;
    font-size: 1em;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
    .streak-layout {
        grid-template-columns: 1fr;
    }

    .streak-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .streak-page {
        max-width: 650px;
        padding: 20px;
        padding-top: 160px;
    }
}

@media (max-width: 768px) {
    .streak-page { padding-top: 100px; }
}

@media (max-width: 500px) {
    .streak-page { padding: 15px; padding-top: 80px; padding-bottom: 40px; }
    .streak-hero-card { padding: 30px 18px 25px; }
    .streak-main-number { font-size: 56px; }
    .streak-fire-icon { font-size: 50px; }
    .streak-stat-value { font-size: 20px; }
    .cal-day { border-radius: 10px; }
    .cal-day.active::after { font-size: 16px; }
    .flying-square { opacity: 0.08 !important; }
    .compare-cards { grid-template-columns: 1fr; }
    .compare-current { font-size: 1.5em; }
    .activity-graph-bars { height: 60px; gap: 2px; }
    .time-stat-value { font-size: 1.5em; }
    .streak-course-card { flex-wrap: wrap; }
    .streak-course-bar-wrapper { flex-basis: 100%; }
    .ai-widget-chips { gap: 6px; }
    .ai-chip { padding: 6px 12px; font-size: 0.78em; }
    .calendar-card, .activity-graph-card, .compare-card, .time-stat-card,
    .streak-course-card, .weak-topic-card, .recommendation-card, .ai-widget,
    .dashboard-card {
        box-shadow: 4px 4px 0px #131010;
    }
    .streak-hero-card { box-shadow: 4px 4px 0px #131010; }
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .donut-wrapper {
        width: 160px;
        height: 160px;
    }
    .donut-total {
        font-size: 2em;
    }
}
