/**
 * 연봉 순위 테스트 전용 스타일
 */

/* 헤더 */
header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
    font-size: 1.25rem;
    transition: opacity 0.3s;
}

.logo a:hover {
    opacity: 0.8;
}

.logo-icon {
    color: #2563eb;
    font-size: 1.5rem;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
}

.desktop-nav a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #1f2937;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: #1f2937;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

.salary-rank-page {
    padding: 1rem 0 4rem;
    background: #f9fafb;
    min-height: 100vh;
}

/* 페이지 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 2rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: #1f2937;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.page-header .data-source {
    font-size: 0.9rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #e5e7eb;
}

/* 계산기 카드 */
.rank-calculator {
    margin-bottom: 3rem;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

.card-header h2 {
    font-size: 1.8rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* 폼 스타일 */
.rank-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #374151;
}

.label-icon {
    font-size: 1.1rem;
}

.required {
    color: #ef4444;
}

.optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 4rem 1rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
}

.help-text {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* 라디오 버튼 그룹 */
.radio-group {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: #f3f4f6;
    border-radius: 10px;
}

.radio-option {
    flex: 1;
    min-width: 80px;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-label {
    display: block;
    padding: 0.625rem 0.75rem;
    background: transparent;
    color: #6b7280;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
}

.radio-option input[type="radio"]:checked + .radio-label {
    background: white;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.radio-label:hover {
    color: #374151;
}

/* 계산 버튼 */
.btn-calculate {
    width: 100%;
    padding: 1.125rem 2rem;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-calculate:hover {
    background: #111827;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-icon {
    font-size: 1.4rem;
}

/* 결과 섹션 */
.rank-result {
    margin-top: 0;
    margin-bottom: 3rem;
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.result-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f3f4f6;
}

.result-header h2 {
    font-size: 1.8rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.result-salary {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1f2937;
}

.result-salary small {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* 순위 아이템 */
.rank-section {
    margin-bottom: 2rem;
}

.rank-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 15px;
    background: white;
    border: 2px solid #e5e7eb;
}

.rank-item.korea {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.rank-item.world {
    border-color: #fde68a;
    background: #fefce8;
}

.rank-item.age {
    border-color: #e9d5ff;
    background: #faf5ff;
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rank-header h3 {
    font-size: 1.3rem;
    color: #1f2937;
    margin: 0;
}

.rank-badge {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 프로그레스 바 */
.progress-bar {
    height: 30px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 13px;
    transition: width 1s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
}

.rank-description {
    color: #4b5563;
    font-size: 0.95rem;
    margin: 0;
}

/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    min-width: 150px;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #1f2937;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #111827;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

/* 추가 정보 카드 */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    border-left: 4px solid #2563eb;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.info-card h4 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.info-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.info-link:hover {
    text-decoration: underline;
}

/* 통계 섹션 */
.statistics-section {
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.statistics-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.stat-source {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* FAQ 섹션 */
.faq-section {
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: #d1d5db;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    transition: all 0.3s;
}

.faq-question:hover {
    background: white;
}

.faq-icon {
    font-weight: 800;
    color: #2563eb;
    font-size: 1.2rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: #4b5563;
    line-height: 1.7;
    margin-top: 0.5rem;
}

/* 관련 계산기 */
.related-calculators {
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.related-calculators h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.calc-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.calc-card:hover {
    transform: translateY(-5px);
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.calc-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.calc-card h3 {
    font-size: 1.3rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.calc-card p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* 모바일 드롭다운 메뉴 */
.mobile-dropdown {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.mobile-dropdown.active {
    display: block;
}

.mobile-menu-header {
    background: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.mobile-menu-content {
    background: white;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
    animation: slideDown 0.3s ease;
}

.mobile-menu-section {
    margin-bottom: 2rem;
}

.mobile-menu-section:last-child {
    margin-bottom: 0;
}

.mobile-menu-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
}

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

.mobile-menu-section li {
    margin: 0;
}

.mobile-menu-section a {
    display: block;
    padding: 0.875rem 1rem;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-section a:hover {
    background: #f3f4f6;
    color: #2563eb;
    transform: translateX(4px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* 모바일 하단 네비게이션 바 (앱 스타일) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9ca3af;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 12px;
    position: relative;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

.mobile-bottom-nav .nav-item.active {
    color: #2563eb;
}

.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: #2563eb;
    border-radius: 0 0 3px 3px;
}

.mobile-bottom-nav .nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25rem;
    transition: transform 0.2s ease;
    stroke-width: 2;
}

.mobile-bottom-nav .nav-item.active .nav-icon {
    transform: scale(1.05);
    stroke-width: 2.5;
}

.mobile-bottom-nav .nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    /* 모바일에서 상단 헤더 메뉴 숨김 */
    header nav {
        display: none !important;
    }
    
    header .hamburger {
        display: none !important;
    }
    
    /* 모바일에서 body에 하단 네비게이션 바 높이만큼 패딩 추가 */
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    footer {
        margin-bottom: 0 !important;
    }
    
    .salary-rank-page {
        padding: 1rem 0 2rem;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header .subtitle {
        font-size: 1rem;
    }

    .calculator-card,
    .result-card {
        padding: 1.5rem;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .result-salary {
        font-size: 1.8rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        min-width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        min-width: 100%;
    }

    .additional-info {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .statistics-section,
    .faq-section,
    .related-calculators {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1.5rem 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .rank-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
