/* ========================================
   렛츠코딩 - Python Algorithm Platform
   Retro Terminal / Neon Aesthetic
   ======================================== */

/* 폰트는 base.html에서 <link preconnect> 방식으로 로드 (렌더 차단 방지) */

:root {
    /* Core Colors */
    --bg-primary: #0f1420;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-elevated: #232a3b;

    /* Accents */
    --neon-cyan: #3b82f6;
    --neon-green: #4ade80;
    --neon-pink: #ff00ff;
    --neon-yellow: #ffd700;
    --neon-orange: #ff6b35;

    /* Cyan Opacity Scale (59,130,246) */
    --cyan-01: rgba(59, 130, 246, 0.01);
    --cyan-03: rgba(59, 130, 246, 0.03);
    --cyan-05: rgba(59, 130, 246, 0.05);
    --cyan-06: rgba(59, 130, 246, 0.06);
    --cyan-08: rgba(59, 130, 246, 0.08);
    --cyan-10: rgba(59, 130, 246, 0.1);
    --cyan-12: rgba(59, 130, 246, 0.12);
    --cyan-15: rgba(59, 130, 246, 0.15);
    --cyan-20: rgba(59, 130, 246, 0.2);
    --cyan-25: rgba(59, 130, 246, 0.25);
    --cyan-30: rgba(59, 130, 246, 0.3);
    --cyan-40: rgba(59, 130, 246, 0.4);
    --cyan-50: rgba(59, 130, 246, 0.5);
    --cyan-70: rgba(59, 130, 246, 0.7);
    --cyan-80: rgba(59, 130, 246, 0.8);
    --cyan-85: rgba(59, 130, 246, 0.85);

    /* Pink Opacity Scale (255,0,255) */
    --pink-02: rgba(255, 0, 255, 0.02);
    --pink-08: rgba(255, 0, 255, 0.08);
    --pink-12: rgba(255, 0, 255, 0.12);
    --pink-15: rgba(255, 0, 255, 0.15);
    --pink-20: rgba(255, 0, 255, 0.2);
    --pink-25: rgba(255, 0, 255, 0.25);
    --pink-30: rgba(255, 0, 255, 0.3);
    --pink-40: rgba(255, 0, 255, 0.4);
    --pink-50: rgba(255, 0, 255, 0.5);

    /* Red/Error Opacity Scale (239,68,68) */
    --red-05: rgba(239, 68, 68, 0.05);
    --red-10: rgba(239, 68, 68, 0.1);
    --red-12: rgba(239, 68, 68, 0.12);
    --red-15: rgba(239, 68, 68, 0.15);
    --red-20: rgba(239, 68, 68, 0.2);
    --red-30: rgba(239, 68, 68, 0.3);
    --red-40: rgba(239, 68, 68, 0.4);
    --red-50: rgba(239, 68, 68, 0.5);
    --red-60: rgba(239, 68, 68, 0.6);
    --red-80: rgba(239, 68, 68, 0.8);

    /* Green/Success Opacity Scale (16,185,129) */
    --green-05: rgba(16, 185, 129, 0.05);
    --green-10: rgba(16, 185, 129, 0.1);
    --green-15: rgba(16, 185, 129, 0.15);
    --green-20: rgba(16, 185, 129, 0.2);
    --green-30: rgba(16, 185, 129, 0.3);
    --green-40: rgba(16, 185, 129, 0.4);
    --green-50: rgba(16, 185, 129, 0.5);
    --green-60: rgba(16, 185, 129, 0.6);

    /* Text Colors */
    --text-primary: #e4e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Status Colors */
    --success: #10b981;
    --success-glow: var(--green-40);
    --error: #ef4444;
    --error-glow: var(--red-40);
    --warning: #f59e0b;

    /* Shadows & Glows */
    --glow-cyan: 0 0 20px var(--cyan-30), 0 0 40px var(--cyan-10);
    --glow-green: 0 0 20px rgba(57, 255, 20, 0.3), 0 0 40px rgba(57, 255, 20, 0.1);
    --glow-pink: 0 0 20px var(--pink-30);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

    /* Typography - 영문 폰트에 한글 fallback 추가 */
    --font-display: 'Orbitron', 'Noto Sans KR', sans-serif;
    --font-mono: 'JetBrains Mono', 'Noto Sans KR', monospace;
    --font-body: 'Noto Sans KR', sans-serif;
    --font-sans: 'Noto Sans KR', sans-serif;

    /* Spacing */
    --header-height: 80px;
    --footer-height: 50px;
}

