/* style.css */

:root {
    --primary-color: #364d79;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #1a202c;
    --text-sub: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 상단 정보 바 — interview.html의 상태 바와 동일한 레이아웃(좌: 사용자 정보 / 우: 이동 버튼) */
.user-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.premium-badge {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.75rem;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: 8px;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}
.btn-logout:hover { background-color: #f7fafc; color: #1a202c; }

/* 타이틀 — interview.html의 .app-header/.app-title과 동일한 크기로 통일 */
.premium-header { text-align: center; margin: 24px 0 8px; }
.premium-title  { font-size: 2rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }

/* 필터 바 */
.filter-bar {
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.filter-group { display: flex; gap: 10px; }
.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #4a5568;
}
.btn-random {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-random:hover { background: #f0f4ff; }

/* 문제 카드 */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}
.card-header-info { font-size: 0.9rem; color: var(--text-sub); margin-bottom: 10px; }
.card-question    { font-size: 1.3rem; font-weight: 500; margin-bottom: 30px; }

/* 보기 버튼 */
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice-btn {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}
.choice-btn:hover { border-color: var(--primary-color); }
.choice-num {
    width: 26px; height: 26px;
    background: #f1f5f9;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* 카드 푸터 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}
.btn-nav {
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
}
.btn-nav.active  { color: var(--primary-color); border-color: var(--primary-color); font-weight: bold; }
.btn-nav:disabled { opacity: 0.3; }

/* 메인 로그인 컨테이너 중앙 정렬 */
.main-auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    transition: transform 0.3s ease;
}

.auth-header { margin-bottom: 30px; text-align: center; }
.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.auth-header p { color: var(--text-sub); font-size: 0.95rem; }

/* 입력창 */
.input-group  { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper .icon { position: absolute; left: 15px; font-size: 1.1rem; }
.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 1.5px solid #eef0f2;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    background-color: #f9fbff;
}
.input-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(54, 77, 121, 0.1);
}

/* 버튼 공통 */
.main-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    margin-bottom: 10px;
}
.btn-primary:hover { background-color: #2a3d61; transform: translateY(-2px); }

.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}
.btn-secondary:hover { background-color: #f0f4ff; }

/* ★ [추가] 로그인으로 돌아가기 회색 외곽선 버튼 */
.btn-outline {
    background-color: #fff;
    color: var(--text-sub);
    border: 1.5px solid var(--border-color);
    display: block;
}
.btn-outline:hover {
    background-color: #f7fafc;
    color: var(--text-main);
    border-color: #a0aec0;
}

/* ★ [추가] "비밀번호를 잊으셨나요?" 텍스트 링크 버튼 */
.btn-forgot {
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
    transition: color 0.2s;
}
.btn-forgot:hover { color: var(--primary-color); }

.auth-footer-text { margin-top: 20px; font-size: 0.85rem; color: var(--text-sub); text-align: center; }

/* 메인 헤더 */
.main-header {
    background-color: #fff;
    padding: 30px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.main-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    margin: 0;
}

/* 로그아웃 버튼 (index.html 전용) */
.btn-logout-main {
    background-color: transparent;
    border: 1px solid #cbd5e0;
    color: #718096;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
}
.btn-logout-main:hover { background-color: #f7fafc; color: #2d3748; border-color: #a0aec0; }

/* 결과 메시지 */
.result-msg         { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.result-msg.success { color: #2ecc71; }
.result-msg.error   { color: #e74c3c; }

/* 정답 안내 */
.correct-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #4a5568;
}

/* 해설 박스 */
.explanation-box {
    text-align: left;
    background-color: #f0f4ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 4px 12px 12px 4px;
    margin-top: 15px;
}
.exp-title   { font-weight: 700; color: var(--primary-color); margin-bottom: 8px; font-size: 0.95rem; }
.exp-content { font-size: 0.95rem; color: #2d3748; line-height: 1.6; word-break: keep-all; }

/* 페이지 간 이동 버튼 — interview.html의 .btn-nav-link와 동일한 스타일로 통일 */
.btn-admin-outline {
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
}
.btn-admin-outline:hover { background: #f0f4ff; }
.admin-panel-card  { background: #fff5f5; border: 1px solid #feb2b2; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.admin-form-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.full-row          { grid-column: span 3; height: 80px; }
.admin-actions     { margin-top: 15px; display: flex; gap: 10px; }
.btn-ai-gen        { background-color: #805ad5; color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }
.admin-stats-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }

.stat-card  { background: white; padding: 15px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); text-align: center; border: 1px solid #edf2f7; }
.stat-label { display: block; font-size: 0.75rem; color: #718096; margin-bottom: 5px; }
.stat-value { font-size: 1.25rem; font-weight: 800; color: #2d3748; }

.btn-refresh-stats { background-color: #edf2f7; color: #4a5568; border: none; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; }

/* 유저 관리 테이블 */
.user-table               { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
.user-table th,
.user-table td            { padding: 12px; text-align: left; border-bottom: 1px solid #edf2f7; }
.user-table th            { background-color: #f7fafc; color: #4a5568; font-weight: 600; }
.user-table select        { padding: 4px; border-radius: 4px; border: 1px solid #cbd5e0; }
.user-table button:hover  { transform: scale(1.2); transition: transform 0.2s; }

.badge-free    { background: #f3f4f6; color: #374151; padding: 2px 8px; border-radius: 4px; }
.badge-premium { background: #dbeafe; color: #1e40af; padding: 2px 8px; border-radius: 4px; font-weight: bold; }
.badge-admin   { background: #fee2e2; color: #991b1b; padding: 2px 8px; border-radius: 4px; font-weight: bold; }
