        @media (max-width: 1400px) {
            .container { flex-direction: column; }
            .sidebar-container { width: 100%; flex-direction: row; flex-wrap: wrap; }
            .sidebar-section { flex: 1; min-width: 300px; }
            .news-container { height: 400px; }
            .modal-content { width: 95%; margin: 2% auto; }
            .task-header, .task-cell { width: 40px !important; min-width: 40px !important; max-width: 40px !important; padding: 6px 1px !important; font-size: 10px; }
            .results-table th.fixed-left, .results-table td.fixed-left { width: 45px !important; min-width: 45px !important; max-width: 45px !important; }
            .results-table th.fixed-left-2, .results-table td.fixed-left-2 { left: 45px; width: 150px !important; min-width: 150px !important; max-width: 150px !important; }
        }
        @media (max-width: 768px) {
            .sidebar-section { min-width: 100%; }
            .tabs { flex-direction: column; }
            .tab { text-align: center; justify-content: center; width: 100%; }
            .codeforces-tab { margin-left: 0 !important; }
            .theme-toggle { top: 10px; right: 10px; padding: 8px 16px; font-size: 12px; }
            .auth-btn { top: 10px; right: 130px; padding: 8px 16px; font-size: 12px; }
        }
        @media (max-width: 600px) {
            #tasksGrid { 
                grid-template-columns: 1fr !important; 
                gap: 15px; 
                padding: 10px;
            }
            .task-card-vertical {
                max-width: 100% !important;
                min-width: 0 !important;
                box-sizing: border-box;
                word-wrap: break-word;
                overflow-wrap: break-word;
            }
            .task-card-vertical .contest-link {
                white-space: normal;
                word-break: break-word;
                padding: 8px 12px;
                font-size: 13px;
            }
            .task-card-vertical h3 span {
                word-break: break-word;
                white-space: normal;
            }
            .tasks-filter-bar .filter-row {
                flex-direction: column;
                gap: 10px;
            }
            .filter-group {
                flex-wrap: wrap;
            }
        }
        .achievements-section { margin: 20px 0; padding: 15px; background: #f8f9fa; border-radius: 4px; }
        .achievement-winner { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #fff8e7; color: #b85c00; border-left: 3px solid #ffd700; }
        .achievement-prize { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #f5f5f5; color: #666; border-left: 3px solid #c0c0c0; }
        .achievement-participant { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #faf5e8; color: #8b6b3d; border-left: 3px solid #cd7f32; }
        body.dark-mode { background-color: #121212; color: #e0e0e0; }
        body.dark-mode .tabs { background: #1e1e1e; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        body.dark-mode .tab { color: #ccc; }
        body.dark-mode .tab:hover { background: #333; }
        body.dark-mode .tab.active { background: #3b5998; color: white; }
        body.dark-mode .main-content { background: #1e1e1e; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        body.dark-mode .contest-item { border-bottom-color: #333; }
        body.dark-mode .contest-item:hover { background-color: #2a2a2a; }
        body.dark-mode .sidebar-section { background: #1e1e1e; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        body.dark-mode .rating-item { border-bottom-color: #333; }
        body.dark-mode .rating-item:hover { background: #2a2a2a; }
        body.dark-mode .upcoming-item { background: #2a2a2a; border-color: #444; color: #ddd; }
        body.dark-mode .upcoming-item:hover { background: #333; }
        body.dark-mode .upcoming-name { color: #e0e0e0; }
        body.dark-mode .upcoming-date { color: #aaa; }
        body.dark-mode .search-box { background: #1e1e1e; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        body.dark-mode .search-input { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
        body.dark-mode .tag-filter-toggle { background: #2a2a2a; border-color: #444; color: #ccc; }
        body.dark-mode .tag-dropdown { background: #2a2a2a; border-color: #444; }
        body.dark-mode .selected-tags-container { background: #2a2a2a; border-color: #444; }
        body.dark-mode .modal-content { background: #1e1e1e; }
        body.dark-mode .results-table th, body.dark-mode .results-table td { border-color: #444; }
        body.dark-mode .results-table tr:nth-child(even) { background: #2a2a2a; }
        body.dark-mode .results-table tr:hover { background: #333; }
        body.dark-mode .stats-summary { background: #2a2a2a; }
        body.dark-mode .stat-box { background: #1e1e1e; color: #e0e0e0; }
        body.dark-mode .monitor-container { border-color: #444; }
        body.dark-mode .division-selector { background: #2a2a2a; }
        body.dark-mode .contact-info { background: #1e1e1e; color: #aaa; }
        body.dark-mode .contact-info a { color: #66b0ff; }
        body.dark-mode .news-content { background: #2a2a2a; }
        body.dark-mode .task-cell.pending { background: #3a2a1a; color: #ffb74d; }
        body.dark-mode .task-cell.solved { background: #1b3b1b; color: #81c784; }
        body.dark-mode .task-cell.attempted { background: #3b1b1b; color: #e57373; }
        body.dark-mode .fixed-left, body.dark-mode .fixed-left-2 { background: #1e1e1e !important; }
        body.dark-mode .results-table tr:nth-child(even) .fixed-left, body.dark-mode .results-table tr:nth-child(even) .fixed-left-2 { background: #2a2a2a !important; }
        body.dark-mode .results-table tr:hover .fixed-left, body.dark-mode .results-table tr:hover .fixed-left-2 { background: #333 !important; }
        body.dark-mode .results-table th.fixed-left, body.dark-mode .results-table th.fixed-left-2 { background: #2a2a2a !important; }
        body.dark-mode .contest-info { color: #aaa; }
        body.dark-mode .contest-stats { color: #aaa; }
        body.dark-mode .rating-details { color: #aaa; }
        body.dark-mode .rating-rank { color: #aaa; }
        body.dark-mode .rating-name { color: #e0e0e0; }
        body.dark-mode .tag-btn { background: #333; color: #ccc; border-color: #555; }
        body.dark-mode .tag-btn.contest { background: #1b3b1b; color: #81c784; border-color: #2e7d32; }
        body.dark-mode .tag-btn.training { background: #2a1a2a; color: #ce93d8; border-color: #7b1fa2; }
        body.dark-mode .tag-btn.team { background: #3a2a1a; color: #ffb74d; border-color: #ff6f00; }
        body.dark-mode .tag-btn.math { background: #1a1a3a; color: #9fa8da; border-color: #303f9f; }
        body.dark-mode .tag-btn.news { background: #1a2a3a; color: #90caf9; border-color: #1565c0; }
        body.dark-mode .tag-category .category-title { color: #aaa; }
        body.dark-mode .selected-tag { background: #2a2a2a; border-color: #555; color: #e0e0e0; }
        body.dark-mode .clear-all-tags { color: #ff6b6b; }
        body.dark-mode .rating-graph-btn { border-color: #555; color: #ccc; }
        body.dark-mode .rating-graph-btn:hover { background: #333; }
        body.dark-mode .contest-link { background: #2a2a2a; color: #66b0ff; border-color: #444; }
        body.dark-mode .contest-link.green { background: #1b3b1b; color: #81c784; border-color: #2e7d32; }
        body.dark-mode .no-upcoming-contests { color: #888; }
        body.dark-mode .achievements-section { background: #2a2a2a; }
        body.dark-mode .achievement-winner { background: #332a1a; color: #ffcc80; }
        body.dark-mode .achievement-prize { background: #2a2a2a; color: #ccc; }
        body.dark-mode .achievement-participant { background: #2a2a2a; color: #d4a373; }
        body.dark-mode .monitor-tab { background: #2a2a2a; border-color: #444; color: #ccc; }
        body.dark-mode .monitor-tab.active { background: #3b5998; color: white; }
        body.dark-mode .stats-summary .stat-value { color: #66b0ff; }
        body.dark-mode .results-table th { background: #2a2a2a; color: #e0e0e0; border-color: #555; }
        body.dark-mode .task-header { background: #2a2a2a; color: #e0e0e0; border-color: #555; }
        body.dark-mode .user-stat-card { background: #2a2a2a !important; color: #e0e0e0 !important; }
        body.dark-mode .details-button-wrapper { background: #2a2a2a !important; border-color: #444 !important; }
        body.dark-mode .monitor-no-data { background: #1e1e1e !important; color: #ccc !important; border-color: #444 !important; }
        body.dark-mode .monitor-error { background: #1e1e1e !important; color: #ccc !important; }
        body.dark-mode #mathContainer h3, body.dark-mode #newsContainer h3 { color: #e0e0e0 !important; }
        body.dark-mode #mathModal .news-content h3, body.dark-mode #newsModal .news-content h3, body.dark-mode .news-content h3 { color: #e0e0e0 !important; }
        body.dark-mode #mathModal .news-content, body.dark-mode #newsModal .news-content { background: #2a2a2a !important; color: #e0e0e0 !important; }
        body.dark-mode .math-materials, body.dark-mode .news-attachments { background: #2a2a2a !important; border: 1px solid #444 !important; }
        body.dark-mode .math-materials h3, body.dark-mode .math-materials strong, body.dark-mode .news-attachments h3, body.dark-mode .news-attachments strong { color: #e0e0e0 !important; }
        body.dark-mode .news-content, body.dark-mode .news-content p, body.dark-mode .news-content li, body.dark-mode .news-content strong, body.dark-mode .news-content b { color: #e0e0e0 !important; }
        body.dark-mode .task-card-vertical { background: #1e1e1e !important; box-shadow: 0 2px 10px rgba(0,0,0,0.5) !important; }
        body.dark-mode .task-card-vertical h3 a { color: #66b0ff !important; }
        body.dark-mode .task-card-vertical .tag { background: #1a3a5c !important; color: #90caf9 !important; }
        body.dark-mode .tasks-filter-panel { border-bottom-color: #444 !important; background: #1e1e1e !important; }
        body.dark-mode #taskTagDropdown { background: #1e1e1e !important; border-color: #444 !important; }
        body.dark-mode #taskRatingMin, body.dark-mode #taskRatingMax { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
        body.dark-mode #taskTagFilterToggle { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
        body.dark-mode .active-filter { background: #2a2a2a !important; color: #e0e0e0 !important; }
        body.dark-mode .calendar-event-title { color: #e0e0e0; }
        body.dark-mode .calendar-weekdays { color: #ccc; }
        .math-materials, .news-attachments { background: #f8f9fa; border-radius: 8px; }
        .theme-toggle { position: fixed; top: 20px; right: 20px; background: #1e1e1e; color: white; border: none; border-radius: 4px; padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: bold; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 1100; transition: 0.2s; }
        .theme-toggle:hover { transform: scale(1.02); }
        body.dark-mode .theme-toggle { background: #f0f0f0; color: #1e1e1e; }
        .auth-btn { position: fixed; top: 20px; right: 160px; background: #3b5998; color: white; border: none; border-radius: 4px; padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: bold; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 1100; transition: 0.2s; }
        .auth-btn:hover { transform: scale(1.02); }
        body.dark-mode .auth-btn { background: #1e1e1e; color: #e0e0e0; border: 1px solid #444; }
        .codeforces-tab { display: flex; align-items: center; justify-content: center; gap: 8px; margin-left: 0; }
        @media (min-width: 769px) { .codeforces-tab { margin-left: auto; } }
        .activity-calendar { font-family: inherit !important; }
        .activity-calendar h3 { font-size: 18px !important; font-weight: bold !important; }
        .activity-calendar .stat-value { font-size: 20px !important; }
        .activity-calendar .stat-label { font-size: 12px !important; }
        input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
        input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
        .activity-calendar .calendar-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 auto; padding-bottom: 8px; display: flex; justify-content: center; }
        .activity-calendar .weekdays-column { color: #666; }
        body.dark-mode .activity-calendar .weekdays-column { color: #aaa; }
        body.dark-mode .activity-calendar .day-cell { background: #3a2a1a; border-color: #5a4a3a; }
        .results-table.achievements-table th.col-wide, .results-table.achievements-table td.col-wide { width: auto; min-width: 120px; }
        .results-table.achievements-table th.col-narrow, .results-table.achievements-table td.col-narrow { width: 100px; min-width: 100px; max-width: 100px; text-align: center; }
        .results-table.achievements-table th.col-rating, .results-table.achievements-table td.col-rating { width: 100px; min-width: 100px; max-width: 100px; text-align: center; }
        .results-table.contests-table th.col-wide, .results-table.contests-table td.col-wide { width: auto; min-width: 90px; }
        .results-table.contests-table th.col-narrow, .results-table.contests-table td.col-narrow { width: 100px; min-width: 100px; max-width: 100px; text-align: center; }
        .results-table.contests-table th.col-rating, .results-table.contests-table td.col-rating { width: 100px; min-width: 100px; max-width: 100px; text-align: center; }
        .results-table th { text-align: center; vertical-align: middle; }
        .personal-info-table th { background: #f0f0f0; }
        body.dark-mode .personal-info-table th { background: #2a2a2a !important; color: #e0e0e0 !important; border-bottom-color: #444 !important; }
        body.dark-mode .personal-info-table td { border-bottom-color: #444 !important; color: #e0e0e0 !important; }