/* ========================================
   COMMON STYLES - 공통 스타일 가이드
   ======================================== */

/* ----- 제목 스타일 1: 섹션 타이틀 (예: 클래스 목록, 선생님 목록) ----- */
.title-style-1 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin: 0;
    letter-spacing: 0.5px;
}

/* ----- 제목 스타일 2: 클래스/항목 이름 (예: // 2025 겨울방학특강) ----- */
.title-style-2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.title-style-2::before {
    content: '// ';
    color: var(--text-muted);
}

/* ----- 그리드 스타일 1: 3열 카드 그리드 (반응형) ----- */
.grid-style-1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid-style-1 .section-header {
    grid-column: 1 / -1;
}

/* ========================================
   END COMMON STYLES
   ======================================== */

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

/* 코드 영역 리가처 비활성화 (>=, *** 등이 합쳐지는 현상 방지) */
pre, code, .CodeMirror, textarea {
    font-variant-ligatures: none !important;
    -webkit-font-variant-ligatures: none !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-width: 1200px;
    position: relative;
    overflow-x: auto;
}

/* Scanline/Grid effects removed */

/* ========================================
   MAIN CONTAINER & HEADER
   ======================================== */
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    min-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: linear-gradient(180deg, rgba(15, 20, 32, 0.98) 0%, rgba(15, 20, 32, 0.95) 100%);
    border-bottom: 1px solid #1d222d;
    backdrop-filter: blur(12px);
    z-index: 100;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--neon-cyan) 20%,
        var(--neon-pink) 50%,
        var(--neon-cyan) 80%,
        transparent 100%);
    opacity: 0.8;
}

/* header::after glow removed — border-bottom handles it */

header h1 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding-top: 1px;
}

header h1#titleLink {
    cursor: pointer;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* GNB 네비게이션 */
.gnb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.gnb-nav-link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
    padding: 0 12px;
    display: flex;
    align-items: center;
    height: var(--header-height);
    position: relative;
    transition: color 0.2s ease;
}

.gnb-nav-link:hover {
    color: var(--text-primary);
}

.gnb-nav-link.active {
    color: #fff;
}

.gnb-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--neon-cyan);
}


/* ========================================
   FOOTER - 하단 고정
   ======================================== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    min-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background: var(--bg-primary);
    border-top: 1px solid var(--cyan-10);
    z-index: 100;
}

footer .footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

footer .footer-legal {
    font-size: 0.75rem;
    font-weight: 100;
    color: var(--text-secondary);
    text-decoration: none;
}

footer .footer-legal:hover {
    text-decoration: underline;
}

footer .footer-business {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

footer .footer-copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

footer .footer-copyright:hover .footer-copyright-text {
    text-decoration: underline;
}

/* 푸터 팁 영역 */
.footer-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 100;
    color: var(--text-secondary);
}

.footer-tip .tip-icon {
    font-size: 1rem;
}

.footer-tip .tip-text {
    line-height: 1.5;
}

/* 사용자 정보 영역 - 컴팩트 스타일 */
.user-info-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-class-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 2px 8px;
    background: var(--cyan-08);
    border-radius: 4px;
}

.user-class-badge:empty {
    display: none;
}

a.user-class-badge-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

a.user-class-badge-link:hover {
    color: #fff;
    background: var(--cyan-20);
}

.user-name-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-action-btn {
    display: flex;
    justify-content: center;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    padding-top: 4px;
}

.user-action-btn:hover {
    color: var(--neon-cyan);
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: #4ade80;
    padding-left: 8px;
    cursor: default;
}

.score-badge::before {
    content: '\26A1';
    font-size: 0.85rem;
}

.score-badge:empty {
    display: none;
}

.score-badge:empty::before {
    display: none;
}

.subscription-days-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    color: #e6edf3;
    padding-left: 8px;
    height: 20px;
    overflow: hidden;
}

.subscription-days-badge::before {
    content: '\1F4C5';
    font-size: 0.85rem;
    flex-shrink: 0;
}

.subscription-days-badge:empty {
    display: none;
}

