/* ========================================
   렛츠코딩앤플레이 - Python Algorithm Platform
   Retro Terminal / Neon Aesthetic
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

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

    /* Neon Accents */
    --neon-cyan: #00fff2;
    --neon-green: #39ff14;
    --neon-pink: #ff00ff;
    --neon-yellow: #ffff00;
    --neon-orange: #ff6b35;

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

    /* Status Colors */
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.4);
    --warning: #f59e0b;

    /* Shadows & Glows */
    --glow-cyan: 0 0 20px rgba(0, 255, 242, 0.3), 0 0 40px rgba(0, 255, 242, 0.1);
    --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 rgba(255, 0, 255, 0.3);
    --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;

    /* 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;
}

/* ----- 버튼 스타일 1: 헤더 버튼 (학생모드, 선생님, 로그아웃) ----- */
.btn-style-1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 242, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.1) 0%, rgba(0, 255, 242, 0.05) 100%);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-style-1:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

/* 버튼 스타일 1 변형: 시안 강조 */
.btn-style-1.accent-cyan {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.15) 0%, rgba(0, 255, 242, 0.08) 100%);
    border-color: rgba(0, 255, 242, 0.4);
    color: var(--neon-cyan);
}

.btn-style-1.accent-cyan:hover {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.25) 0%, rgba(0, 255, 242, 0.15) 100%);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.3);
}

/* 버튼 스타일 1 변형: 핑크 강조 */
.btn-style-1.accent-pink {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.15) 0%, rgba(255, 0, 255, 0.08) 100%);
    border-color: rgba(255, 0, 255, 0.4);
    color: var(--neon-pink);
}

.btn-style-1.accent-pink:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.25) 0%, rgba(255, 0, 255, 0.15) 100%);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

/* 버튼 스타일 1 변형: 로그아웃 (빨강) */
.btn-style-1.accent-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.8);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.btn-style-1.accent-danger:hover {
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* ----- 버튼 스타일 2: 액션 버튼 (클래스 추가, 학생 추가) ----- */
.btn-style-2 {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--neon-cyan);
    background: transparent;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-style-2:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
}

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

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

/* 코드 영역 리가처 비활성화 (*** 등이 합쳐지는 현상 방지) */
pre, code, .CodeMirror {
    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 Effect Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 242, 0.01) 2px,
        rgba(0, 255, 242, 0.01) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Grid Background Pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 242, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 242, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 255, 242, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 255, 0.08) 0%, transparent 50%),
        var(--bg-primary);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.login-box {
    background: var(--bg-card);
    padding: 50px 40px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 242, 0.2);
    box-shadow: var(--glow-cyan), var(--card-shadow);
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
}

/* Corner Decorations */
.login-box::before,
.login-box::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--neon-cyan);
}

.login-box::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.login-box::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.login-box h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.form-group label::before {
    content: '> ';
    color: var(--neon-cyan);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
    background: var(--bg-secondary);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300fff2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}

/* 체크박스 라벨 스타일 */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.checkbox-label::before {
    content: none !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--neon-cyan);
    cursor: pointer;
    vertical-align: middle;
    margin: 0;
}

.checkbox-label span {
    color: var(--text-secondary);
    vertical-align: middle;
    position: relative;
    margin-left: 2px;
}

.class-code-hint {
    margin-top: 10px;
    padding: 12px;
    background: rgba(0, 255, 242, 0.05);
    border: 1px solid rgba(0, 255, 242, 0.15);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-height: 62px;
    overflow-y: auto;
}

/* Role Checkbox Group - 두 개의 네모 박스 스타일 */
.role-checkbox-group {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.role-checkbox-group > label.role-checkbox::before {
    display: none;
}

.role-checkbox {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.3);
    transition: all 0.2s ease;
    text-align: center;
}

.role-checkbox:first-child {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.role-checkbox:last-child {
    border-radius: 0 4px 4px 0;
}

.role-checkbox:hover {
    background: rgba(0, 255, 242, 0.05);
    color: var(--text-primary);
}

.role-checkbox input[type="checkbox"] {
    display: none;
}

.role-checkbox span {
    user-select: none;
}

.role-checkbox:has(input[type="checkbox"]:checked) {
    background: rgba(0, 255, 242, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.role-checkbox:first-child:has(input[type="checkbox"]:checked) {
    border-right: 1px solid var(--neon-cyan);
}

.role-checkbox:last-child:has(input[type="checkbox"]:checked) {
    border-left: 1px solid var(--neon-cyan);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.2) 0%, rgba(0, 255, 242, 0.1) 100%);
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 242, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.3) 0%, rgba(0, 255, 242, 0.2) 100%);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled,
.btn-primary.btn-disabled {
    background: rgba(107, 114, 128, 0.2);
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled::before,
.btn-primary.btn-disabled::before {
    display: none;
}

.btn-primary:disabled:hover,
.btn-primary.btn-disabled:hover {
    background: rgba(107, 114, 128, 0.2);
    transform: none;
    box-shadow: none;
}

.error-message {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 4px;
    color: var(--error);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ========================================
   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(10, 14, 23, 0.98) 0%, rgba(10, 14, 23, 0.95) 100%);
    border-bottom: 1px solid rgba(0, 255, 242, 0.15);
    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 {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

header h1 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
}

header h1#titleLink {
    cursor: pointer;
    transition: all 0.3s ease;
}

header h1#titleLink:hover {
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 255, 242, 0.8);
}

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

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

/* ========================================
   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 rgba(0, 255, 242, 0.1);
    z-index: 100;
}

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

/* 푸터 팁 영역 */
.footer-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    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), 'Noto Sans KR', sans-serif;
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--text-muted);
    padding: 2px 8px;
    background: rgba(0, 255, 242, 0.08);
    border-radius: 4px;
}

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

.user-name-text {
    font-family: var(--font-mono), 'Noto Sans KR', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    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: var(--neon-green);
    padding-left: 8px;
}

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

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

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

/* 정답 시 번개 애니메이션 */
.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;
    }
}

/* Buttons */
.btn-secondary {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow: var(--glow-pink);
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-success {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid var(--success);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--success);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.2) 100%);
    box-shadow: var(--glow-green);
}

/* 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: 30px;
    overflow-y: auto;
}

/* ========================================
   PIXEL ART PROGRESS SECTION
   ======================================== */
.pixel-art-section {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 242, 0.15);
    padding: 24px 28px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.pixel-art-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan), var(--neon-green));
    background-size: 200% 100%;
    animation: gradientSlide 3s ease-in-out infinite;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.pixel-art-header h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.pixel-art-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
}

/* 카테고리 진행률 바 */
.category-bar {
    width: 40px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    --bar-hue: 180;
    --bar-brightness: 0.2;
}

.category-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: hsla(var(--bar-hue), 70%, 50%, var(--bar-brightness));
    transition: all 0.5s ease;
    z-index: 1;
}

.category-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        hsla(var(--bar-hue), 80%, 50%, 1),
        hsla(var(--bar-hue), 80%, 60%, 0.8)
    );
    transition: height 0.5s ease;
    z-index: 2;
}

.category-bar-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.category-bar:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: hsla(var(--bar-hue), 80%, 60%, 0.8);
    box-shadow:
        0 8px 25px hsla(var(--bar-hue), 80%, 50%, 0.4),
        0 0 15px hsla(var(--bar-hue), 80%, 50%, 0.3);
}

.category-bar:hover::after {
    content: attr(data-category) '\A' attr(data-progress);
    white-space: pre;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid hsla(var(--bar-hue), 80%, 50%, 0.5);
    z-index: 100;
    min-width: 120px;
}

/* 100% 완료시 특별 효과 */
.category-bar.completed {
    animation: completedPulse 2s ease-in-out infinite;
}

