/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* padding-top: 20px; */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 3.5rem;
    font-weight: 900;
    color: #4A90E2;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -2px;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #4A90E2;
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    margin: 0;
    transition: all 0.3s ease;
}

.subtitle.hide {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 메인 컨텐츠 */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    display: none;
    width: 100%;
    max-width: 800px;
}

.screen.active {
    display: block;
}

/* 시작 화면 */
.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
}

.welcome-icon {
    margin-bottom: 20px;
}

.welcome-icon i {
    font-size: 4rem;
    color: #4A90E2;
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.welcome-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.8;
}

.test-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 500;
}

.info-item i {
    color: #4A90E2;
}

/* 이름 입력 필드 스타일 */
.name-input-section {
    margin: 20px 0;
    text-align: center;
}

.name-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.name-input {
    width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.name-input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.name-input::placeholder {
    color: #999;
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

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

.btn-primary {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

/* 검사 화면 */
.test-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: #666;
    min-width: 60px;
}

.sector-info {
    text-align: left;
}

.keyboard-help {
    text-align: left;
    opacity: 0.7;
}

.keyboard-help small {
    color: #666;
    font-size: 0.85rem;
}

.sector-info span {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.question-container {
    margin-bottom: 30px;
}

.question-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.question-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.question-text h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 500;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option-item.selected {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border-color: #4A90E2;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.option-item:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
}

.option-item input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.option-item label {
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    gap: 15px;
}

.test-navigation .progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 300px;
}

.test-navigation .progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.test-navigation .progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    min-width: 50px;
}

/* 결과 화면 */
.result-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.result-icon {
    margin-bottom: 20px;
}

.result-icon i {
    font-size: 3rem;
    color: #28a745;
}

.result-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.result-description {
    color: #666;
    font-size: 1.1rem;
}

.result-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.sectors-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.sector-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #4A90E2;
}

.sector-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.subs-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sub-item.rank-1 {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.sub-item.rank-2-5 {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    border-color: #ffc107;
}

.sub-item.rank-6-7 {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
    border-color: #dc3545;
}

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

.sub-score {
    font-weight: 600;
}

.rank-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 개인화된 결과 헤더 스타일 */
.result-personal-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border-radius: 15px;
    color: white;
}

.result-personal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-personal-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 강점 영역 상세 설명 스타일 */
.top-subs-description {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 12px;
    color: white;
}

.description-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-title i {
    color: #ffd700;
}

.sub-description {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.sub-description:last-child {
    margin-bottom: 0;
}

.sub-description-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #ffd700;
}

.sub-description-text {
    line-height: 1.6;
    font-size: 0.95rem;
    opacity: 0.95;
}

/* 푸터 */
.footer {
    margin-top: 30px;
    text-align: center;
}

.footer-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.footer-logo-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: #4A90E2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -1px;
    margin: 0;
}

.footer-logo-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4A90E2;
    margin: 0;
}

.footer-logo-subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.footer-content p {
    color: #666;
    font-size: 0.9rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .welcome-card {
        padding: 30px 20px;
    }

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

    .test-info {
        flex-direction: column;
        gap: 15px;
    }

    .question-card {
        padding: 20px;
    }

    .question-text h3 {
        font-size: 1.1rem;
    }

    .option-item {
        padding: 12px 15px;
    }

    .test-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-logo {
        flex-direction: column;
        gap: 5px;
    }

    .footer-logo-text {
        font-size: 2rem;
    }

    .footer-logo-title {
        font-size: 1rem;
    }

    .footer-logo-subtitle {
        font-size: 0.9rem;
    }

}

@media (max-width: 480px) {
    .welcome-card {
        padding: 20px 15px;
    }

    .question-card {
        padding: 15px;
    }

    .option-item {
        padding: 10px 12px;
    }

    .sub-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .footer-logo {
        flex-direction: column;
        gap: 3px;
    }

    .footer-logo-text {
        font-size: 1.8rem;
    }

    .footer-logo-title {
        font-size: 0.9rem;
    }

    .footer-logo-subtitle {
        font-size: 0.8rem;
    }

}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active {
    animation: fadeIn 0.5s ease;
}

.option-item {
    animation: fadeIn 0.3s ease;
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3A7BC8 0%, #2D5A9A 100%);
}

/* PDF 출력 스타일 */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .header {
        margin-bottom: 20px !important;
    }
    
    .header-content {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        padding: 15px !important;
    }
    
    .result-content {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .sectors-list {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .sector-result {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .sub-item {
        page-break-inside: avoid;
    }
}

/* 섹터별 설명 스타일 */
.sector-descriptions {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 3px solid #4A90E2;
}

.sector-descriptions .description-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4A90E2;
}

.sector-descriptions .description-title i {
    color: #4A90E2;
}

.sector-descriptions .sub-description {
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sector-descriptions .sub-description:last-child {
    margin-bottom: 0;
}

.sector-descriptions .sub-description-name {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #495057;
}

.sector-descriptions .sub-description-text {
    line-height: 1.3;
    font-size: 0.7rem;
    color: #6c757d;
    margin: 0;
}

/* 푸터 로고 인쇄용 스타일 */
@media print {
    .footer-logo {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .footer-logo-text,
    .footer-logo-title,
    .footer-logo-subtitle {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* 개발용 버튼 표시 inline-flex를 none으로 하면 숨겨짐 */
#dev-fill-btn {
    display: none !important;
    /* display: inline-flex !important; */
}