.subscription-days-badge:empty::before {
    display: none;
}

.subscription-days-badge.sub-warning {
    color: #ffa500;
}

.subscription-days-badge.sub-critical {
    color: #ff4444;
}

.memo-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neon-purple);
    padding-left: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.memo-badge::before {
    content: '\1F4DD';
    font-size: 0.85rem;
}

.memo-badge:hover {
    opacity: 0.7;
}

.memo-badge:empty {
    display: none;
}

.memo-badge:empty::before {
    display: none;
}

/* ===== 온라인 학생 [연장] 버튼 ===== */

.extend-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

.extend-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

/* ===== 이용권 연장 슬라이드 패널 ===== */

.extend-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 2000;
}

.extend-overlay.open {
    opacity: 1;
    visibility: visible;
}

.extend-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 90vw;
    height: 100%;
    background: #0d1117;
    border-left: 1px solid #21262d;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.extend-panel.open {
    transform: translateX(0);
}

.extend-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 24px;
    border-bottom: 1px solid #21262d;
}

.extend-panel-header h3 {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e6edf3;
    margin: 0;
}

.extend-panel-body {
    padding: 24px;
    flex: 1;
}

.extend-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.extend-option {
    position: relative;
    display: block;
    padding: 14px 14px 14px 38px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.extend-option:hover {
    border-color: #484f58;
}

.extend-option:has(input:checked) {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.06);
}

.extend-option input[type="radio"] {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    accent-color: #58a6ff;
}

.extend-option-content {
    flex: 1;
}

.extend-option-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.extend-option-period {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e6edf3;
}

.extend-option-original {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #484f58;
    text-decoration: line-through;
    margin-right: 6px;
}

.extend-option-price {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #58a6ff;
}

.extend-option-detail {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.75rem;
    color: #8b949e;
    margin-left: 8px;
}

.extend-bonus {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f78166;
}

.extend-badge {
    display: inline-block;
    padding: 1px 7px;
    background: #f78166;
    color: #fff;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.extend-badge.open-sale {
    background: #58a6ff;
    color: #fff;
}

.extend-total {
    padding: 14px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 16px;
}

.extend-total-label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.75rem;
    color: #8b949e;
    margin-bottom: 4px;
}

.extend-total-amount {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #58a6ff;
}

.extend-summary {
    padding: 16px;
    background: var(--cyan-05);
    border: 1px solid var(--cyan-10);
    border-radius: 8px;
    margin-bottom: 16px;
}

.extend-summary-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

.extend-summary-row:last-child {
    color: var(--neon-cyan);
    font-weight: 600;
}

.extend-terms {
    margin-bottom: 16px;
}

.extend-pay-btn {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 14px;
}

.extend-terms-box {
    max-height: 120px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--cyan-15);
    border-radius: 6px;
    background: var(--cyan-03);
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.extend-pay-note {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-pink);
    margin-top: 8px;
    opacity: 0.8;
}

/* 정답 시 번개 애니메이션 */
.score-badge.score-updated {
    animation: scorePopup 0.6s ease-out;
}

@keyframes scorePopup {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.4);
        color: var(--neon-yellow);
        text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
    }
    100% {
        transform: scale(1);
        color: var(--neon-green);
        text-shadow: none;
    }
}

/* Star Display */
.star-display {
    font-size: 1.5rem;
    display: flex;
    gap: 4px;
}

.star-silver {
    color: #a0aec0;
    text-shadow: 0 0 10px rgba(160, 174, 192, 0.5);
}

.star-gold {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
main {
    flex: 1;
    margin-top: var(--header-height);
    padding: 16px 30px 80px 30px;
    overflow-y: auto;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */
@keyframes glitch {
    0%, 100% { clip-path: inset(0 0 0 0); }
    20% { clip-path: inset(10% 0 60% 0); }
    40% { clip-path: inset(40% 0 30% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(25% 0 50% 0); }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid transparent;
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: var(--cyan-30);
    color: #fff;
}

/* ========================================
   HEADER COMPONENTS (헤더 구성요소)
   ======================================== */

/* 역할 배지 - 선생님/학생 모드 */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.role-badge.teacher {
    background: linear-gradient(135deg, var(--pink-15) 0%, var(--pink-08) 100%);
    border: 1px solid var(--pink-40);
    color: var(--neon-pink);
}

.role-badge.teacher:hover {
    background: linear-gradient(135deg, var(--pink-25) 0%, var(--pink-15) 100%);
    box-shadow: 0 0 15px var(--pink-30);
}

.role-badge.student {
    background: linear-gradient(135deg, var(--cyan-15) 0%, var(--cyan-08) 100%);
    border: 1px solid var(--cyan-40);
    color: var(--neon-cyan);
}

/* 헤더 버튼 개선 */
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

a.header-btn {
    text-decoration: none;
    line-height: 36px;
    vertical-align: middle;
}

.header-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--cyan-20);
}

/* 이전/다음 네비게이션 버튼 */
.header-btn.nav-btn {
    gap: 4px;
}

#prevBtn.header-btn.nav-btn {
    padding-left: 10px;
}