.category-bar.completed::before {
    background: hsla(var(--bar-hue), 80%, 50%, 1);
}

.category-bar.completed .category-bar-label {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes completedPulse {
    0%, 100% {
        box-shadow: 0 0 10px hsla(var(--bar-hue), 80%, 50%, 0.5);
    }
    50% {
        box-shadow:
            0 0 20px hsla(var(--bar-hue), 80%, 50%, 0.8),
            0 0 40px hsla(var(--bar-hue), 80%, 50%, 0.4);
    }
}

/* ========================================
   CATEGORIES & PROBLEM LIST (Student Dashboard)
   ======================================== */
#categoriesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    width: 100%;
}

.category {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
}

.category:hover {
    border-color: rgba(0, 255, 242, 0.3);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}

.category h2 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neon-cyan);
    padding: 20px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category h2::before {
    content: '// ';
    color: var(--text-muted);
    margin-right: 10px;
}

.category-progress-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

.category-header h2 {
    padding: 0;
    background: none;
    border-bottom: none;
    flex: 1;
}

.category-reset-btn {
    all: unset;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: 12px;
    transition: color 0.2s ease;
}

.category-reset-btn:hover {
    color: var(--neon-cyan);
}

.category-problems {
    padding: 16px;
    max-height: 440px;
    overflow-y: auto;
}

.problem-item {
    padding: 16px 20px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.problem-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.problem-item:hover {
    background: var(--bg-elevated);
    border-color: rgba(0, 255, 242, 0.2);
}

.problem-item:hover::before {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.problem-item.solved::before {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.problem-item.solved {
    border-color: rgba(16, 185, 129, 0.2);
}

/* 부모 문제 스타일 */
.problem-item.parent-problem {
    background: var(--bg-elevated);
    border-left: 4px solid var(--neon-cyan);
    margin-top: 12px;
}

.problem-item.parent-problem:first-child {
    margin-top: 0;
}

.problem-item.parent-problem::before {
    display: none;
}

.problem-item.parent-problem h3 {
    font-weight: 600;
    color: var(--neon-cyan);
}

.problem-item.parent-problem:hover {
    border-left-color: var(--neon-pink);
}

/* 부모 문제 진행률 표시 - 왼쪽 라인 투명도 */
.problem-item.parent-problem {
    --progress-opacity: 0.15;
    border-left-color: rgba(0, 255, 242, var(--progress-opacity));
}

.problem-item.parent-problem.all-solved {
    border-left-color: var(--success);
}

/* 자식 문제 스타일 */
.problem-item.child-problem {
    padding-left: 24px;
    background: var(--bg-secondary);
    border-left: 2px solid var(--text-muted);
    margin-bottom: 4px;
}

.problem-item.child-problem::before {
    display: none;
}

.problem-item.child-problem h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.problem-item.child-problem:hover {
    border-left-color: var(--neon-cyan);
    border-left-style: solid;
}

.problem-item.child-problem:hover h3 {
    color: var(--text-primary);
}

.problem-item.child-problem.solved {
    border-left-color: var(--success);
    border-left-style: solid;
}

.problem-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0;
}

.problem-item h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.problem-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: none;
}

.problem-check-icon {
    font-size: 1.2rem;
    color: var(--success);
    text-shadow: 0 0 10px var(--success);
    margin-left: 12px;
}

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

/* Problem Difficulty Badge */
.problem-difficulty {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    margin-right: 16px;
    vertical-align: middle;
}

.problem-difficulty::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.problem-difficulty.diff-easy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.problem-difficulty.diff-medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.problem-difficulty.diff-hard {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.problem-item:hover .problem-difficulty.diff-easy {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}

.problem-item:hover .problem-difficulty.diff-medium {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}

.problem-item:hover .problem-difficulty.diff-hard {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* 어려운 문제 불 이모티콘 */
.problem-fire-icon {
    margin-left: 6px;
    font-size: 0.9em;
}

/* GUIDE 배지 (부모 문제용) */
.guide-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: #0a0e17;
    background: linear-gradient(135deg, var(--neon-cyan), #00c8ff);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    vertical-align: middle;
    margin-left: auto;
}

/* 자식 문제 토글 버튼 */
.toggle-children-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
}

.toggle-children-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.toggle-children-btn.expanded {
    background: rgba(0, 255, 242, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* 자식 문제 컨테이너 */
.children-container {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
    border-left: 2px solid var(--border-subtle);
    margin-bottom: 8px;
}

.children-container.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    padding-left: 0;
    border-left: none;
}

/* ========================================
   SOLVE PAGE
   ======================================== */
.solve-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: var(--header-height);
    padding: 24px;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

.problem-panel {
    background: var(--bg-card);
    border-radius: 0;
    border: none;
    border-right: 1px solid rgba(0, 255, 242, 0.1);
    padding: 28px;
    overflow-y: auto;
    position: relative;
}


.problem-panel h2 {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    text-shadow: var(--glow-cyan);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

#problemTitleText {
    letter-spacing: 0.02em;
    color: #fff;
}

.level-number-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: transparent;
    border-left: 3px solid var(--neon-cyan);
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(0, 255, 242, 0.85);
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0.9;
}

.problem-panel h2 .problem-difficulty {
    font-size: 0.8rem;
    padding: 5px 14px;
    text-shadow: none;
    margin-left: 0;
    margin-right: 0;
}

.problem-panel h2 .problem-difficulty.diff-easy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5);
}

.problem-panel h2 .problem-difficulty.diff-medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
}

.problem-panel h2 .problem-difficulty.diff-hard {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5);
}

.problem-panel h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neon-green);
    margin-top: 24px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.problem-panel h3::before {
    content: '> ';
}

#problemDescription {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    tab-size: 4;
    font-family: var(--font-korean);
    margin: 0;
    background: transparent;
}

.problem-info pre {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 20px;
    border-radius: 6px;
    border-left: 3px solid var(--neon-green);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
    font-variant-ligatures: none;
}

.code-panel {
    background: var(--bg-card);
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(0, 255, 242, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}


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

.code-header h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 코드 헤더 버튼 공통 스타일 */
.code-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-header-buttons button {
    width: 90px;
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.code-header-buttons button:hover {
    transform: translateY(-1px);
}

.code-header-buttons button:active {
    transform: translateY(0);
}

/* 실행 버튼 (cyan) */
.code-header .btn-primary {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.2) 0%, rgba(0, 255, 242, 0.1) 100%);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
}

.code-header .btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.3) 0%, rgba(0, 255, 242, 0.2) 100%);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.3);
}

.code-header .btn-primary:disabled {
    background: rgba(107, 114, 128, 0.2);
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 초기화 버튼 (gray) */
.code-header .btn-hint {
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(156, 163, 175, 0.4);
    color: #9ca3af;
}

.code-header .btn-hint:hover {
    background: rgba(107, 114, 128, 0.25);
    border-color: rgba(156, 163, 175, 0.6);
    box-shadow: 0 0 10px rgba(156, 163, 175, 0.2);
}

/* 정답 버튼 (gray) */
.code-header .btn-solution {
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(156, 163, 175, 0.4);
    color: #9ca3af;
}

.code-header .btn-solution:hover {
    background: rgba(107, 114, 128, 0.25);
    border-color: rgba(156, 163, 175, 0.6);
    box-shadow: 0 0 10px rgba(156, 163, 175, 0.2);
}

/* AI 나나 버튼 (pink-cyan gradient) */
.code-header .btn-ai-toggle {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 242, 0.1));
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
}

.code-header .btn-ai-toggle:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(0, 255, 242, 0.2));
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.code-header .btn-ai-toggle.active {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.4), rgba(0, 255, 242, 0.3));
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

#codeEditorWrapper {
    flex: 1;
    min-height: 300px;
    max-height: 400px;
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

