@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg-dark: #050508; --panel-bg: rgba(15, 25, 40, 0.95);
    --text-main: #ffffff; --text-sub: #aaaaaa; --border-color: #333333;
    --neon-blue: #00d9ff; --neon-gold: #ffcc00; --neon-purple: #b53cff;
    --neon-red: #ff3c3c; --nav-bg: #0a0a10;
}

[data-theme="light"] {
    --bg-dark: #f4f5f7; --panel-bg: #ffffff;
    --text-main: #1a1a1a; --text-sub: #666666; --border-color: #dddddd;
    --neon-blue: #0066cc; --neon-gold: #d4a017; --neon-purple: #8a2be2;
    --neon-red: #dc3545; --nav-bg: #ffffff;
}

body {
    background-color: var(--bg-dark); color: var(--text-main);
    font-family: 'Pretendard', -apple-system, sans-serif;
    margin: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); 
    display: flex; flex-direction: column; height: 100vh; height: 100dvh;
    box-sizing: border-box; overflow: hidden; transition: background-color 0.3s, color 0.3s;
}

#login-screen {
    display: flex; flex-direction: column; align-items: center;
    padding: 0; box-sizing: border-box; transition: background-color 0.3s;
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 100;
    background: linear-gradient(180deg, #0a0a14 0%, #1a1a2e 50%, #0f0f1a 100%);
}

/* 상단 로고 영역 */
.login-top-logo {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 18px 0; width: 100%; border-bottom: 1px solid rgba(0,217,255,0.1);
}
.login-logo-icon { font-size: 1.4rem; }
.login-logo-text { font-size: 1.2rem; font-weight: 900; color: #ffffff; letter-spacing: 2px; }
.login-logo-sub { font-size: 0.85rem; font-weight: 600; color: rgba(0,217,255,0.7); letter-spacing: 1px; }

/* 브랜드 배지 */
.login-brand-badge {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 3px; color: rgba(255,204,0,0.6);
    margin-bottom: 12px; text-transform: uppercase;
}

/* 중앙 콘텐츠 */
.login-center {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; max-width: 400px; padding: 0 30px; box-sizing: border-box;
}
.login-hero-title {
    font-size: 1.65rem; font-weight: 800; color: #ffffff; text-align: center;
    line-height: 1.4; margin: 0 0 40px 0; word-break: keep-all;
}

/* Google 로그인 버튼 */
.login-google-btn {
    width: 100%; padding: 14px 20px; border-radius: 50px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7); font-size: 0.95rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    cursor: pointer; transition: all 0.2s;
}
.login-google-btn:active { background: rgba(0,217,255,0.1); border-color: rgba(0,217,255,0.3); }

/* 구분선 */
.login-divider {
    display: flex; align-items: center; width: 100%; margin: 20px 0;
    color: rgba(255,255,255,0.35); font-size: 0.8rem;
}
.login-divider::before, .login-divider::after {
    content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.12);
}
.login-divider span { padding: 0 16px; }

