* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
body { font-family: 'Segoe UI', sans-serif; background: #f0f2f5; color: #333; }

/* Navigation */
.nav { position: fixed; top: 0; left: 0; right: 0; background: #1a1a2e; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 56px; z-index: 100; }
.nav-logo { font-size: 20px; font-weight: 700; color: #6c9fff; letter-spacing: 1px; text-decoration: none; }
.nav-links { display: flex; gap: 8px; }
.nav-links a { background: none; border: 1px solid rgba(255,255,255,0.2); color: #ccc; padding: 6px 14px; border-radius: 6px; font-size: 13px; transition: all 0.2s; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { background: #6c9fff; color: #fff; border-color: #6c9fff; }

/* Page container */
.page-container { margin-top: 56px; display: flex; justify-content: center; padding: 32px; }
.page-content { width: 100%; max-width: 1100px; background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); overflow: hidden; padding: 40px; }

/* Common */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.input-group input, .input-group select { width: 100%; height: 44px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; padding: 0 14px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.input-group input:focus, .input-group select:focus { border-color: #4A6CF7; background: #fff; }
.input-group textarea { width: 100%; min-height: 80px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; padding: 12px 14px; font-size: 14px; outline: none; resize: vertical; }
.input-group textarea:focus { border-color: #4A6CF7; background: #fff; }

.btn-primary { background: #4A6CF7; color: #fff; border: none; padding: 12px 32px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; transition: background 0.2s; }
.btn-primary:hover { background: #3a5ce5; }
.btn-secondary { background: #f0f0f0; color: #555; border: 1px solid #ddd; padding: 10px 24px; border-radius: 8px; font-size: 14px; cursor: pointer; transition: background 0.2s; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-danger { background: #ff4757; color: #fff; border: none; padding: 10px 24px; border-radius: 8px; font-size: 14px; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.btn-danger:hover { background: #e8364a; }

.input-disabled { color: #bbb; }
.form-btn-group { display: flex; gap: 12px; margin-top: 8px; }
.form-btn-group .btn-primary { width: auto; padding: 10px 32px; }
.form-footer { display: flex; justify-content: flex-end; }

/* 모달 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 12px; padding: 32px; width: 360px; }
.modal-box h3 { margin-bottom: 16px; }
.modal-box p { color: #666; font-size: 14px; margin-bottom: 20px; }
.modal-btn-group { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }

.divider { height: 1px; background: #eee; margin: 24px 0; }
.text-center { text-align: center; }
.text-muted { color: #999; font-size: 13px; }
.tag { display: inline-block; background: #e8f0fe; color: #4285f4; padding: 4px 10px; border-radius: 12px; font-size: 12px; margin: 2px; }

/* Auth pages */
.auth-container { max-width: 420px; margin: 0 auto; padding: 60px 0; }
.auth-logo { text-align: center; font-size: 32px; font-weight: 800; color: #4A6CF7; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: #999; font-size: 14px; margin-bottom: 40px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: #999; }
.auth-footer a { color: #4A6CF7; text-decoration: none; font-weight: 600; }

/* Interview setup */
.setup-container { max-width: 560px; margin: 0 auto; }
.setup-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.setup-subtitle { text-align: center; color: #999; font-size: 14px; margin-bottom: 36px; }
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-mock { padding: 10px 20px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.radio-mock:hover { border-color: #6c9fff; }
.radio-mock.selected { border-color: #4A6CF7; background: #f0f4ff; color: #4A6CF7; font-weight: 600; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stack-tag { padding: 6px 14px; background: #f0f4ff; border: 1px solid #d0dcff; border-radius: 20px; font-size: 13px; color: #4A6CF7; display: flex; align-items: center; gap: 4px; }
.permission-check { display: flex; gap: 16px; margin-top: 16px; }
.perm-item { flex: 1; background: #f8f9fa; border-radius: 8px; padding: 16px; text-align: center; border: 1px solid #eee; }
.perm-icon { font-size: 28px; margin-bottom: 8px; }
.perm-status { font-size: 12px; color: #2ed573; font-weight: 600; }

/* Interview page */
.interview-page { padding: 12px 16px !important; }
.interview-page-container { padding: 8px 16px; }
.interview-layout { display: grid; grid-template-columns: 1fr 380px; gap: 12px; }
.webcam-wrapper { display: flex; flex-direction: column; height: 510px; }
.webcam-topbar { display: flex; align-items: center; justify-content: space-between; background: #1a1a2e; border-radius: 12px 12px 0 0; padding: 10px 16px; color: #fff; }
.webcam-area { background: #1a1a2e; color: #fff; flex: 1; position: relative; overflow: hidden; }
.webcam-area video { width: 100%; height: 100%; object-fit: contain; position: absolute; top: 0; left: 0; transform: scaleX(-1); }
#landmark-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: scaleX(-1); pointer-events: none; display: none; }
.webcam-status { display: flex; gap: 8px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.green { background: #2ed573; }
.status-dot.blue { background: #4A6CF7; }
.status-dot.red { background: #ff4757; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.status-label { font-size: 11px; color: rgba(255,255,255,0.7); }
.timer-badge { background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.attitude-bar { background: #1a1a2e; border-radius: 0 0 12px 12px; padding: 10px 16px; display: flex; flex-direction: column; gap: 6px; color: #fff; }
.attitude-row { display: flex; align-items: center; gap: 8px; }
.attitude-icon { font-size: 14px; width: 20px; text-align: center; }
.attitude-label { font-size: 11px; color: rgba(255,255,255,0.8); width: 28px; flex-shrink: 0; }
.attitude-meter { flex: 1; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.attitude-meter-fill { height: 100%; background: linear-gradient(90deg, #2ed573, #4A6CF7); border-radius: 3px; transition: width 0.5s ease; }
.attitude-value { font-size: 12px; font-weight: 600; color: #fff; width: 36px; text-align: right; flex-shrink: 0; }
.chat-panel { display: flex; flex-direction: column; background: #f8f9fa; border-radius: 12px; border: 1px solid #eee; height: 510px; }
.chat-header { padding: 16px; border-bottom: 1px solid #eee; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.chat-messages { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-messages::-webkit-scrollbar { display: none; }
.chat-messages { scrollbar-width: none; }
.chat-bubble { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; max-width: 90%; }
.chat-bubble.ai { background: #fff; border: 1px solid #e0e0e0; align-self: flex-start; }
.chat-bubble.user { background: #4A6CF7; color: #fff; align-self: flex-end; }
.chat-input-area { padding: 12px 16px; border-top: 1px solid #eee; display: flex; gap: 8px; align-items: center; }
.stt-indicator { display: flex; align-items: center; gap: 6px; flex: 1; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #999; }
.stt-wave { display: flex; gap: 2px; align-items: center; }
.stt-wave span { width: 3px; background: #4A6CF7; border-radius: 2px; animation: wave 0.6s ease-in-out infinite alternate; }
.stt-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
.stt-wave span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.stt-wave span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.stt-wave span:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.stt-wave span:nth-child(5) { height: 8px; animation-delay: 0.4s; }
.interim-span {color:#999;}
@keyframes wave { to { height: 4px; } }

/* STT 하단 영역 */
.stt-bottom-area { margin-top: 10px; background: #fff; border-radius: 12px; border: 1px solid #eee; padding: 12px 16px; flex-shrink: 0; }
.stt-final-box { min-height: 60px; padding: 10px 14px; background: #f8f9fa; border-radius: 8px; border: 1px solid #ddd; font-size: 15px; line-height: 1.6; color: #333; word-break: keep-all; }
.stt-interim-box { margin-top: 8px; min-height: 60px; padding: 10px 14px; background: #fafafa; border-radius: 8px; border: 1px dashed #ddd; font-size: 15px; color: #999; line-height: 1.6; word-break: keep-all; }
.stt-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; justify-content: flex-end; }
.stt-hint { font-size: 11px; color: #999; }

/* 세션 완료 모달 */
.session-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.session-modal { background: #fff; border-radius: 16px; padding: 40px 32px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.session-modal-icon { font-size: 48px; margin-bottom: 16px; }
.session-modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: #1a1a2e; }
.session-modal-desc { font-size: 14px; color: #666; margin-bottom: 24px; }
.session-modal-btn { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }

/* 답변 토글 버튼 */
#toggle-btn { width: 120px; padding: 10px 0; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; color: #fff; transition: background 0.2s, box-shadow 0.2s; }
#toggle-btn.btn-primary { background: #4A6CF7; }
#toggle-btn.btn-primary:hover { background: #3a5ce5; }
#toggle-btn.btn-danger { background: #ff4757; box-shadow: 0 0 12px rgba(255,71,87,0.5); animation: pulse-btn 1.2s infinite; }
#toggle-btn.btn-danger:hover { background: #e8364a; }
#toggle-btn:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; animation: none; }
@keyframes pulse-btn { 0%, 100% { box-shadow: 0 0 12px rgba(255,71,87,0.5); } 50% { box-shadow: 0 0 20px rgba(255,71,87,0.8); } }

/* Feedback page */
.feedback-header { text-align: center; margin-bottom: 32px; }
.feedback-header h2 { font-size: 22px; margin-bottom: 8px; }
.score-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 32px; }
.score-card { background: #f8f9fa; border-radius: 12px; padding: 24px; text-align: center; border: 1px solid #eee; }
.score-card .score-label { font-size: 13px; color: #888; margin-bottom: 8px; }
.score-card .score-value { font-size: 36px; font-weight: 800; }
.score-card .score-max { font-size: 14px; color: #999; }
.score-card.overall .score-value { color: #6c9fff; }
.score-card.tech .score-value { color: #4A6CF7; }
.score-card.logic .score-value { color: #2ed573; }
.score-card.keyword .score-value { color: #ffa502; }
.score-card.attitude .score-value { color: #ff6348; }
.feedback-section { margin-bottom: 24px; }
.feedback-section h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.feedback-list { list-style: none; }
.feedback-list li { padding: 10px 16px; background: #f8f9fa; border-radius: 8px; margin-bottom: 8px; font-size: 14px; line-height: 1.5; border-left: 3px solid; }
.feedback-list li.strength { border-left-color: #2ed573; }
.feedback-list li.improve { border-left-color: #ff6348; }
.bar-chart { display: flex; align-items: flex-end; gap: 16px; height: 160px; padding: 0 40px; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar { width: 100%; border-radius: 8px 8px 0 0; }
.bar-label { font-size: 12px; color: #888; }

/* + Feedback page: detail */
/* 로딩 오버레이 */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    gap: 16px;
    color: #888;
    font-size: 14px;
}
.spinner {
    width: 40px; height: 40px;
    border: 4px solid #eee;
    border-top-color: #4A6CF7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 에러 */
.error-box {
    background: #fff0f0;
    border: 1px solid #ffcdd2;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #c62828;
    font-size: 14px;
}

/* 종합 코멘트 */
.overall-comment {
    background: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}
.overall-comment .comment-label {
    font-size: 16px;
    font-weight: 600;
    color: #4A6CF7;
    margin-bottom: 12px;
}

/* 태도 코멘트 */
.posture-comment-box {
    background: #fff8f0;
    border: 1px solid #ffe0b2;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}
.posture-comment-box .comment-label {
    font-size: 16px;
    font-weight: 600;
    color: #ff6348;
    margin-bottom: 12px;
}

/* 질문별 피드백 아코디언 */
.question-item {
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}
.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    background: #f8f9fa;
    transition: background 0.15s;
    user-select: none;
}
.question-header:hover { background: #f0f2f5; }
.question-header .q-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
}
.question-header .q-score {
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-right: 10px;
}
.q-score.high { background: #e8f8f0; color: #2ed573; }
.q-score.mid  { background: #fff8e8; color: #f0a030; }
.q-score.low  { background: #ffe8e8; color: #ff4757; }
.question-header .q-toggle {
    font-size: 12px;
    color: #aaa;
    transition: transform 0.2s;
}
.question-header.open .q-toggle { transform: rotate(180deg); }

.question-body {
    display: none;
    padding: 16px 18px;
    border-top: 1px solid #eee;
}
.question-body.open { display: block; }

.q-section { margin-bottom: 14px; }
.q-section:last-child { margin-bottom: 0; }
.q-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.q-section-text {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 14px;
}
.q-section-text.model {
    background: #f0f7ff;
    border-left: 3px solid #4A6CF7;
}
.q-section-text.comment {
    background: #f8f0ff;
    border-left: 3px solid #a55eea;
}
.q-section-text.answer {
    background: #f0fff4;
    border-left: 3px solid #2ed573;
}

/* 차트 섹션 */
.chart-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #eee;
}
.chart-section h3 { font-size: 14px; margin-bottom: 16px; }

/* 피드백 페이지 하단 버튼 그룹 */
.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}
.feedback-actions .btn-primary,
.feedback-actions .btn-secondary {
    display: inline-block;
    text-decoration: none;
    width: 180px;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}

/* 바 차트 값 표시 */
.bar-item .bar-value {
    font-size: 11px;
    color: #666;
    font-weight: 600;
}


/* History page */
.history-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.history-table th { background: #f8f9fa; padding: 12px 16px; font-size: 13px; color: #666; text-align: left; border-bottom: 2px solid #eee; }
.history-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.history-table tr:hover td { background: #f8f9fa; }
.score-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.score-badge.high { background: #e8f8f0; color: #2ed573; }
.score-badge.mid { background: #fff8e8; color: #f0a030; }
.score-badge.low { background: #ffe8e8; color: #ff4757; }

.btn-detail { color: #4A6CF7; font-size: 13px; font-weight: 600; text-decoration: none; }
.btn-detail:hover { text-decoration: underline; }

.badge-new { display: inline-block; background: #e8f0fe; color: #4A6CF7; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.tr-new td { background: #f0f7ff; }
.tr-new:hover td { background: #e6f0ff; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.pagination button { background: #f0f0f0; border: 1px solid #ddd; border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; transition: background 0.2s; }
.pagination button:hover { background: #e0e0e0; }
.pagination button.active { background: #4A6CF7; color: #fff; border-color: #4A6CF7; }

/* Mypage */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.profile-card { background: #f8f9fa; border-radius: 12px; padding: 32px; text-align: center; border: 1px solid #eee; height: fit-content; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; background: #e0e0e0; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-email { font-size: 13px; color: #999; margin-bottom: 20px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-item { background: #fff; border-radius: 8px; padding: 12px; border: 1px solid #eee; }
.stat-value { font-size: 20px; font-weight: 700; color: #4A6CF7; }
.stat-label { font-size: 11px; color: #999; }
.profile-form { background: #f8f9fa; border-radius: 12px; padding: 32px; border: 1px solid #eee; }
.profile-form h3 { font-size: 16px; margin-bottom: 20px; }