#codeEditorWrapper .CodeMirror {
    height: 100% !important;
    font-family: var(--font-mono) !important;
    font-size: 1rem;
    background: var(--bg-primary) !important;
    cursor: text !important;
}

#codeEditorWrapper .CodeMirror-lines {
    cursor: text !important;
}

#codeEditorWrapper .CodeMirror-code {
    cursor: text !important;
}

#codeEditorWrapper .CodeMirror-gutters {
    background: var(--bg-secondary) !important;
    border-right: 1px solid rgba(0, 255, 242, 0.1) !important;
}

#codeEditorWrapper .CodeMirror-linenumber {
    color: var(--text-muted) !important;
}

#codeEditorWrapper .CodeMirror-cursor {
    border-left: 2px solid var(--neon-cyan) !important;
}

#codeEditorWrapper .CodeMirror-selected {
    background: rgba(0, 255, 242, 0.1) !important;
}

#codeEditorWrapper .CodeMirror-activeline-background {
    background: rgba(0, 255, 242, 0.05) !important;
}

.output-section {
    margin-top: 20px;
    flex-shrink: 0;
}

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

.correct-badge {
    display: none !important; /* 임시 테스트: 정답 배지 숨김 */
    /* display: inline-block; */
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: #0a0e17;
    background: linear-gradient(135deg, var(--neon-green), #2ecc71);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.output-section h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.output-section h3::before {
    content: '>> ';
    color: var(--neon-green);
}

.output-section pre {
    background: var(--bg-primary);
    padding: 16px 20px;
    border-radius: 6px;
    border: 1px solid rgba(57, 255, 20, 0.2);
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--neon-green);
}

#outputArea {
    background: transparent;
    color: var(--neon-green);
}

/* Test Results */
.test-results {
    margin-top: 20px;
    flex-shrink: 0;
    max-height: 250px;
    overflow-y: auto;
}

.test-case {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--text-muted);
    transition: all 0.3s ease;
}

.test-case.passed {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
}

.test-case.passed::before {
    content: '';
}

.test-case.failed {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--error);
}

.test-case.failed::before {
    content: '';
}

.test-case h4 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.test-passed-text {
    color: var(--neon-green);
    font-weight: 700;
}

.test-failed-text {
    color: var(--error);
    font-weight: 700;
}

.test-case-detail {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ========================================
   TEACHER DASHBOARD
   ======================================== */
.teacher-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
}

.tab-btn {
    padding: 16px 32px;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-card);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--neon-cyan);
    border-color: rgba(0, 255, 242, 0.2);
    border-bottom-color: var(--bg-card);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.tab-content {
    display: none;
    background: var(--bg-card);
    padding: 28px;
    border-radius: 0 0 8px 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
    border-top: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 레벨 탭 (기초/응용/심화) */
.level-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.15);
}

.level-tab-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.level-tab-btn:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 242, 0.05);
}

.level-tab-btn.active {
    background: rgba(0, 255, 242, 0.15);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

/* 레벨별 색상 구분 */
.level-tab-btn[data-level="basic"].active {
    background: rgba(57, 255, 20, 0.15);
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.level-tab-btn[data-level="intermediate"].active {
    background: rgba(0, 255, 242, 0.15);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

.level-tab-btn[data-level="advanced"].active {
    background: rgba(255, 0, 255, 0.15);
    color: var(--neon-pink);
    border-color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

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

.tab-content h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tab-content h2::before {
    content: '// ';
    color: var(--text-muted);
}

/* ========================================
   교사 페이지 - 학생 목록
   ======================================== */
#studentsList {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* 클래스 3열 그리드 레이아웃 */
#studentsList.classes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

#studentsList.classes-grid .section-header {
    grid-column: 1 / -1;
}

/* ===== 공통 관리 그리드 스타일 (클래스 관리, 선생님 관리) ===== */
.management-grid .class-row {
    flex-direction: column;
}

.management-grid .class-label {
    width: 100%;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
    padding: 10px 14px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.management-grid .class-label::before {
    content: none;
}

.management-grid .class-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.management-grid .class-info::before {
    content: '// ';
    color: var(--text-muted);
}

.management-grid .class-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.management-grid .students-list {
    padding: 10px;
    gap: 6px;
}

/* 클래스 그리드 내 학생 카드 - 컴팩트 1행 레이아웃 */
#studentsList.classes-grid .student-card {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

/* 이름 + 비밀번호 아이콘 */
#studentsList.classes-grid .student-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: unset;
    flex-shrink: 0;
}

#studentsList.classes-grid .student-card-header h4 {
    font-size: 0.85rem;
    margin: 0;
}

#studentsList.classes-grid .student-card-header .btn-password-icon {
    border: none;
    padding: 3px;
    background: transparent;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}

#studentsList.classes-grid .student-card-header .btn-password-icon:hover {
    opacity: 1;
    color: var(--neon-orange);
}

/* 오늘/총 통계 */
#studentsList.classes-grid .student-stats-compact {
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* 접속 시간 */
#studentsList.classes-grid .student-login-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

/* ===== 이용권 관련 스타일 ===== */

/* 보유 이용권 표시 바 */
.ticket-info-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.2);
}

.ticket-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ticket-count {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neon-cyan);
}

.ticket-unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 학생 카드 내 이용권 정보 */
.student-subscription-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--text-muted);
}

.subscription-remaining {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.subscription-normal {
    color: var(--success);
    background: rgba(16, 185, 129, 0.15);
}

.subscription-warning {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.15);
}

.subscription-critical {
    color: var(--error);
    background: rgba(239, 68, 68, 0.15);
    animation: pulse-critical 1s ease-in-out infinite;
}

.subscription-expired {
    color: #fff;
    background: var(--error);
    font-weight: 600;
}

.subscription-unlimited {
    color: var(--neon-cyan);
    background: rgba(0, 255, 242, 0.1);
}