/* 이메일 입력 */
.login-input {
    width: 100%; padding: 14px 16px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15); background: transparent;
    color: #ffffff; box-sizing: border-box; outline: none; font-size: 0.95rem;
    margin-bottom: 10px;
}
.login-input::placeholder { color: rgba(255,255,255,0.35); }
.login-input:focus { border-color: rgba(255,255,255,0.4); }
[data-theme="light"] .login-input { background: rgba(255,255,255,0.8); }
.hint-text { font-size: 0.7rem; color: #ff6b6b; text-align: left; margin-top: -6px; margin-bottom: 10px; padding-left: 5px; transition: color 0.3s; }
.hint-text.valid { color: #4ecdc4; }
.disclaimer-text { font-size: 0.65rem; color: #888; text-align: left; margin-bottom: 15px; padding: 0 5px; line-height: 1.3; }

/* 약관 텍스트 */
.login-terms {
    font-size: 0.75rem; color: rgba(255,255,255,0.4); text-align: center;
    line-height: 1.6; margin-top: 24px; word-break: keep-all; padding: 0 10px;
}
.login-terms a { color: rgba(255,255,255,0.6); text-decoration: underline; }

.login-toggle { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-top: 16px; cursor: pointer; text-decoration: underline; }

/* 하단 사명 */
.login-bottom-brand {
    padding: 20px 0 40px 0; text-align: center;
}
.login-bottom-brand-name {
    font-size: 1.1rem; font-weight: 800; color: rgba(255,255,255,0.3);
    letter-spacing: 4px;
}
.login-bottom-brand-tagline {
    font-size: 0.6rem; font-weight: 600; color: rgba(0,217,255,0.25);
    letter-spacing: 2px; margin-top: 4px;
}

#app-container { flex-direction: column; width: 100%; height: 100%; }
header { padding: 12px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: var(--panel-bg); z-index: 10; }
#sys-title { font-weight: 900; letter-spacing: 1px; font-size: 1.1rem; }
.level-badge { background: var(--neon-blue); color: #fff; font-weight: bold; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; }
main { flex-grow: 1; overflow-y: auto; padding: 15px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.view-section { display: none; animation: fadeIn 0.3s ease; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.system-card { background: var(--panel-bg); border: 1px solid var(--border-color); padding: 15px; border-radius: 10px; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
h2 { font-size: 1rem; color: var(--neon-blue); margin-top: 0; margin-bottom: 12px; text-transform: uppercase; }

.profile-compact-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.profile-box { display: flex; align-items: center; gap: 12px; }
.profile-image-container { position: relative; width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--neon-blue); background: #222; display: flex; justify-content: center; align-items: center; }
.profile-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.upload-overlay { position: absolute; bottom: -5px; right: -5px; background: var(--neon-blue); width: 20px; height: 20px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 12px; cursor: pointer; border: 2px solid var(--bg-dark); z-index: 5; }

.title-badge { display: inline-block; padding: 2px 6px; font-size: 0.65rem; font-weight: bold; background: linear-gradient(45deg, rgba(181, 60, 255, 0.2), transparent); border: 1px solid var(--neon-purple); color: var(--neon-purple); border-radius: 4px; margin-bottom: 3px; cursor: pointer;}
.name-container { display: flex; align-items: center; gap: 5px; }
.btn-edit-name { background: none; border: none; font-size: 0.8rem; cursor: pointer; padding: 0; color: var(--text-sub); }
.compact-score-box { text-align: right; }
.compact-score-val { font-size: 1.6rem; font-weight: 900; color: var(--neon-blue); line-height: 1; }

.levelup-panel-compact { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 204, 0, 0.05); border: 1px solid var(--neon-gold); padding: 10px 12px; border-radius: 6px; }
.btn-primary { padding: 10px; background: var(--neon-blue); border: none; color: white; font-weight: bold; border-radius: 6px; cursor: pointer; text-align: center; font-size: 0.85rem; width: 100%; transition: 0.2s; }
.btn-levelup-sm { width: auto; padding: 6px 12px; font-size: 0.8rem; }
.btn-primary:disabled { background: #444 !important; color: #888 !important; border-color: #333 !important; cursor: not-allowed; box-shadow: none !important;}

/* 레이더 및 스탯 */
.radar-chart-container { display: flex; justify-content: center; margin: 5px 0 15px 0; }
.radar-chart { width: 100%; max-width: 220px; height: auto; aspect-ratio: 1/1; }
.radar-bg-line { fill: none; stroke: var(--border-color); stroke-width: 0.8; }
.radar-polygon { fill: rgba(0, 217, 255, 0.25); stroke: var(--neon-blue); stroke-width: 2; transition: all 0.6s ease; }
.radar-point { fill: var(--neon-blue); transition: all 0.6s; }
.radar-label { fill: var(--text-sub); font-size: 8px; font-weight: bold; }
.radar-value { fill: var(--neon-blue); font-size: 8px; font-weight: bold; }
.stat-info { display: flex; justify-content: space-between; margin-bottom: 2px; font-size: 0.75rem; font-weight: 500;}
.progress-bg { height: 4px; background: #2a2a2a; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: var(--neon-blue); box-shadow: 0 0 5px var(--neon-blue); transition: width 1s; width: 0%; }
[data-theme="light"] .progress-bg { background: #e0e0e0; }
.pending-stat { color: var(--neon-gold); font-size: 0.7rem; margin-left: 5px; font-weight: bold; }

/* 퀘스트 및 캘린더 */
.quest-list-wrapper { max-height: 350px; overflow-y: auto; padding-right: 5px; scrollbar-width: none; }
.quest-list-wrapper::-webkit-scrollbar { display: none; }
.quest-row { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid var(--border-color); cursor: pointer; border-radius: 6px; }
.quest-row:last-child { border-bottom: none; }
.quest-stat-tag { font-size: 0.6rem; font-weight: bold; padding: 2px 4px; border-radius: 3px; margin-right: 6px; border: 1px solid var(--neon-blue); color: var(--neon-blue); }
.quest-title { font-size: 0.85rem; font-weight: bold; margin-bottom: 2px; display: flex; align-items: center; }
.quest-desc { font-size: 0.7rem; color: var(--text-sub); margin-left: 32px; }
.quest-checkbox { width: 18px; height: 18px; border: 2px solid var(--neon-blue); border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: 0.2s; }
.quest-row.done { opacity: 0.5; }
.quest-row.done .quest-title { text-decoration: line-through; }
.quest-row.done .quest-checkbox { background: var(--neon-gold); border-color: var(--neon-gold); }
.quest-row.done .quest-checkbox::after { content: "✓"; color: #000; font-size: 12px; font-weight: bold; }

.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.85rem; font-weight: bold; color: var(--neon-blue); }
.cal-grid { display: flex; justify-content: space-between; gap: 4px; }
.cal-day { flex: 1; text-align: center; padding: 8px 0; background: rgba(255,255,255,0.02); border-radius: 6px; border: 1px solid var(--border-color); }
.cal-day.today { background: rgba(0, 217, 255, 0.1); border-color: var(--neon-blue); }
.cal-name { font-size: 0.6rem; color: var(--text-sub); margin-bottom: 2px; }
.cal-date { font-size: 1rem; font-weight: bold; color: var(--text-main); }
.cal-score { font-size: 0.65rem; color: var(--neon-gold); margin-top: 3px; }

/* 던전 레이드 UI */
.dungeon-banner { border: 1px solid var(--neon-red); background: rgba(255, 60, 60, 0.05); text-align: center; }
.map-container { width: 100%; height: 180px; border-radius: 6px; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border-color); }
.map-container iframe { width: 100%; height: 100%; border: none; }
.dungeon-active { border: 1px solid var(--neon-blue); background: linear-gradient(180deg, rgba(0, 217, 255, 0.05) 0%, rgba(15, 25, 40, 0.95) 100%); box-shadow: inset 0 0 20px rgba(0, 217, 255, 0.1); position: relative; overflow: hidden; }
.dungeon-active::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue); }
.active-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.blink-text { animation: blink 1.5s infinite; font-weight: 900; letter-spacing: 1px; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
.text-red { color: var(--neon-red); }
.text-blue { color: var(--neon-blue); text-shadow: 0 0 5px rgba(0, 217, 255, 0.5); }
.raid-reward-box { background: rgba(0,0,0,0.4); border: 1px solid rgba(255, 204, 0, 0.25); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.raid-reward-header { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: bold; color: var(--neon-gold); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.08); letter-spacing: 0.5px; }
.raid-reward-icon { font-size: 0.8rem; }
.raid-reward-items { display: flex; flex-direction: column; gap: 4px; }
.raid-reward-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
.raid-reward-key { color: var(--text-sub); }
.raid-reward-val { font-weight: bold; font-family: monospace; }
.text-gold { color: var(--neon-gold); }
.raid-progress-box { background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); padding: 12px; border-radius: 6px; margin-top: 10px; }
.dungeon-timer { font-family: monospace; font-size: 1rem; color: var(--neon-red); background: rgba(255, 60, 60, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--neon-red); }

/* 소셜 랭킹 등 공통 */
.social-header { display: flex; gap: 8px; margin-bottom: 12px; }
.social-tab-btn { flex: 1; padding: 8px; background: transparent; border: 1px solid var(--border-color); color: var(--text-sub); border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-weight: bold; }
.social-tab-btn.active { background: rgba(0, 217, 255, 0.1); border-color: var(--neon-blue); color: var(--neon-blue); }
.rank-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.rank-tabs::-webkit-scrollbar { display: none; }
.rank-tab-btn { white-space: nowrap; padding: 5px 10px; font-size: 0.7rem; background: transparent; border: 1px solid var(--border-color); color: var(--text-sub); border-radius: 20px; }
.rank-tab-btn.active { background: var(--neon-blue); color: #fff; border-color: var(--neon-blue); font-weight: bold;}
.user-card { display: flex; align-items: center; justify-content: space-between; padding: 10px; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); border-radius: 6px; margin-bottom: 8px; }
.user-card.my-rank { border-color: var(--neon-gold); background: rgba(255, 204, 0, 0.05); }
.user-info { flex-grow: 1; margin-left: 10px; }
.user-score { font-weight: 900; color: var(--neon-blue); font-size: 1rem; text-align: right; margin-right: 12px; }
.btn-friend { padding: 4px 8px; font-size: 0.65rem; font-weight: bold; background: transparent; border: 1px solid var(--neon-blue); color: var(--neon-blue); border-radius: 4px; }
.btn-friend.added { background: var(--neon-blue); color: #fff; }

.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }
.setting-row:last-child { border-bottom: none; }
.custom-select { background: transparent; color: var(--text-main); border: 1px solid var(--neon-blue); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; outline: none; }
.custom-select option { background: var(--bg-dark); color: var(--text-main); }
[data-theme="light"] .custom-select { border-color: var(--border-color); color: var(--text-main); }
[data-theme="light"] .custom-select option { background: #ffffff; color: #1a1a1a; }
.switch { position: relative; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 22px; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
input:checked + .slider { background: var(--neon-blue); }
input:checked + .slider:before { transform: translateX(18px); }

nav { position: fixed; bottom: env(safe-area-inset-bottom); width: 100%; height: 65px; background: var(--nav-bg); display: flex; border-top: 1px solid var(--border-color); z-index: 10; }
.nav-item { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 0.6rem; color: var(--text-sub); cursor: pointer; transition: transform 0.15s, background 0.15s; user-select: none; -webkit-user-select: none; }
.nav-item.active { color: var(--neon-blue); }
.nav-icon { font-size: 1.2rem; margin-bottom: 3px; }
.nav-item.nav-dragging { color: var(--neon-blue); transform: scale(1.15) translateY(-6px); background: rgba(0, 217, 255, 0.15); border-radius: 10px; box-shadow: 0 0 14px rgba(0, 217, 255, 0.5); z-index: 20; }
nav.nav-reorder-mode .nav-item:not(.nav-dragging) { opacity: 0.6; }
nav.nav-reorder-mode { border-top-color: var(--neon-blue); }

/* 팝업창 및 가이드 표 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 100; display: none; justify-content: center; align-items: center; backdrop-filter: blur(3px); }
.modal-content { background: var(--panel-bg); border: 1px solid var(--neon-blue); padding: 20px; border-radius: 10px; width: 85%; max-height: 70vh; display: flex; flex-direction: column; }
.modal-header { font-size: 1.1rem; font-weight: bold; color: var(--neon-blue); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.modal-close { background: none; border: none; color: var(--text-sub); font-size: 1.5rem; cursor: pointer; }
.history-list { overflow-y: auto; flex-grow: 1; }
.history-item { padding: 10px 0; border-bottom: 1px dashed var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.history-item:last-child { border-bottom: none; }
.hist-lvl { color: var(--neon-gold); font-weight: bold; font-size: 0.75rem; }
.hist-title { color: var(--text-main); font-size: 0.9rem; font-weight: bold; }

.btn-info-sm {
    background: rgba(0, 217, 255, 0.1); border: 1px solid var(--neon-blue); color: var(--neon-blue);
    border-radius: 4px; padding: 2px 6px; font-size: 0.65rem; cursor: pointer; display: flex; align-items: center; gap: 3px;
}
.info-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; color: var(--text-main); margin-top: 10px; }
.info-table th, .info-table td { border: 1px solid var(--border-color); padding: 8px; text-align: left; word-break: keep-all; }
.info-table th { background: var(--bg-dark); color: var(--neon-blue); font-weight: bold; position: sticky; top: -1px; z-index: 5; box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.info-table tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* 플래너 주간 캘린더 선택일 */
.cal-day.planner-selected { background: rgba(255, 204, 0, 0.15); border-color: var(--neon-gold); }
.cal-day.planner-selected .cal-name,
.cal-day.planner-selected .cal-date { color: var(--neon-gold); }

/* 플래너 탭 바 */
.planner-tab-bar { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.planner-tab-btn {
    flex: 1; padding: 10px 0; font-size: 0.85rem; font-weight: bold; color: var(--text-sub);
    background: transparent; border: none; border-bottom: 2px solid transparent;
    cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
}
.planner-tab-btn.active { color: var(--neon-gold); border-bottom-color: var(--neon-gold); }
.planner-tab-btn:not(.active):hover { color: var(--text-main); }
.planner-tab-content { display: none; }
.planner-tab-content.active { display: block; }

/* 플래너 통합 태스크 목록 */
.planner-section-title { font-size: 0.65rem; font-weight: bold; color: var(--neon-blue); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.planner-unified-box { margin-bottom: 10px; }
.planner-task-item { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.task-rank-btn {
    width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-sub); cursor: pointer; font-size: 0.8rem; font-weight: bold;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
    padding: 0;
}
.task-rank-btn.ranked { border-color: var(--neon-gold); background: rgba(255,204,0,0.15); color: var(--neon-gold); }
.task-rank-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.planner-task-input {
    flex: 1; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color);
    border-radius: 4px; color: var(--text-main); padding: 7px 10px; font-size: 0.88rem;
    outline: none; box-sizing: border-box; font-family: inherit; transition: border-color 0.15s; min-width: 0;
}
.planner-task-input:focus { border-color: var(--neon-gold); background: rgba(255,204,0,0.03); }
.planner-task-input::placeholder { color: var(--text-sub); }
.planner-task-input:disabled { opacity: 0.4; cursor: not-allowed; }
.task-remove-btn {
    width: 20px; height: 20px; flex-shrink: 0; border: none; background: transparent;
    color: var(--neon-red); cursor: pointer; font-size: 1rem; padding: 0; line-height: 1;
}
.btn-add-task {
    font-size: 0.8rem; padding: 4px 12px; border: 1px solid var(--neon-blue);
    background: rgba(0,217,255,0.08); color: var(--neon-blue); border-radius: 4px; cursor: pointer;
}
.btn-add-task:disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="light"] .planner-task-input { background: rgba(0,0,0,0.02); }

/* 타임박스 그리드 헤더 */
.timebox-grid-header { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; padding: 0 1px; }
.timebox-hour-col { width: 44px; flex-shrink: 0; }
.timebox-col-header { flex: 1; text-align: center; font-size: 0.78rem; color: var(--neon-blue); font-weight: bold; letter-spacing: 1px; }

/* 플래너 타임박스 그리드 - 두 열 레이아웃 */
.planner-timebox-grid { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; scrollbar-width: none; padding-right: 2px; }
.planner-timebox-grid::-webkit-scrollbar { display: none; }
.timebox-row { display: flex; align-items: center; gap: 4px; }
.timebox-label { font-size: 0.8rem; color: var(--neon-blue); font-family: monospace; width: 48px; flex-shrink: 0; font-weight: bold; text-align: right; }
.timebox-select {
    flex: 1; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color);
    border-radius: 4px; color: var(--text-main); padding: 5px 5px; font-size: 0.8rem;
    outline: none; font-family: inherit; transition: border-color 0.15s, background 0.15s; min-width: 0;
    cursor: pointer; appearance: none; -webkit-appearance: none;
}
.timebox-select:focus { border-color: var(--neon-blue); background: rgba(0,217,255,0.03); }
.timebox-select.has-content { border-color: rgba(255, 204, 0, 0.5); background: rgba(255, 204, 0, 0.03); }
.timebox-select:disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="light"] .timebox-select { background: rgba(0,0,0,0.02); }
[data-theme="light"] .timebox-select.has-content { background: rgba(212,160,23,0.05); }

/* 무드 버튼 (플래너 재사용) */
.diary-mood-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border-color);
    background: transparent; font-size: 1.1rem; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.diary-mood-btn:hover, .diary-mood-btn.selected { border-color: var(--neon-gold); background: rgba(255,204,0,0.1); transform: scale(1.15); }
#diary-text:focus { border-color: var(--neon-blue); }

.d-none { display: none !important; }
.d-flex { display: flex !important; }

/* 작은 화면 대응 */
@media (max-height: 700px) {
    #status .system-card { padding: 10px; margin-bottom: 8px; }
    #status h2 { margin-bottom: 6px; }
    .radar-chart-container { margin: 0 0 5px 0; }
    .radar-chart { max-width: 175px; } 
    .stat-info { margin-bottom: 0px; font-size: 0.7rem; }
    .progress-bg { margin-bottom: 4px; height: 3px; }
    .compact-score-val { font-size: 1.3rem; }
}

/* ★ 추가됨: 소셜 탭 인스타그램 아이콘 스타일 ★ */
.social-insta-btn {
    font-size: 1rem; margin-left: 5px; cursor: pointer; transition: transform 0.2s; display: inline-block; vertical-align: middle;
}
.social-insta-btn:active { transform: scale(1.2); }

/* 로그 뷰어 */
.log-entry { padding: 6px 0; border-bottom: 1px solid var(--border-color); line-height: 1.4; }
.log-entry:last-child { border-bottom: none; }
.log-level { font-weight: bold; font-size: 0.68rem; margin-right: 4px; }
.log-time { color: var(--text-sub); font-size: 0.65rem; }
.log-msg { color: var(--text-main); font-size: 0.72rem; margin-top: 2px; word-break: break-all; }

/* ===== 스트릭 뱃지 ===== */
.streak-badge {
    display: flex; align-items: center; gap: 3px;
    background: linear-gradient(135deg, rgba(255,100,0,0.15), rgba(255,60,60,0.1));
    border: 1px solid #ff6a00; border-radius: 4px;
    padding: 3px 8px; font-size: 0.75rem; font-weight: 900;
    color: #ff6a00; white-space: nowrap;
}
.streak-badge.fire { animation: streakPulse 2s infinite; border-color: #ff4500; color: #ff4500; background: linear-gradient(135deg, rgba(255,69,0,0.25), rgba(255,0,0,0.15)); }
.streak-icon { font-size: 0.85rem; }
@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255,69,0,0.3); }
    50% { box-shadow: 0 0 12px rgba(255,69,0,0.6); }
}

/* ===== 보스 HP 바 ===== */
.boss-hp-bar-container { margin: 12px 0; }
.boss-hp-label { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 4px; }
.boss-hp-bar-bg { height: 14px; background: #2a2a2a; border-radius: 7px; overflow: hidden; position: relative; border: 1px solid var(--border-color); }
.boss-hp-bar-fill {
    height: 100%; border-radius: 7px; transition: width 0.8s ease;
    background: linear-gradient(90deg, #ff3c3c, #ff6a00);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 0 8px rgba(255,60,60,0.3);
}
.boss-rush-banner {
    background: linear-gradient(135deg, rgba(255,204,0,0.15), rgba(255,100,0,0.1));
    border: 1px solid var(--neon-gold); border-radius: 6px;
    padding: 6px 10px; margin-bottom: 10px; text-align: center;
    font-size: 0.75rem; font-weight: bold; color: var(--neon-gold);
    animation: bossRushGlow 2s infinite;
}
@keyframes bossRushGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(255,204,0,0.2); }
    50% { box-shadow: 0 0 14px rgba(255,204,0,0.5); }
}
.boss-damage-flash { animation: damageFlash 0.4s ease; }
@keyframes damageFlash {
    0% { filter: brightness(1); } 25% { filter: brightness(2) hue-rotate(-15deg); } 100% { filter: brightness(1); }
}
[data-theme="light"] .boss-hp-bar-bg { background: #e0e0e0; }

/* ===== 크리티컬 히트 플래시 ===== */
.critical-flash {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,204,0,0.3) 0%, transparent 70%);
    z-index: 200; pointer-events: none;
}
.critical-flash.show { animation: critFlash 0.6s ease-out forwards; display: block !important; }
@keyframes critFlash {
    0% { opacity: 1; } 100% { opacity: 0; }
}

/* ===== 루트 드롭 모달 ===== */
.loot-modal-content { border-color: var(--neon-gold) !important; }
.loot-tier-label {
    font-size: 0.7rem; font-weight: 900; letter-spacing: 2px;
    padding: 2px 10px; border-radius: 3px; display: inline-block; margin-bottom: 10px;
}
.loot-tier-label.common { background: rgba(170,170,170,0.2); color: #aaa; border: 1px solid #aaa; }
.loot-tier-label.uncommon { background: rgba(0,180,0,0.15); color: #00cc66; border: 1px solid #00cc66; }
.loot-tier-label.rare { background: rgba(0,140,255,0.15); color: #0099ff; border: 1px solid #0099ff; }
.loot-tier-label.legendary { background: rgba(255,204,0,0.2); color: var(--neon-gold); border: 1px solid var(--neon-gold); animation: legendaryGlow 1.5s infinite; }
@keyframes legendaryGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255,204,0,0.3); }
    50% { box-shadow: 0 0 20px rgba(255,204,0,0.7); }
}
.loot-icon { font-size: 3rem; margin: 10px 0; animation: lootBounce 0.5s ease; }
@keyframes lootBounce { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.loot-name { font-size: 1rem; font-weight: bold; color: var(--text-main); margin-bottom: 5px; }
.loot-desc { font-size: 0.8rem; color: var(--text-sub); }

/* ===== 크리티컬 퀘스트 행 하이라이트 ===== */
.quest-row.critical-reward { animation: criticalRowFlash 1s ease; }
@keyframes criticalRowFlash {
    0% { background: transparent; } 30% { background: rgba(255,204,0,0.3); } 100% { background: transparent; }
}
