        .activity-calendar {
            --activity-cell-size: 14px;
            --activity-cell-gap: 4px;
        }

        .activity-calendar .calendar-grid {
            display: inline-flex;
            flex-direction: row;
            align-items: flex-start;
            gap: var(--activity-cell-gap);
            background: inherit;
            padding: 2px;
        }

        .activity-calendar .weekdays-column {
            display: flex;
            flex-direction: column;
            margin-right: 8px;
            font-size: 10px;
            flex-shrink: 0;
        }

        .activity-calendar .weekdays-column div,
        .activity-calendar .day-cell {
            width: var(--activity-cell-size);
            height: var(--activity-cell-size);
            line-height: var(--activity-cell-size);
            margin-bottom: var(--activity-cell-gap);
        }

        .activity-calendar .weeks-container {
            display: flex;
            gap: var(--activity-cell-gap);
            background: inherit;
            padding: 2px;
            flex-wrap: nowrap;
        }

        .activity-calendar .week-column {
            display: flex;
            flex-direction: column;
            gap: var(--activity-cell-gap);
        }

        .activity-calendar .day-cell {
            background: #ffffff;
            border: 1px solid #d0d0d0;
            border-radius: 2px;
            box-sizing: border-box;
            margin-bottom: 0;
        }

        .profile-badges {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 10px;
            margin: 12px 0 20px;
        }

        .profile-badge {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 12px;
            background: #f8f9fa;
            border: 1px solid #e8e8e8;
        }

        .profile-badge i {
            font-size: 20px;
            color: #3b5998;
        }

        .profile-badge strong {
            display: block;
            font-size: 14px;
            color: #333;
        }

        .profile-badge span {
            display: block;
            margin-top: 2px;
            font-size: 12px;
            color: #777;
        }

        .profile-badge.badge-winner { background: #fff8e1; border-color: #ffd54f; }
        .profile-badge.badge-winner i { color: #f9a825; }
        .profile-badge.badge-prize { background: #f5f5f5; border-color: #cfcfcf; }
        .profile-badge.badge-prize i { color: #757575; }
        .profile-badge.badge-participant { background: #fff3e0; border-color: #ffcc80; }
        .profile-badge.badge-participant i { color: #ef6c00; }
        .profile-badge.month { background: #e8f5e9; border-color: #a5d6a7; }
        .profile-badge.month i { color: #2e7d32; }
        body.dark-mode .profile-badge { background: #242424; border-color: #444; }
        body.dark-mode .profile-badge strong { color: #e0e0e0; }
        body.dark-mode .profile-badge span { color: #aaa; }

        @media (max-width: 768px) {
            #modalContent { padding: 10px !important; }
            #modalContent h2 { font-size: 18px !important; margin-bottom: 15px !important; }
            #modalContent > div[style*="display:grid"] { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; margin: 15px 0 !important; }
            #modalContent .stat-box { padding: 8px !important; }
            #modalContent .stat-box .stat-value { font-size: 18px !important; }
            #modalContent .stat-box .stat-label { font-size: 11px !important; }
            #modalContent h3 { font-size: 15px !important; margin-top: 15px !important; margin-bottom: 10px !important; }
            #modalContent .contest-link { padding: 8px 12px !important; font-size: 12px !important; }
            #modalContent > div[style*="display:flex"][style*="gap:10px"] { flex-wrap: wrap !important; gap: 8px !important; }
            #modalContent > div[style*="display:flex"] .contest-link { flex: 1 1 calc(50% - 4px) !important; justify-content: center !important; }
            .activity-calendar { padding: 15px 10px !important; margin: 15px 0 !important; border-radius: 8px !important; }
            .activity-calendar h3 { font-size: 14px !important; margin-bottom: 10px !important; }
            .activity-calendar { --activity-cell-size: 12px; --activity-cell-gap: 4px; }
            .activity-calendar .weekdays-column { font-size: 9px !important; margin-right: 5px !important; }
            #modalContent div[style*="max-height:300px"] { max-height: 250px !important; margin: 0 -10px !important; padding: 0 10px !important; overflow-x: auto !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; }
            #modalContent .results-table { font-size: 11px !important; min-width: 600px !important; }
            #modalContent .results-table th, #modalContent .results-table td { padding: 6px 3px !important; }
            .swipe-hint { display: block !important; text-align: center; font-size: 11px; color: #999; margin-top: 5px; padding: 5px; }
            body.dark-mode .swipe-hint { color: #888; }
        }
        @media (max-width: 480px) {
            #modalContent .stat-box .stat-value { font-size: 16px !important; }
            #modalContent .stat-box .stat-label { font-size: 10px !important; }
            .activity-calendar { --activity-cell-size: 11px; --activity-cell-gap: 4px; }
            #modalContent .contest-link { flex: 1 1 100% !important; }
        }
        .swipe-hint { display: none; }
        .swipe-hint i { margin-right: 5px; }
        .activity-calendar .calendar-scroll-wrapper { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 auto; padding-bottom: 8px; display: flex; justify-content: flex-start; scroll-behavior: smooth; cursor: grab; }
        .activity-calendar .calendar-scroll-wrapper:active { cursor: grabbing; }
        .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar { height: 4px; }
        .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 2px; }
        .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 2px; }
        body.dark-mode .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-track { background: #2a2a2a; }
        body.dark-mode .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-thumb { background: #555; }
        body.dark-mode .selected-tags-header { color: #ffffff !important; }
        body.dark-mode .selected-tags-header span { color: #ffffff !important; }
        body.dark-mode .contest-item[data-type="calendar"] { background: #1e1e1e !important; }
        .close-btn { padding: 10px 20px; background: #3b5998; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin-top: 20px; }
        .close-btn:hover { background: #2d4373; }
        body.dark-mode .close-btn { background: #5a7ab8; }
        body.dark-mode .close-btn:hover { background: #4a6a9a; }
        .division-card { padding: 15px 10px; border-radius: 8px; text-align: center; color: white; }