/* 접속시간 옆 인라인 표시용 */
.subscription-remaining-inline {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 연장 버튼 */
.btn-extend {
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid rgba(156, 163, 175, 0.5);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* 7일 이하 남은 경우 빨간색 강조 */
.btn-extend-urgent {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-extend-urgent:hover {
    color: #dc2626;
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

/* ===== 선생님 관리 탭 - 그리드 레이아웃 ===== */

/* 선생님 목록 컨테이너: 3열 그리드 */
#membersList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

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

/* 선생님 담당 클래스 목록 (1열) */
.teacher-classes-grid {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.teacher-classes-grid .student-card {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    box-sizing: border-box;
}

.teacher-classes-grid .student-card-header {
    flex-shrink: 0;
}

.teacher-classes-grid .student-card-header h4 {
    font-size: 0.85rem;
    margin: 0;
}

.teacher-classes-grid .student-stats-compact {
    font-size: 0.8rem;
    margin-left: auto;
}

.teacher-classes-grid .students-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px;
}

/* ===== 클래스 관리 탭 - 선생님 관리 카드 ===== */

/* 선생님 관리 카드 행 */
.teacher-management-row {
    border-color: rgba(255, 165, 0, 0.3);
}

.teacher-management-row .class-label {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1) 0%, var(--bg-elevated) 100%);
}

.teacher-management-row .class-name-text {
    color: var(--neon-orange);
}

.teacher-management-row .class-info::before {
    content: '';
}

/* 선생님 관리 목록 */
.teacher-management-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

/* 선생님 카드 - 학생 카드와 동일한 스타일 사용 */
.teacher-management-list .teacher-card {
    height: 40px;
    box-sizing: border-box;
    padding: 8px 12px;
}

/* 삭제 버튼 스타일 */
.btn-delete-teacher {
    color: var(--text-muted);
}

.btn-delete-teacher:hover {
    color: var(--error) !important;
    opacity: 1 !important;
}

/* ===== 학생 카드 액션 버튼 ===== */
.student-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-student-action {
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-student-action:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-student-action.btn-extend {
    color: var(--text-secondary);
}

.btn-student-action.btn-extend-urgent {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-student-action.btn-extend-urgent:hover {
    color: #dc2626;
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.btn-student-action.btn-progress {
    color: var(--text-secondary);
}

.btn-student-action.btn-progress:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* 학생 수정 모달 */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer-right {
    display: flex;
    gap: 8px;
}

.btn-danger {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--error);
    background: transparent;
    color: var(--error);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: var(--error);
    color: #fff;
}

/* 선생님 탭 - 클래스 카드 확장 (학생 목록 표시) */
.teacher-class-card {
    flex-wrap: wrap;
    transition: all 0.2s ease;
}

.teacher-class-card.expanded {
    background: var(--bg-elevated);
    border-color: rgba(0, 255, 242, 0.3);
}

.teacher-class-students {
    width: 100%;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
}

.teacher-class-student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 4px;
    position: relative;
}

.teacher-class-student-item:last-child {
    margin-bottom: 0;
}

.teacher-class-student-item .student-name-text {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.teacher-class-student-item .student-name-text.online-name {
    color: var(--neon-green);
}

.teacher-class-student-item .student-quick-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
}

.teacher-class-student-item .student-quick-stats .today-active {
    color: var(--neon-green);
    font-weight: 600;
}

.teacher-class-students .no-students,
.teacher-class-students .loading-small,
.teacher-class-students .error-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

/* 클래스 행: 왼쪽 클래스명 | 오른쪽 학생목록 */
.class-row {
    display: flex;
    flex-direction: row;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
    overflow: hidden;
}

/* 왼쪽 클래스명 영역 */
.class-label {
    width: 180px;
    min-width: 180px;
    padding: 24px;
    background: var(--bg-elevated);
    border-right: 1px solid rgba(0, 255, 242, 0.1);
    display: flex;
    align-items: flex-start;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.class-label::before {
    content: '// ';
    color: var(--text-muted);
}

/* 클래스 드래그 앤 드롭 */
.class-label[draggable="true"] {
    cursor: grab;
}

.class-label[draggable="true"]:active {
    cursor: grabbing;
}

.class-row.class-row-dragging {
    opacity: 0.4;
}

/* 리스트 레이아웃: 상/하 인디케이터 */
.class-row.drop-before {
    position: relative;
}

.class-row.drop-before::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    z-index: 10;
    border-radius: 2px;
}

.class-row.drop-after {
    position: relative;
}

.class-row.drop-after::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    z-index: 10;
    border-radius: 2px;
}

/* 그리드 레이아웃: 좌/우 인디케이터 */
.class-row.drop-left {
    position: relative;
}

.class-row.drop-left::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    z-index: 10;
    border-radius: 2px;
}

.class-row.drop-right {
    position: relative;
}

.class-row.drop-right::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    z-index: 10;
    border-radius: 2px;
}

/* 공용 섹션 헤더 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: none;
    border-radius: 8px;
    margin-bottom: 12px;
    border: none;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin: 0;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--neon-cyan);
    background: transparent;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--neon-cyan);
    color: var(--bg-main);
}

.header-buttons {
    display: flex;
    gap: 8px;
}

/* 서브섹션 타이틀 */
.subsection-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 16px 0 8px 0;
}

/* 클래스명 영역 수정 */
.class-label {
    position: relative;
    justify-content: space-between;
}

.class-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* 클래스 관리 버튼 컨테이너 */
.class-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.class-name-text {
    flex-shrink: 0;
}

.class-student-count {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.class-student-count svg {
    opacity: 0.7;
}

.class-teacher-info {
    font-size: 0.8rem;
    color: #fff;
    font-weight: normal;
}

/* 클래스 관리 버튼 - badge 스타일 (user-class-badge 기반) */
.btn-class-action {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: none;
    background: rgba(0, 255, 242, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-class-action:hover {
    background: rgba(0, 255, 242, 0.15);
    color: var(--neon-cyan);
}

/* 진도 버튼 (삭제 버튼과 동일 스타일) */
.btn-class-progress {
    background: rgba(0, 255, 242, 0.08);
    color: var(--text-muted);
}

.btn-class-progress:hover {
    background: rgba(0, 255, 242, 0.15);
    color: var(--neon-cyan);
}

/* 삭제 버튼 */
.btn-delete-class {
    background: rgba(0, 255, 242, 0.08);
    color: var(--text-muted);
}

.btn-delete-class:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* 카테고리 체크박스 리스트 (진도 모달용) */
.category-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.category-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.category-checkbox-item:hover {
    background: rgba(0, 255, 242, 0.1);
}

.category-checkbox-item label {
    cursor: pointer;
    flex: 1;
}

.category-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--neon-cyan);
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* 체크박스 리스트 */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.teacher-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.teacher-checkbox-item:hover {
    background: rgba(0, 255, 242, 0.05);
}

.teacher-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--neon-cyan);
    cursor: pointer;
}

.teacher-checkbox-item span {
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* 학생 없음 메시지 */
.students-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: 8px 0;
}

/* 담당 클래스 없음 안내 */
.no-class-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    min-height: 200px;
    grid-column: 1 / -1; /* 그리드 컨테이너에서 전체 너비 차지 */
}

.no-class-notice p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.no-class-notice .notice-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 오른쪽 학생 목록 영역 */
.students-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 8px;
}

/* 클래스 내 담당 선생님 행 */
.teacher-row-in-class {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    background: rgba(0, 255, 242, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 242, 0.15);
    margin-bottom: 4px;
}

.teacher-name-in-class {
    color: var(--text-primary);
    font-size: 0.85rem;
}

.btn-change-teacher {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: none;
    background: rgba(0, 255, 242, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change-teacher:hover {
    background: rgba(0, 255, 242, 0.15);
    color: var(--neon-cyan);
}

/* 학생 카드 - 한 줄에 모든 정보 */
.student-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.student-card:hover {
    border-color: rgba(0, 255, 242, 0.2);
    background: var(--bg-elevated);
}

/* 드래그 앤 드롭 스타일 */
.student-card[draggable="true"] {
    cursor: grab;
}

.student-card[draggable="true"]:active {
    cursor: grabbing;
}

.student-card.dragging {
    opacity: 0.5;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 255, 242, 0.3);
}

.class-row.drop-target {
    position: relative;
}

.class-row.drop-target::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px dashed rgba(0, 255, 242, 0.3);
    border-radius: 8px;
    pointer-events: none;
}

.class-row.drag-over {
    background: rgba(0, 255, 242, 0.05);
}

.class-row.drag-over::after {
    border-color: var(--accent-primary);
    background: rgba(0, 255, 242, 0.1);
}

/* 학생 카드 헤더 (이름 + 버튼) */
.student-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 20%;
    min-width: 80px;
}

.student-card-header h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* 학생 카드 버튼 */
.student-card-buttons {
    display: flex;
    gap: 6px;
}