#nextBtn.header-btn.nav-btn {
    padding-right: 10px;
}

.header-btn.nav-btn svg {
    flex-shrink: 0;
    vertical-align: middle;
    margin-top: -2px;
    transition: transform 0.2s ease;
}

.header-btn.nav-btn:hover svg {
    transform: translateX(-2px);
}

#nextBtn.header-btn.nav-btn:hover svg {
    transform: translateX(2px);
}

.header-btn-text {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-btn-text:hover {
    color: var(--text-primary);
}

.header-btn.mode-switch {
    background: linear-gradient(135deg, var(--pink-15) 0%, var(--pink-08) 100%);
    border-color: var(--pink-40);
    color: var(--neon-pink);
}

.header-btn.mode-switch:hover {
    background: linear-gradient(135deg, var(--pink-25) 0%, var(--pink-15) 100%);
    box-shadow: 0 0 15px var(--pink-30);
}

/* 헤더 구분선 */
.header-divider {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 0 8px;
}

/* ========================================
   공유 컴포넌트: 체크 아이콘, 즐겨찾기, 필터 버튼
   (problemList, solve, community 공통)
   ======================================== */

/* 풀이 완료 체크 아이콘 */
.problem-check-icon {
    font-size: 1.1rem;
    color: var(--success);
    text-shadow: 0 0 10px var(--success);
    margin: -1px 6px 0 6px;
}

.problem-check-icon.dimmed {
    color: #666;
    text-shadow: none;
}

/* 즐겨찾기 별 버튼 (solve 페이지 헤더) */
.btn-favorite {
    background: none;
    border: none;
    padding: 4px 8px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.btn-favorite::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    flex-shrink: 0;
}

.btn-favorite:hover {
    color: #ffd700;
}

.btn-favorite.active {
    color: #ffd700;
}

.btn-favorite.active::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
}

.btn-favorite .star-empty,
.btn-favorite .star-filled {
    width: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
}

/* btn-favorite.loading → solve.css / problemList.css에서 ••• 점 애니메이션으로 처리 */

/* ========================================
   필터 섹션 (공통: 알고리즘, 모두의 문제)
   ======================================== */
.filter-section {
    margin-bottom: 24px;
    margin-left: -30px;
    margin-right: -30px;
    padding: 0 30px 16px 30px;
    border-bottom: 1px solid #1d222d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.filter-buttons {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.btn-filter {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-filter:hover {
    color: var(--text-primary);
}

.btn-filter.active {
    color: #ffd700;
}

.filter-star,
.filter-icon {
    font-size: 0;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    margin-top: 2px;
}

.filter-star {
    width: 15px;
    height: 15px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
}

.filter-icon {
    width: 14px;
    height: 14px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
}

.btn-filter.active .filter-star {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
}

.btn-filter.active .filter-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
}

/* 커뮤니티 전용 필터 아이콘 (SVG inline) */
.filter-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.filter-icon-svg svg {
    width: 14px;
    height: 14px;
}

.community-only-filter {
    align-items: center;
    gap: 5px;
}

.btn-filter.active .filter-icon-svg {
    color: #ffd700;
}

/* ========================================
   한 줄 파이썬 팁 표시 영역 (공통)
   ======================================== */
.dev-vocabulary-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.dev-vocabulary-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dev-vocabulary-en {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 600;
}

.dev-vocabulary-ko {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

@media (max-width: 768px) {
    .dev-vocabulary-inline {
        display: none;
    }
}

@media (max-width: 640px) {
    .filter-section {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
}

