/* ==========================================
   HARA MIND - 메인 스타일
   모바일 우선 반응형 디자인
   ========================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Primary Colors - 깊이감 있는 인디고/퍼플 */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #a5b4fc;
    --primary-bg: #eef2ff;

    /* Secondary Colors */
    --secondary: #64748b;
    --secondary-hover: #475569;

    /* Accent Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    /* Neutral Colors */
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Effects */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Layout */
    --header-height: 60px;
    --max-width: 1200px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ==========================================
   Header
   ========================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
    color: var(--text);
}

.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-secondary);
}

/* user-menu styles moved to User Menu Dropdown section */

/* 모바일 헤더 - 로그인 시 공간 부족 해결 */
@media (max-width: 480px) {
    .nav {
        gap: 0.25rem;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    /* 나의 커리어 텍스트 숨기고 아이콘만 표시 */
    .nav-career .nav-text {
        display: none;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .lang-btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

    .lang-btn span {
        display: none;
    }

    /* 공지사항 아이콘 크기 조정 */
    .nav-notice i {
        width: 14px !important;
        height: 14px !important;
    }

    /* Test Card - NotebookLM 스타일 (가로형 컴팩트) */
    .test-grid {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .test-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.625rem !important;
        padding: 0.625rem 0.75rem !important;
        border-radius: 12px !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* 카드별 파스텔 배경색 */
    .test-card:nth-child(1) { background: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%); --card-color: #a855f7; }
    .test-card:nth-child(2) { background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%); --card-color: #eab308; }
    .test-card:nth-child(3) { background: linear-gradient(135deg, #d1fae5 0%, #cffafe 100%); --card-color: #14b8a6; }
    .test-card:nth-child(4) { background: linear-gradient(135deg, #fce7f3 0%, #ffe4e6 100%); --card-color: #ec4899; }
    .test-card:nth-child(5) { background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%); --card-color: #3b82f6; }
    .test-card:nth-child(6) { background: linear-gradient(135deg, #fef3c7 0%, #ffedd5 100%); --card-color: #f59e0b; }
    .test-card:nth-child(7) { background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%); --card-color: #8b5cf6; }
    .test-card:nth-child(8) { background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%); --card-color: #22c55e; }
    .test-card:nth-child(9) { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); --card-color: #f97316; }
    .test-card:nth-child(10) { background: linear-gradient(135deg, #cffafe 0%, #e0f2fe 100%); --card-color: #06b6d4; }
    .test-card:nth-child(11) { background: linear-gradient(135deg, #ecfccb 0%, #fef9c3 100%); --card-color: #84cc16; }
    .test-card:nth-child(12) { background: linear-gradient(135deg, #fae8ff 0%, #f5d0fe 100%); --card-color: #d946ef; }

    .test-card::before {
        display: none;
    }

    .test-card:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .test-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .test-icon svg {
        width: 18px;
        height: 18px;
    }

    /* 텍스트 영역 - 2줄 구조 */
    .test-card-content {
        flex: 1;
        min-width: 0;
    }

    /* 1줄: 제목 */
    .test-title {
        font-size: 0.9375rem;
        font-weight: 700;
        margin-bottom: 0.125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 부제목 숨김 */
    .test-subtitle {
        display: none;
    }

    /* 2줄: 시간 + 문항 + 배지 */
    .test-meta {
        display: flex;
        align-items: center;
        font-size: 0.6875rem;
        gap: 0.5rem;
        color: var(--text-secondary);
    }

    /* 배지 - 메타 우측 */
    .test-badge {
        position: static !important;
        top: auto !important;
        right: auto !important;
        font-size: 0.5625rem;
        padding: 0.125rem 0.375rem;
        border-radius: 4px;
        margin-left: auto;
        flex-shrink: 0;
    }

    .test-meta svg {
        width: 11px;
        height: 11px;
    }

    /* 검사 완료 배지 - 모바일 */
    .test-completed-badge {
        position: absolute;
        top: 0.375rem;
        right: 0.375rem;
        padding: 0.125rem 0.375rem 0.125rem 0.25rem;
        font-size: 0.5625rem;
        gap: 0.125rem;
    }

    .test-completed-badge svg {
        width: 8px;
        height: 8px;
    }

    /* 모바일에서 본문을 더 위로 */
    .main {
        padding-top: 0.75rem;
    }

    .hero {
        padding-top: 0.5rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.25rem;
    }
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color var(--transition-fast);
}

.user-avatar:hover {
    border-color: var(--primary-light);
}

.user-avatar-link {
    display: flex;
    align-items: center;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.lang-btn:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--text-tertiary);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lang-option:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.lang-option.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 500;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 0.75rem 1rem;
}

.user-dropdown-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.user-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.user-dropdown-item.credit-item {
    cursor: default;
    font-weight: 600;
    color: var(--text);
}

.user-dropdown-item.credit-item:hover {
    background: transparent;
}

.user-dropdown-item .credit-count {
    color: #f59e0b;
    font-weight: 700;
}

/* 모바일에서 드롭다운이 화면 밖으로 나가지 않도록 */
@media (max-width: 480px) {
    .user-dropdown {
        right: -0.5rem;
        min-width: 120px;
    }
}

/* ==========================================
   Main Content
   ========================================== */
.main {
    flex: 1;
    padding: 1.5rem 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--secondary);
}

.btn-outline-secondary:hover:not(:disabled) {
    background: var(--secondary);
    color: white;
}

.btn-outline-success {
    background: transparent;
    color: var(--success);
    border: 1.5px solid var(--success);
}

.btn-outline-success:hover:not(:disabled) {
    background: var(--success);
    color: white;
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* 소셜 로그인 버튼 */
.btn-kakao {
    background: #FEE500;
    color: #191919;
    font-weight: 600;
}

.btn-kakao:hover {
    background: #fdd800;
}

.btn-google {
    background: #fff;
    color: #333;
    border: 1px solid var(--border);
}

.btn-google:hover {
    background: var(--bg-secondary);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ==========================================
   Home Page
   ========================================== */
.home {
    padding-bottom: 3rem;
}

.hero {
    text-align: center;
    padding: 1.5rem 1rem 1.25rem;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    font-weight: 400;
}

.hero-target {
    margin-top: 0.75rem;
    color: var(--text-muted, #9ca3af);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

@media (min-width: 640px) {
    .hero {
        padding: 2rem 1rem 1.5rem;
    }
    .hero-title {
        font-size: 2.75rem;
    }
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Test Section */
.test-section {
    margin-bottom: 2.5rem;
}

.section-header {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.section-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
    stroke-width: 2;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Test Grid */
.test-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .test-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .test-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

/* Test Card */
.test-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: block;
    position: relative;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--card-color);
    overflow: hidden;
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color);
    opacity: 0;
    transition: opacity var(--transition);
}

.test-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--card-color);
}

.test-card:hover::before {
    opacity: 1;
}

/* Card Color Variants */
.test-card:nth-child(1) { --card-color: #6366f1; }
.test-card:nth-child(2) { --card-color: #ec4899; }
.test-card:nth-child(3) { --card-color: #14b8a6; }
.test-card:nth-child(4) { --card-color: #f59e0b; }
.test-card:nth-child(5) { --card-color: #3b82f6; }
.test-card:nth-child(6) { --card-color: #ef4444; }
.test-card:nth-child(7) { --card-color: #8b5cf6; }
.test-card:nth-child(8) { --card-color: #10b981; }
.test-card:nth-child(9) { --card-color: #f97316; }
.test-card:nth-child(10) { --card-color: #06b6d4; }
.test-card:nth-child(11) { --card-color: #84cc16; }
.test-card:nth-child(12) { --card-color: #d946ef; }

.test-card .test-subtitle {
    color: var(--text-secondary);
}

.test-card .test-meta {
    color: var(--text-tertiary);
}

.test-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--card-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.test-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2;
}

/* 데스크톱: 아이콘과 배지를 상단에 배치 */
.test-card > .test-icon {
    margin-bottom: 0.75rem;
}

.test-card-content {
    flex: 1;
    min-width: 0;
}

/* Icons */
.icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    display: inline-block;
}

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

.test-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-popular {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-new {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.badge-recommended {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

/* 검사 완료 배지 - 우측 상단 */
.test-completed-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    padding: 0.2rem 0.5rem 0.2rem 0.35rem;
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    font-weight: 600;
    z-index: 2;
}

.test-completed-badge svg {
    width: 10px;
    height: 10px;
    stroke: #16a34a;
    flex-shrink: 0;
}

.test-completed-badge .completed-date {
    line-height: 1;
}

.test-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text);
}

.test-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.test-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.test-meta svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    vertical-align: -2px;
    margin-right: 2px;
}

/* AI Section */
.ai-section {
    margin-top: 2.5rem;
}

.ai-card {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.ai-icon {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
}

.ai-icon svg {
    width: 44px;
    height: 44px;
    stroke: white;
    stroke-width: 1.5;
}

.ai-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ai-card p {
    opacity: 0.9;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.ai-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.ai-disclaimer {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    max-width: 280px;
    line-height: 1.4;
}

/* ==========================================
   Auth Page
   ========================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height) - 100px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-buttons .btn {
    width: 100%;
}

.auth-info {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* ==========================================
   Test Start Page
   ========================================== */
.test-start-page {
    display: flex;
    justify-content: center;
    padding: 1rem;
    min-height: calc(100vh - var(--header-height) - 100px);
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #fdf4ff 100%);
}

.test-start-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.test-start-header {
    text-align: center;
    padding: 1.5rem 2rem 1.25rem;
    background: transparent;
    position: relative;
}

.test-icon-large {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.test-icon-large svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 2;
}

.test-start-title {
    font-size: 1.625rem;
    font-weight: 800;
    margin-bottom: 0.375rem;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.test-start-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    position: relative;
    z-index: 1;
}

.test-theory {
    margin-top: 0.625rem;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    position: relative;
    z-index: 1;
    background: var(--primary-bg);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    display: inline-block;
}

.test-start-info {
    padding: 1.25rem 1.5rem;
}

.test-description {
    text-align: center;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    color: var(--text);
    font-size: 0.9375rem;
}

.test-meta-box {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    padding: 1rem 1.5rem;
    border-radius: 14px;
    min-width: 100px;
}

.meta-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
}

.meta-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-value {
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--text);
}

.test-start-notice {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin: 0 0.75rem 1.25rem;
    border: 1px solid #d1fae5;
}

.test-start-notice h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-start-notice h3::before {
    content: '💡';
    font-size: 0.875rem;
}

.test-start-notice ul {
    font-size: 0.8125rem;
    color: #047857;
    padding-left: 1.125rem;
    margin: 0;
}

.test-start-notice li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.test-start-notice li:last-child {
    margin-bottom: 0;
}

.test-start-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
}

.test-start-actions .btn-primary {
    background: #10b981;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.2s ease;
    color: white;
}

.test-start-actions .btn-primary:hover {
    background: #047857;
    color: white;
}

.test-start-actions .btn-back {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    padding: 0.375rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.test-start-actions .btn-back:hover {
    color: var(--primary);
}

/* ==========================================
   Flash Messages
   ========================================== */
.flash-messages {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 2rem);
    max-width: 500px;
}

.flash {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-success {
    border-left: 4px solid var(--success);
}

.flash-error {
    border-left: 4px solid var(--error);
}

.flash-info {
    border-left: 4px solid var(--primary);
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem;
    text-align: center;
    margin-top: auto;
}

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

.footer-links {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.footer-divider {
    margin: 0 0.5rem;
    color: var(--border);
}

.footer-contact {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

/* ==========================================
   Utilities
   ========================================== */
.hidden {
    display: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* ==========================================
   Result Page (Bootstrap Compatibility)
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mt-5 {
    margin-top: 2rem;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }

.row {
    display: flex;
    flex-wrap: wrap;
}

.col-lg-10 {
    width: 100%;
}

@media (min-width: 1024px) {
    .col-lg-10 {
        width: 83.333%;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Card */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.shadow {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-header.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.card-header.text-white {
    color: white;
}

.card-body {
    padding: 1.5rem;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--error); }
.text-info { color: #17a2b8; }
.text-dark { color: var(--text); }
.text-white { color: white; }

.fw-bold { font-weight: 700; }
.small { font-size: 0.875rem; }
.lead { font-size: 1.125rem; line-height: 1.6; }

/* Display */
.display-1 {
    font-size: 3rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .display-1 {
        font-size: 4rem;
    }
}

/* Background */
.bg-light {
    background: var(--bg);
}

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-danger { background: var(--error); }
.bg-info { background: #17a2b8; }
.bg-dark { background: #343a40; }

/* Background Opacity Modifiers */
.bg-opacity-10 { --bg-opacity: 0.1; }
.bg-opacity-25 { --bg-opacity: 0.25; }
.bg-opacity-50 { --bg-opacity: 0.5; }
.bg-opacity-75 { --bg-opacity: 0.75; }

.bg-primary.bg-opacity-10 { background: rgba(99, 102, 241, 0.1); }
.bg-secondary.bg-opacity-10 { background: rgba(100, 116, 139, 0.1); }
.bg-success.bg-opacity-10 { background: rgba(16, 185, 129, 0.1); }
.bg-warning.bg-opacity-10 { background: rgba(245, 158, 11, 0.1); }
.bg-danger.bg-opacity-10 { background: rgba(239, 68, 68, 0.1); }
.bg-info.bg-opacity-10 { background: rgba(23, 162, 184, 0.1); }

.border-primary { border: 1px solid var(--primary) !important; }
.border-secondary { border: 1px solid var(--secondary) !important; }
.border-success { border: 1px solid var(--success) !important; }
.border-warning { border: 1px solid var(--warning) !important; }
.border-danger { border: 1px solid var(--error) !important; }
.border-info { border: 1px solid #17a2b8 !important; }
.border-dark { border: 1px solid #343a40 !important; }
.border-light { border: 1px solid var(--border) !important; }

.rounded { border-radius: var(--radius-sm); }

/* Flex */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-grow-1 { flex-grow: 1; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* Font Size */
.fs-5 { font-size: 1.125rem; }
.fs-6 { font-size: 0.875rem; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.bg-primary.badge { background: var(--primary); color: white; }
.bg-secondary.badge { background: var(--secondary); color: white; }

/* Progress Bar */
.progress {
    height: 20px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    transition: width 0.3s;
}

.progress-bar.bg-primary { background: var(--primary); }
.progress-bar.bg-secondary { background: var(--secondary); }
.progress-bar.bg-success { background: var(--success); }
.progress-bar.bg-info { background: #3b82f6; }
.progress-bar.bg-warning { background: var(--warning); }
.progress-bar.bg-danger { background: var(--error); }

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table-striped tbody tr:nth-child(odd) {
    background: var(--bg);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border);
}

/* List Group */
.list-group {
    list-style: none;
}

.list-group-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Icons (FontAwesome compatibility) */
.fas, .far, .fab {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

/* Result Page Specific */
.result-type-display {
    text-align: center;
    padding: 2rem;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.result-type-code {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.result-type-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.result-type-desc {
    color: var(--text-secondary);
}

/* Dimension Analysis */
.dimension-item {
    margin-bottom: 1.5rem;
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dimension-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.dimension-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Trait Cards */
.trait-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.trait-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.trait-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Career/Job Lists */
.job-list {
    list-style: none;
}

.job-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.job-item:last-child {
    border-bottom: none;
}

.job-icon {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

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

/* Action Buttons in Result */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.result-actions .btn {
    min-width: 140px;
}

/* ==========================================
   Small Mobile Optimization (320px - 374px)
   ========================================== */
@media (max-width: 374px) {
    /* Base adjustments */
    html {
        font-size: 14px;
    }

    /* Header */
    .header-inner {
        padding: 0 0.75rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .user-menu {
        gap: 0.375rem;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .btn-login {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Home */
    .home {
        padding: 0.5rem 0.375rem;
    }

    .main {
        padding-top: 0.5rem;
    }

    .hero {
        padding: 0.25rem 0.5rem 0.5rem;
        margin-bottom: 0.125rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-target {
        font-size: 0.75rem;
    }

    /* Section */
    .section-title {
        font-size: 1.1rem;
    }

    .section-desc {
        font-size: 0.8125rem;
    }

    /* Test Card */
    .test-card {
        padding: 1rem;
    }

    .test-icon {
        width: 36px;
        height: 36px;
    }

    .test-icon svg {
        width: 18px;
        height: 18px;
    }

    .test-badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.5rem;
    }

    .test-title {
        font-size: 0.9375rem;
    }

    .test-subtitle {
        font-size: 0.8125rem;
    }

    .test-meta {
        font-size: 0.6875rem;
        gap: 0.625rem;
    }

    /* AI Card */
    .ai-card {
        padding: 1.5rem 1rem;
    }

    .ai-card h3 {
        font-size: 1.125rem;
    }

    .ai-card p {
        font-size: 0.8125rem;
    }

    /* Auth */
    .auth-card {
        padding: 1.25rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    .btn-kakao,
    .btn-google {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    /* Buttons */
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .btn-sm {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Result Actions */
    .result-actions {
        flex-direction: column;
        gap: 0.625rem;
    }

    .result-actions .btn {
        width: 100%;
        min-width: auto;
    }

    /* Card */
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    /* Footer */
    .footer-content {
        padding: 1rem 0.75rem;
    }

    .footer-links {
        gap: 0.75rem;
    }

    .footer-links a {
        font-size: 0.75rem;
    }
}

/* ==========================================
   Medium Mobile (375px - 479px)
   ========================================== */
@media (min-width: 375px) and (max-width: 479px) {
    .main {
        padding-top: 0.5rem;
    }

    .home {
        padding: 0.5rem 0.5rem;
    }

    .hero {
        padding: 0.25rem 0.5rem 0.5rem;
        margin-bottom: 0.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .test-card {
        padding: 1.125rem;
    }
}

/* Print Hide */
@media print {
    .header, .footer, .result-actions {
        display: none;
    }
}