.btn-curriculum-icon,
.btn-password-icon {
    background: transparent;
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-curriculum-icon:hover {
    background: rgba(0, 255, 242, 0.1);
}

.btn-password-icon {
    border-color: rgba(255, 107, 53, 0.3);
}

.btn-password-icon:hover {
    background: rgba(255, 107, 53, 0.1);
}

/* 학생 통계 정보 */
.student-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.student-stats > div {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.student-stats strong {
    color: var(--text-muted);
    font-weight: 400;
}

/* 학생 통계 컴팩트 스타일 (오늘/총 형식) */
.student-stats-compact {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
    width: 15%;
    min-width: 70px;
}

.student-solved-count {
    display: inline-flex;
    align-items: baseline;
    min-width: 70px;
    justify-content: flex-end;
}

.student-solved-count .today-count {
    color: var(--text-primary);
    display: inline-block;
    min-width: 1.2em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.student-solved-count .today-count.today-active {
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.student-solved-count .total-count {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.student-solved-count .total-count::before {
    content: '/';
}

/* "개" 글자 정렬을 위한 고정 너비 */
.student-solved-count .count-number {
    display: inline-block;
    min-width: 2.5em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 온라인 학생 스타일 */
.student-card.online {
    border-color: rgba(0, 255, 100, 0.3);
    background: rgba(0, 255, 100, 0.05);
}

.student-card.online:hover {
    border-color: rgba(0, 255, 100, 0.5);
    background: rgba(0, 255, 100, 0.08);
}

.online-name {
    color: #00ff64 !important;
    text-shadow: 0 0 8px rgba(0, 255, 100, 0.5);
}

.online-status {
    color: #00ff64;
    font-weight: 500;
}

/* 24시간 이내 접속 (오프라인) */
.recent-24h {
    color: #ffcc00;
    font-weight: 500;
}

/* 최근 풀이 기록 버튼 */
.btn-recent-icon {
    background: none;
    border: 1px solid rgba(0, 255, 242, 0.3);
    color: var(--primary);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-recent-icon:hover {
    background: rgba(0, 255, 242, 0.1);
    border-color: var(--primary);
}

.btn-recent-icon.active {
    background: rgba(0, 255, 242, 0.15);
    border-color: var(--primary);
}

/* 최근 풀이 기록 목록 */
.recent-solved-list {
    width: 100%;
    flex-basis: 100%;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recent-solved-list::-webkit-scrollbar {
    width: 6px;
}

.recent-solved-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.recent-solved-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 242, 0.3);
    border-radius: 3px;
}

.recent-solved-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 242, 0.5);
}

.recent-solved-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-solved-item:hover {
    background: rgba(0, 255, 242, 0.1);
}

.recent-solved-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.recent-solved-problem-id {
    color: var(--primary);
    font-size: 11px;
    font-weight: 500;
    min-width: 65px;
    flex-shrink: 0;
}

.recent-solved-time {
    color: var(--text-muted);
    font-size: 10px;
}

.recent-solved-title {
    color: var(--text);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.recent-solved-time {
    margin-left: auto;
    flex-shrink: 0;
}

.recent-solved-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 16px;
}

/* 카테고리별 그룹 헤더 */
.recent-solved-category-header {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px 4px;
    border-left: 2px solid var(--primary);
    margin-bottom: 4px;
    background: rgba(0, 255, 242, 0.05);
}

.recent-solved-category-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.problem-list-item {
    background: var(--bg-secondary);
    padding: 18px 24px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.problem-list-item:hover {
    background: var(--bg-elevated);
    border-color: rgba(0, 255, 242, 0.2);
    transform: translateX(8px);
}

/* ========================================
   SIDEBAR (Solve Page)
   ======================================== */
.hamburger-btn {
    background: none;
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    color: var(--neon-cyan);
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(0, 255, 242, 0.1);
    box-shadow: var(--glow-cyan);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -380px;
    width: 380px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid rgba(0, 255, 242, 0.2);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    padding: 28px;
}

.sidebar.open {
    left: 0;
}

.sidebar h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.sidebar-category {
    margin-bottom: 16px;
}

.sidebar-category-title {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-category-title:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
    border-left-color: var(--neon-cyan);
}

.sidebar-category-title::before {
    content: '▸ ';
    color: var(--neon-cyan);
    transition: transform 0.3s ease;
    display: inline-block;
}

.sidebar-category.open .sidebar-category-title::before {
    content: '▾ ';
}

.sidebar-problems {
    padding: 8px 0 8px 20px;
    display: none;
}

.sidebar-category.open .sidebar-problems {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.sidebar-problem-item {
    padding: 12px 16px;
    margin-bottom: 4px;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.sidebar-problem-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left-color: var(--neon-cyan);
}

.sidebar-problem-item.active {
    background: rgba(0, 255, 242, 0.1);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}

.sidebar-problem-item.solved::after {
    content: ' ✓';
    color: var(--success);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 242, 0.5);
}

/* ========================================
   CURRICULUM (진도 관리) PAGE
   ======================================== */
.header-buttons {
    display: flex;
    gap: 10px;
}

.curriculum-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.level-tabs {
    display: flex;
    gap: 8px;
}

.level-tab {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-display);
    font-size: 0.9rem;
}

.level-tab:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.level-tab.active {
    background: rgba(0, 255, 242, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.bulk-actions {
    display: flex;
    gap: 10px;
}

#curriculumList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.curriculum-level-section {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.curriculum-level-title {
    margin: 0 0 16px 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--neon-cyan);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
}

.curriculum-categories-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.curriculum-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.curriculum-category-item:hover {
    background: rgba(0, 255, 242, 0.05);
}

.curriculum-category-item label {
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

.category-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--neon-cyan);
    cursor: pointer;
}

/* ========================================
   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;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Selection Color */
::selection {
    background: rgba(0, 255, 242, 0.3);
    color: #fff;
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 8px;
    box-shadow: var(--glow-cyan), var(--card-shadow);
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan));
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 18px 22px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-body .error-message {
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
    min-height: 0;
}

.modal-body .error-message:not(:empty) {
    margin-top: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
    background: var(--bg-secondary);
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    width: auto;
    padding: 11px 24px;
    line-height: 1;
    font-size: 0.85rem;
}

/* 기본 폼 모달 스타일 */
.modal-form .modal-body {
    padding: 20px 24px;
}

.modal-form .form-group {
    margin-bottom: 16px;
}

.modal-form .form-group:last-of-type {
    margin-bottom: 0;
}

.modal-form .form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.modal-form .form-group label::before {
    content: '>';
    margin-right: 6px;
    color: var(--neon-cyan);
}

.modal-form .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.modal-form .form-group input::placeholder {
    color: var(--text-muted);
}

.modal-form .form-group input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 255, 242, 0.2);
}

.modal-form .modal-footer {
    padding: 20px 24px;
}

.modal-form .modal-footer .btn-primary {
    flex: 1;
}

/* 클래스 수정 모달 깔끔한 스타일 */
.modal-edit-class .modal-body {
    padding: 20px 24px;
}

.modal-edit-class .form-group {
    margin-bottom: 20px;
}

.modal-edit-class .form-group:last-child {
    margin-bottom: 0;
}

.modal-edit-class .form-group label {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.modal-edit-class .checkbox-list {
    background: transparent;
    border: none;
    padding: 0;
    max-height: 180px;
}

.modal-edit-class .teacher-checkbox-item {
    padding: 10px 12px;
    background: rgba(0, 255, 242, 0.03);
    border: 1px solid rgba(0, 255, 242, 0.1);
    border-radius: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-edit-class .teacher-checkbox-item::before {
    display: none;
}

.modal-edit-class .teacher-checkbox-item input[type="checkbox"] {
    flex-shrink: 0;
}

.modal-edit-class .teacher-checkbox-item span {
    line-height: 1;
}

.modal-edit-class .teacher-checkbox-item:last-child {
    margin-bottom: 0;
}

.modal-edit-class .teacher-checkbox-item:hover {
    background: rgba(0, 255, 242, 0.08);
    border-color: rgba(0, 255, 242, 0.2);
}

/* 모달 푸터 깔끔한 스타일 */
.modal-footer-clean {
    background: transparent;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
    padding: 16px 24px;
    gap: 10px;
}


/* ========================================
   FAVORITES (즐겨찾기) STYLES
   ======================================== */

/* 필터 섹션 */
.filter-section {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.btn-filter {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filter:hover {
    border-color: rgba(255, 215, 0, 0.6);
    color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.btn-filter.active {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.filter-star,
.filter-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-filter:hover .filter-star,
.btn-filter.active .filter-star,
.btn-filter:hover .filter-icon,
.btn-filter.active .filter-icon {
    transform: scale(1.2);
}

/* 문제 목록의 즐겨찾기 별 버튼 */
.problem-favorite-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.problem-favorite-btn:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.problem-favorite-btn.active {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* 오답 횟수 배지 (교사용) */
.wrong-count-badge {
    background: rgba(255, 80, 80, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    margin-left: 8px;
    flex-shrink: 0;
}

/* 문제 풀이 페이지의 즐겨찾기 버튼 */
.problem-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
}

.btn-favorite {
    background: none;
    border: none;
    padding: 4px 8px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-favorite:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.btn-favorite.active {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.btn-favorite .star-empty,
.btn-favorite .star-filled {
    line-height: 1;
}

/* 문제 헤더 제목과 즐겨찾기 버튼 정렬 */
.problem-panel h2#problemTitle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.problem-panel h2#problemTitle .guide-badge {
    margin-left: 4px;
}

/* GUIDE 텍스트 스타일 */
.guide-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neon-cyan);
    opacity: 0.8;
    letter-spacing: 0.05em;
}

/* ========================================
   PROBLEM EDIT BUTTON & MODAL (교사 전용)
   ======================================== */
.btn-edit {
    padding: 6px 8px;
    margin-top: 1px;
    background: transparent;
    border: 1px solid var(--neon-orange);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-orange);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    line-height: 1.4;
}

.btn-edit:hover {
    background: rgba(255, 107, 53, 0.15);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

/* Medium Modal for Solution */
.modal-content.modal-medium {
    max-width: 500px;
}

.modal-content.modal-medium .modal-body {
    max-height: 50vh;
    overflow-y: auto;
}

/* Solution Code Block */
.solution-code-block {
    margin: 0;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 6px;
    overflow-x: auto;
}

.solution-code-block code {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Large Modal for Edit */
.modal-content.modal-large {
    max-width: 600px;
}

.modal-content.modal-large .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Textarea styling for edit modal */
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
    background: var(--bg-secondary);
}

/* ========================================
   LEVEL TABS (기초/응용/심화)
   ======================================== */
.level-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
}

.level-tab {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.level-tab.active {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.15) 0%, rgba(0, 255, 242, 0.05) 100%);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
}

.level-tab.active::before {
    content: '▸ ';
}

/* 기초 탭 - 녹색 */
.level-tab[data-level="basic"].active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* 응용 탭 - 주황색 */
.level-tab[data-level="intermediate"].active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: var(--warning);
    color: var(--warning);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* 심화 탭 - 빨간색/핑크 */
.level-tab[data-level="advanced"].active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* 빈 메시지 */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px dashed rgba(0, 255, 242, 0.2);
}

/* ========================================
   HINT BUTTON (코드 틀 버튼)
   ======================================== */
.code-header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-hint {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgb(216, 184, 0);
    color: #ffd700;
    cursor: pointer;
}

.btn-hint::before {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.25), transparent);
}

.btn-hint:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
}

.btn-hint:active {
    transform: translateY(0);
}


/* ========================================
   LOADING SPINNER
   ======================================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    min-height: 200px;
    grid-column: 1 / -1; /* 그리드 컨테이너에서 전체 너비 차지 */
}

.loading-container p {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 255, 242, 0.1);
    border-top: 3px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.hidden,
.loading-container.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 242, 0.1);
    border-top: 3px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   TIP BANNER
   ======================================== */
.tip-banner {
    margin-top: auto;
    padding: 12px 16px;
    background: rgba(0, 255, 242, 0.05);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tip-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

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

.problem-panel {
    display: flex;
    flex-direction: column;
}

/* ========================================
   MEMO SECTION
   ======================================== */
.memo-section {
    margin-top: auto;
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -20px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
    border-radius: 0;
}

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

.memo-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.memo-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.memo-status.saving {
    color: var(--neon-yellow);
}

.memo-status.saved {
    color: var(--success);
}

.memo-status.error {
    color: var(--error);
}

.memo-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    resize: none;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.memo-textarea::placeholder {
    color: var(--text-muted);
}

.memo-textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.15);
    background: var(--bg-secondary);
}

/* ========================================
   STUDENT MEMOS SECTION (교사용)
   ======================================== */
.student-memos-section {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 242, 0.15);
    border-radius: 8px;
}

.student-memos-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.student-memos-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.student-memos-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.student-memos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.student-memo-item {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid var(--neon-cyan);
}

.student-memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.student-memo-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neon-cyan);
}

.student-memo-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.student-memo-content {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========================================
   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, rgba(255, 0, 255, 0.15) 0%, rgba(255, 0, 255, 0.08) 100%);
    border: 1px solid rgba(255, 0, 255, 0.4);
    color: var(--neon-pink);
}

.role-badge.teacher:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.25) 0%, rgba(255, 0, 255, 0.15) 100%);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.role-badge.student {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.15) 0%, rgba(0, 255, 242, 0.08) 100%);
    border: 1px solid rgba(0, 255, 242, 0.4);
    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), 'Noto Sans KR', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

/* 이전/다음 네비게이션 버튼 */
.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.logout {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.header-btn.logout:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

.header-btn.mode-switch {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.15) 0%, rgba(255, 0, 255, 0.08) 100%);
    border-color: rgba(255, 0, 255, 0.4);
    color: var(--neon-pink);
}

.header-btn.mode-switch:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.25) 0%, rgba(255, 0, 255, 0.15) 100%);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}


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


/* ========================================
   Admin Page Styles
   ======================================== */

/* Admin Page - PC Version */
.admin-container {
    padding: 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-tab {
    padding: 14px 32px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.admin-tab.active {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
    background: transparent;
}

/* Tab Content */
.admin-tab-content {
    display: none;
}

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

/* Admin Section */
.admin-section {
    margin-bottom: 32px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-section h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
}

.admin-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Admin Table */
.admin-table-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.admin-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
    padding: 16px 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Table Cell Types */
.cell-name {
    font-weight: 600;
    color: var(--text-primary) !important;
}

.cell-code {
    font-family: var(--font-mono);
}

.code-badge {
    display: inline-block;
    background: rgba(0, 255, 242, 0.12);
    color: var(--neon-cyan);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.cell-number {
    font-family: var(--font-mono);
    text-align: center;
}

.cell-date {
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted) !important;
    opacity: 0.6;
}

.text-online {
    color: var(--neon-green);
}

/* Loading & Empty States */
.loading-cell,
.empty-cell,
.error-cell {
    text-align: center !important;
    padding: 48px 20px !important;
    color: var(--text-muted) !important;
}

.error-cell {
    color: var(--error) !important;
}

/* ========================================
   MANAGEMENT TABLE (기관/교사/클래스 관리)
   ======================================== */
.management-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 242, 0.1);
}

.management-table thead {
    background: rgba(0, 255, 242, 0.05);
}

.management-table th {
    padding: 14px 16px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

.management-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.management-table td.class-name-cell {
    padding: 8px 16px;
}

.management-table td.class-name-cell .class-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.management-table td.class-name-cell .class-teachers {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.management-table tbody tr:last-child td {
    border-bottom: none;
}

.management-table tbody tr:hover {
    background: rgba(0, 255, 242, 0.03);
}

/* 선생님 관리 - 클래스 관리와 동일한 레이아웃 */
.teachers-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 선생님 수정 버튼 */
.btn-edit-teacher {
    font-size: 0.85rem;
}

.btn-edit-teacher:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* 액션 버튼 컨테이너 */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 삭제 버튼 */
.btn-delete {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--error);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--error);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* 학생모드 버튼 */
.header-btn.student-mode {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.15) 0%, rgba(0, 255, 242, 0.08) 100%);
    border-color: rgba(0, 255, 242, 0.4);
    color: var(--neon-cyan);
}

.header-btn.student-mode:hover {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.25) 0%, rgba(0, 255, 242, 0.15) 100%);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.3);
}

/* 관리 목록 컨테이너 */
.management-list {
    background: transparent;
}

/* 폼 그룹 select 스타일 */
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 다중 선택 select */
.form-group select[multiple] {
    min-height: 100px;
}

.form-group select[multiple] option {
    padding: 8px 12px;
}

.form-group select[multiple] option:checked {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.2) 0%, rgba(0, 255, 242, 0.1) 100%);
    color: var(--neon-cyan);
}

/* ========================================
   학생 관리 탭 스타일
   ======================================== */

.student-management-container {
    padding: 20px 0;
}

.student-count-info {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 4px;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 14px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* 학생 관리 테이블 */
.student-table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
}

.student-management-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

.student-management-table thead {
    background: var(--bg-secondary);
}

.student-management-table th {
    padding: 14px 16px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
}

.student-management-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.student-management-table tbody tr:hover {
    background: rgba(0, 255, 242, 0.03);
}

.student-management-table tbody tr.online {
    background: rgba(57, 255, 20, 0.03);
}

.student-management-table tbody tr.online:hover {
    background: rgba(57, 255, 20, 0.06);
}

/* 테이블 셀 스타일 */
.student-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-name {
    font-weight: 500;
}

.student-name.online-name {
    color: var(--neon-green);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stat-cell {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-cell.today-active {
    color: var(--neon-green);
    font-weight: 600;
}

.login-cell {
    font-size: 0.85rem;
}

.login-cell .online-status {
    color: var(--neon-green);
    font-weight: 600;
}

.login-cell .recent-login {
    color: var(--neon-cyan);
}

.login-cell .no-login {
    color: var(--text-muted);
}

.empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
}

.btn-detail {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    background: rgba(0, 255, 242, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

/* ========================================
   학생 상세 페이지 스타일
   ======================================== */

.student-detail-main {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 40px;
}

.student-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 섹션 공통 스타일 */
.student-info-section,
.recent-solved-section,
.ai-feedback-section {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 242, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.student-info-section .section-header,
.recent-solved-section .section-header,
.ai-feedback-section .section-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

/* 학생 정보 그리드 */
.student-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.info-value.highlight-cyan {
    color: var(--neon-cyan);
}

.info-value.highlight-green {
    color: var(--neon-green);
}

.info-value.highlight-yellow {
    color: var(--neon-yellow);
}

/* 최근 풀이 기록 섹션 */
.recent-solved-container {
    max-height: 500px;
    overflow-y: auto;
}

.recent-category-section {
    margin-bottom: 20px;
}

.recent-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 8px;
}

.category-name {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--neon-cyan);
}

.category-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recent-records-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recent-record-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
}

.recent-record-item:hover {
    background: rgba(0, 255, 242, 0.05);
    border-left: 2px solid var(--neon-cyan);
}

.record-problem-id {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-cyan);
}

.record-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* AI 피드백 섹션 */
.coming-soon-badge {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 4px 10px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-feedback-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.ai-feedback-placeholder p {
    margin-bottom: 8px;
}

.ai-feedback-placeholder .placeholder-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* 돌아가기 버튼 */
.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.back-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* 로딩 컨테이너 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 255, 242, 0.1);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   개발 어휘 표시 영역 (로딩 중)
   ======================================== */
.dev-vocabulary-loading {
    margin-top: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.dev-vocabulary-loading.visible {
    opacity: 1;
}

.dev-vocabulary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dev-vocabulary-label {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--neon-cyan);
    font-weight: 500;
}

.dev-vocabulary-en {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
}

.dev-vocabulary-ko {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ========================================
   AI 기능 관련 스타일
   ======================================== */

/* ----- 리사이저블 3단 레이아웃 ----- */
.solve-container-3col {
    display: flex;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    margin-top: var(--header-height);
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* 좌측 섹션 (문제 + 메모) */
.solve-container-3col > .left-section {
    flex: 0 0 auto;
    width: 400px;
    min-width: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-right: 1px solid rgba(0, 255, 242, 0.1);
}

/* 문제 영역 (스크롤 가능) */
.solve-container-3col > .left-section > .problem-panel {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 30px;
    background: var(--bg-primary);
    border: none;
    border-radius: 0;
}

/* 메모 영역 (하단 고정) */
.solve-container-3col > .left-section > .memo-section {
    flex: 0 0 auto;
    margin: 0;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
    border-radius: 0;
}

.solve-container-3col > .code-panel {
    flex: 1 1 auto;
    min-width: 600px;
    overflow-y: auto;
    height: 100%;
    padding: 20px 30px;
    background: var(--bg-primary);
}

/* AI 패널 */
.solve-container-3col > .ai-panel {
    display: none;
    flex: 0 0 auto;
    width: 0;
    min-width: 0;
    overflow: hidden;
    height: 100%;
    opacity: 0;
}

/* AI 패널 열림 상태 */
.solve-container-3col.ai-open > .ai-panel {
    display: flex;
    width: 320px;
    min-width: 280px;
    opacity: 1;
    overflow-y: auto;
}

/* AI 핸들 숨김: AI 패널이 열리지 않았을 때 */
.resize-handle.ai-handle {
    display: none;
}

.solve-container-3col.ai-open .resize-handle.ai-handle {
    display: block;
}

/* ----- 리사이저 핸들 스타일 ----- */
.resize-handle {
    flex: 0 0 auto;
    width: 6px;
    background: transparent;
    cursor: col-resize;
    position: relative;
    z-index: 10;
    transition: background 0.2s ease;
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: rgba(0, 255, 242, 0.3);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.resize-handle:hover {
    background: rgba(0, 255, 242, 0.1);
}

.resize-handle:hover::before {
    height: 60px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
}

.resize-handle.dragging {
    background: rgba(0, 255, 242, 0.15);
}

.resize-handle.dragging::before {
    height: 80px;
    background: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.7);
}

/* AI 패널 리사이저 (시안 계열로 통일 - 기본 핸들과 동일) */

/* 리사이징 중 선택 방지 */
body.resizing {
    user-select: none;
    cursor: col-resize !important;
}

body.resizing * {
    cursor: col-resize !important;
}

/* 반응형 레이아웃 */
@media (max-width: 1200px) {
    .solve-container-3col > .left-section {
        width: 280px;
        min-width: 200px;
    }
    .solve-container-3col > .code-panel {
        min-width: 350px;
    }
    /* 작은 화면에서는 AI 패널 오버레이로 표시 */
    .solve-container-3col > .ai-panel {
        position: fixed;
        right: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height) - var(--footer-height));
        z-index: 100;
        border-radius: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    }
    .solve-container-3col.ai-open > .ai-panel {
        width: 320px;
    }
    .resize-handle.ai-handle {
        display: none;
    }
}

@media (max-width: 768px) {
    .solve-container-3col {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }
    .solve-container-3col > .left-section,
    .solve-container-3col > .code-panel {
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        height: auto;
        flex: 0 0 auto;
    }
    .resize-handle {
        display: none;
    }
    .solve-container-3col.ai-open > .ai-panel {
        width: 100%;
        border-radius: 0;
    }
}

/* ----- AI 패널 기본 스타일 ----- */
.ai-panel {
    background: var(--bg-secondary);
    border: none;
    border-left: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
}

.ai-panel-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.12), rgba(0, 255, 242, 0.12));
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ai-panel-header h3 {
    color: var(--neon-pink);
    font-family: var(--font-display);
    margin: 0;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.ai-usage-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.usage-ring {
    flex-shrink: 0;
}

.usage-ring-fill {
    transition: stroke-dashoffset 0.5s ease;
}   

/* AI 패널 닫기 버튼 */
.ai-panel-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    margin-top: 1px;
    line-height: 1;
    transition: all 0.2s ease;
}

.ai-panel-close:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* AI 대화 초기화 버튼 */
.ai-panel-reset {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: all 0.2s ease;
}

.ai-panel-reset:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
}

/* AI 토글 버튼 */
.btn-ai-toggle {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 242, 0.2));
    border: 1px solid rgba(255, 0, 255, 0.4);
    color: var(--neon-pink);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600 !important;
    transition: all 0.3s ease;
}

.btn-ai-toggle:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(0, 255, 242, 0.3));
}

.btn-ai-toggle.active {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.4), rgba(0, 255, 242, 0.4));
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

/* ----- AI 기능 버튼 그리드 ----- */
.ai-feature-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.2);
}

.ai-btn {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 242, 0.3);
    color: var(--text-primary);
    padding: 8px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    text-align: center;
    font-family: var(--font-mono);
}

.ai-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
    background: rgba(0, 255, 242, 0.05);
}

.ai-btn .icon {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(107, 114, 128, 0.3);
}

.ai-btn:disabled:hover {
    box-shadow: none;
    background: var(--bg-card);
}

/* ----- 채팅 영역 ----- */
.ai-chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 200px;
}

/* 스크롤바 스타일링 */
.ai-chat-area::-webkit-scrollbar {
    width: 8px;
}

.ai-chat-area::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.ai-chat-area::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 242, 0.3);
    border-radius: 4px;
}

.ai-chat-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 242, 0.5);
}

/* ----- AI 환영 메시지 ----- */
.ai-welcome {
    text-align: center;
    padding: 20px;
}

.ai-welcome .ai-avatar {
    font-size: 48px;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.ai-welcome p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    font-family: var(--font-body);
}

/* AI 퀵 버튼 */
.ai-quick-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ai-quick-btn {
    padding: 5px 12px;
    border-radius: 14px;
    border: 1px solid rgba(167, 139, 250, 0.4);
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
    font-size: 12px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-quick-btn:hover {
    background: rgba(167, 139, 250, 0.25);
    border-color: rgba(167, 139, 250, 0.6);
    transform: translateY(-1px);
}

.ai-quick-btn:active {
    transform: translateY(0);
}

/* ----- 채팅 메시지 스타일 ----- */
.ai-message {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
    padding: 12px;
    border-radius: 12px;
}

/* 사용자 메시지 */
.ai-message-user {
    background: linear-gradient(135deg, rgba(0, 255, 242, 0.1), rgba(0, 255, 242, 0.05));
    border: 1px solid rgba(0, 255, 242, 0.3);
    margin-left: 20px;
}

/* AI 메시지 */
.ai-message-assistant {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.08), rgba(255, 0, 255, 0.02));
    border: 1px solid rgba(255, 0, 255, 0.2);
    margin-right: 20px;
}

/* 발신자 라벨 */
.ai-message-label {
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.ai-message-user .ai-message-label {
    color: var(--neon-cyan);
}

.ai-message-assistant .ai-message-label {
    color: var(--neon-pink);
}

/* 메시지 내용 */
.ai-message-content {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    word-break: break-word;
}

/* 기능 배지 */
.ai-feature-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 8px;
    background: rgba(255, 0, 255, 0.15);
    color: var(--neon-pink);
    font-family: var(--font-mono);
    border: 1px solid rgba(255, 0, 255, 0.3);
}

/* 타이핑 인디케이터 (로딩 애니메이션) */
.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.ai-typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--neon-pink);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.5);
}

.ai-typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 로딩 메시지 */
.ai-message-loading {
    opacity: 0.8;
}

/* 경고 메시지 (부적절한 발언) */
.ai-message-warning {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.15), rgba(255, 50, 50, 0.08)) !important;
    border: 1px solid rgba(255, 100, 100, 0.4) !important;
}

.ai-message-warning .ai-message-label {
    color: #ff6b6b !important;
}

.ai-message-warning .ai-message-content {
    color: #ffcccc;
}

/* AI 응답 코드 블록 */
.ai-code-block {
    background: #1a1a2e;
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
}

.ai-code-block code {
    background: transparent;
    padding: 0;
    color: #e0e0e0;
    font-family: var(--font-mono);
}

/* 인라인 코드 */
.ai-inline-code {
    background: rgba(0, 255, 242, 0.1);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--neon-cyan);
}

/* ----- 입력 영역 ----- */
.ai-input-area {
    padding: 12px;
    border-top: 1px solid rgba(0, 255, 242, 0.2);
    background: var(--bg-secondary);
}

.ai-input-wrapper {
    display: flex;
    gap: 8px;
}

#aiChatInput {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 255, 242, 0.3);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    resize: none;
    font-family: var(--font-body);
    font-size: 13px;
    transition: all 0.2s ease;
}

#aiChatInput:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.2);
}

#aiChatInput::placeholder {
    color: var(--text-muted);
}

.ai-send-btn {
    background: linear-gradient(135deg, #ff00ff, #00fff2);
    border: none;
    color: #0a0e17;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 60px;
}

.ai-send-btn:hover {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5), 0 0 30px rgba(0, 255, 242, 0.3);
    transform: translateY(-2px);
}

.ai-send-btn:active {
    transform: translateY(0);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #4a5568;
}

.ai-send-btn:disabled:hover {
    box-shadow: none;
    transform: none;
}

/* ----- 로딩 애니메이션 ----- */
.ai-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
}

.ai-loading-dots {
    display: flex;
    gap: 4px;
}

.ai-loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
}

.ai-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.3;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* ========================================
   AI 피드백 UI 스타일 (학생 상세 페이지)
   ======================================== */

/* 피드백 생성 버튼 */
.btn-generate-feedback {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2) 0%, rgba(255, 0, 255, 0.1) 100%);
    border: 1px solid var(--neon-pink);
    border-radius: 4px;
    color: var(--neon-pink);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-generate-feedback:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3) 0%, rgba(255, 0, 255, 0.15) 100%);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.btn-generate-feedback:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 피드백 로딩 */
.feedback-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* 피드백 표시 영역 */
.feedback-display {
    animation: fadeIn 0.5s ease;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 255, 242, 0.05);
    border: 1px solid rgba(0, 255, 242, 0.15);
    border-radius: 4px;
    margin-bottom: 24px;
}

.feedback-date,
.feedback-period {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.feedback-date {
    color: var(--neon-cyan);
}

/* 피드백 섹션 */
.feedback-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

.feedback-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.feedback-section h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
}

.feedback-section p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

.feedback-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-section ul li {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 8px 0 8px 20px;
    position: relative;
    line-height: 1.6;
}

.feedback-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-weight: bold;
}

/* 스킬 바 */
.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-bar-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.skill-score {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-cyan);
    font-weight: 600;
}

.skill-bar-bg {
    width: 100%;
    height: 10px;
    background: var(--bg-primary);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 242, 0.2);
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
    border-radius: 5px;
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
    animation: skillBarGlow 2s ease-in-out infinite;
}

@keyframes skillBarGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 242, 0.8);
    }
}

/* 추천 문제 카드 */
.recommended-problems {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.recommended-problem-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 242, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.recommended-problem-card:hover {
    background: rgba(0, 255, 242, 0.05);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 242, 0.2);
}

.recommended-problem-card .problem-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--neon-cyan);
    font-weight: 600;
    margin-bottom: 8px;
}

.recommended-problem-card .problem-reason {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 부적절 발언 알림 */
.inappropriate-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 6px;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--error);
}

.inappropriate-alert span {
    font-weight: 700;
    color: var(--error);
}

.inappropriate-alert button {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--error);
    border-radius: 4px;
    color: var(--error);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.inappropriate-alert button:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* 데이터 없음 표시 */
.no-data {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
    font-size: 0.9rem;
}
