/* Professional Global IQ Assessment Platform Styles */

/* 이미지 보호 스타일 */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* 이미지 컨테이너에 대한 추가 보호 */
.question-image, .option-image, .iq-level-card img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* 전체 페이지 선택 방지 */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 텍스트 입력 필드와 버튼은 선택 가능하도록 예외 처리 */
input, textarea, button, .btn, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 99999;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: #2c3e50 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar-brand i {
    color: #000;
    font-size: 1.8rem;
    margin-right: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #2c3e50 !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-link:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1);
}

.hero-section {
    padding: 3rem 3rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    margin: 1.5rem 0 3rem 0;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-section h1 {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-section .lead {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease;
    overflow: hidden;
    padding: 2rem;
    margin-bottom: 2rem;
    height: 100%;
    transform: translateZ(0);
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.feature-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.feature-card .card-title {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-card .card-text {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.feature-card:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.assessment-card, .result-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 2rem 0;
    transform: translateZ(0);
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transform: translateZ(0);
}

.metric-card:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* Assessment Page Styles */
#timer {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%) !important;
    color: #2c3e50 !important;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    border: none;
    letter-spacing: 0.02em;
}

#progress {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    border: none;
    letter-spacing: 0.02em;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 1.8rem 2rem;
    margin-bottom: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    border-color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
    transform: none;
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.2);
}

.option-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: none;
}

/* Results Page Styles */
#iq-score {
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alert {
    border-radius: 15px;
    border: none;
    backdrop-filter: blur(10px);
}

.btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transform: translateZ(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    color: white;
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    color: white;
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
    color: white;
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
}

/* Language Selector Styles */
.navbar-nav .dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 150px;
    z-index: 9999;
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    color: #2c3e50 !important;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

/* 드롭다운 아이템 색상을 강제로 설정 */
.navbar-nav .dropdown-menu .dropdown-item {
    color: #2c3e50 !important;
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
    color: #0d6efd !important;
}

.navbar-nav .dropdown-menu .dropdown-item.active {
    color: #0d6efd !important;
}

.navbar-nav .dropdown-item:hover {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd !important;
    transform: translateX(5px);
}

.navbar-nav .dropdown-item.active {
    background: rgba(13, 110, 253, 0.15);
    color: #0d6efd !important;
    font-weight: 600;
}

.navbar-nav .dropdown-toggle {
    color: #fff !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-toggle:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 드롭다운 토글 버튼의 배경과 글자색 개선 */
.navbar-nav .dropdown-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    color: #000 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.navbar-nav .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #000 !important;
    text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.navbar-nav .dropdown-toggle:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #000 !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

/* 드롭다운 메뉴가 다른 요소들 위에 표시되도록 */
.navbar-nav .dropdown {
    z-index: 99999;
}

.navbar-nav .dropdown-menu {
    z-index: 99999 !important;
}

/* 모바일에서 네비게이션 숨기고 설정 버튼만 보이게 */
@media (max-width: 991.98px) {
    /* 네비게이션 영역 숨기기 */
    .navbar-nav {
        display: none !important;
    }
    
    /* 햄버거 메뉴 숨기기 */
    .navbar-toggler {
        display: none !important;
    }
    
    /* 설정 버튼 스타일 */
    .btn-outline-light {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #000 !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
        font-size: 1.1rem;
    }
    
    .btn-outline-light:hover {
        background: rgba(255, 255, 255, 1) !important;
        color: #000 !important;
        border-color: rgba(0, 0, 0, 0.2) !important;
    }
}

/* 언어 설정 모달 스타일 */
.language-btn {
    text-align: left;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.language-btn:hover i {
    color: white;
}

.language-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.language-btn.active i {
    color: white;
}

/* 최근 IQ 검사 결과 스타일 */
.recent-results {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.result-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    height: 120px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 0.3rem;
    width: 100%;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.result-item .name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-height: 2.6em;
    overflow: hidden;
}

.result-item .flag {
    font-size: 1.3rem;
    text-align: center;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-item .score {
    font-weight: 700;
    color: #667eea;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    line-height: 1;
}

.result-item .time {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    line-height: 1;
    margin-top: 0.2rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .recent-results {
        padding: 1.5rem;
    }
    
    .result-item {
        padding: 0.6rem;
        height: 100px;
        gap: 0.2rem;
    }
    
    .result-item .name {
        font-size: 0.75rem;
        max-height: 2.4em;
    }
    
    .result-item .flag {
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .result-item .score {
        font-size: 0.8rem;
    }
    
    .result-item .time {
        font-size: 0.65rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 1.5rem;
        margin: 1rem 0 2rem 0;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-1 {
        font-size: 3rem;
    }
    
    .feature-card, .assessment-card, .result-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    .card-body {
        /* padding: 1.5rem; */
    }
    
    .card-header {
        padding: 1rem 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    .navbar-nav .dropdown-menu {
        min-width: 120px;
    }
    
    .navbar-nav .dropdown-toggle {
        font-size: 0.9rem;
    }
    
    .navbar-nav .dropdown-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .recent-results {
        padding: 1rem;
    }
    
    .result-item {
        padding: 0.75rem;
    }
    
    .result-item .flag {
        font-size: 1.2rem;
        width: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 0 auto;
    }
    
    .result-item .name {
        font-size: 0.9rem;
    }
    
    .result-item .score {
        font-size: 0.85rem;
    }
    
    .result-item .time {
        font-size: 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    color: #667eea;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.lead {
    font-weight: 500;
    color: #34495e;
    font-size: 1.25rem;
    line-height: 1.8;
}

.card-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.card-text {
    color: #5a6c7d;
    line-height: 1.6;
    font-size: 1rem;
}

/* Assessment Guidelines specific styles */
.guidelines-title {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    font-size: 1.8rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Recent Results title styles */
.recent-results-title {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    font-size: 1.8rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.list-unstyled li {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    text-align: center;
    position: relative;
    width: 100%;
    padding-left: 50px;
    padding-right: 50px;
}

/* 체크박스와 텍스트를 묶는 컨테이너 */
.list-unstyled li .guideline-item {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 왼쪽 정렬로 아이콘 위치 통일 */
    width: 100%;
    max-width: 500px; /* 최대 너비 제한 */
    margin: 0 auto; /* 중앙 정렬 */
    position: relative;
}

.list-unstyled li i {
    position: static;
    transform: none;
    margin-left: 0;
    margin-right: 15px;
    z-index: 10;
    flex-shrink: 0;
    width: 20px; /* 아이콘 너비 고정 */
    text-align: center; /* 아이콘 중앙 정렬 */
}

.list-unstyled li span {
    text-align: left;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0;
    word-wrap: break-word;
    flex: 1;
}

.list-unstyled li i {
    color: #00ff00;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 255, 0, 1);
    font-size: 1.2rem;
}

.display-3 {
    font-weight: 800;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.display-1 {
    font-weight: 900;
    color: #2c3e50;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Card Headers */
.card-header {
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    padding: 1.5rem 2rem;
}

.result-card > .card-body {
    padding: 2rem;
} 

/* 이미지 기반 문제 스타일 */
.question-image {
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    background: white;
    padding: 12px;
    /* margin-bottom: 20px; */
    transition: all 0.3s ease;
    max-width: 100%;
    height: auto;
    max-height : 80%;
}

.question-image:hover {
    transform: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 선지 그리드 컨테이너 */
#options-container {
    display: grid;
    margin-bottom: 30px;
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
}

/* 문제 컨테이너 통합 스타일 */
#question-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    /* border: 1px solid rgba(255, 255, 255, 0.3); */
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* 진행률 막대바 */
#progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    z-index: 10;
}

#question-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
}

/* 문제 이미지 컨테이너 통합 스타일 */
#question-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    /* max-height: 350px; */
    height: 350px;
    width: 100%;
    /* border: 1px solid rgba(0, 0, 0, 0.1); */
    border-radius: 8px;
    /* background: rgba(255, 255, 255, 0.8); */
    /* padding: 10px; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 문제 이미지 통합 스타일 */
.question-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 350px;
    object-fit: contain;
    border-radius: 4px;
    /* transition: transform 0.2s ease; */
}
/* 
.question-image:hover {
    transform: scale(1.02);
} */

/* 문제 텍스트 통합 스타일 */
#question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.4;
}

/* 네비게이션 버튼 스타일 */
#prev-btn, #next-btn {
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s ease;
    min-width: 140px;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

#prev-btn::before, #next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

#prev-btn:hover::before, #next-btn:hover::before {
    left: 100%;
}

#prev-btn:hover, #next-btn:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(23, 162, 184, 0.3);
}

#prev-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#prev-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 로딩 스타일 */
#loading {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin: 20px 0;
}

#loading .spinner-border {
    width: 3.5rem;
    height: 3.5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

#loading p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 1rem;
    letter-spacing: 0.02em;
}

/* 제출 컨테이너 스타일 */
#submit-container {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#submit-container h4 {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

#submit-container p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

#submit-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 35px;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    /* 문제 이미지 개선 */
    .question-image {
        max-height: 320px !important;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* 문제 이미지 컨테이너 개선 */
    #question-image-container {
        min-height: 280px !important;
        height: auto !important;
        /* padding: 15px; */
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        margin-bottom: 25px;
    }
    
    /* 모바일에서는 세로 배치로 변경 */
    #question-container .row {
        flex-direction: column;
        gap: 0;
    }
    
    #question-container .col-md-7,
    #question-container .col-md-5 {
        width: 100%;
        margin-bottom: 0;
    }
    
    /* 선지 이미지 개선 */
    .option-image {
        max-height: 70% !important;
        width: 80% !important;
        height: auto !important;
        border-radius: 8px;
    }
    
    /* 선지 버튼 개선 */
    .option-btn {
        min-height: 60px !important;
        padding: 12px !important;
        border-radius: 12px !important;
        margin-bottom: 12px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
    }
    
    .option-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    }
    
    /* 선지 컨테이너 개선 - 2x2 그리드 */
    #options-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        margin-bottom: 30px;
        padding: 10px;
    }
    
    /* 문제 텍스트 개선 */
    #question-text {
        font-size: 1.4rem;
        margin-bottom: 25px;
        font-weight: 600;
        color: #2c3e50;
    }
    
    /* 문제 컨테이너 개선 */
    #question-container {
        padding: 20px;
        border-radius: 20px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    /* 타이머와 진행률 개선 */
    #timer, #progress {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
        border-radius: 25px;
        font-weight: 600;
    }
    
    #timer {
        background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%) !important;
        color: #fff !important;
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
    
    #progress {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
        color: #fff !important;
        box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    }
    
    /* 버튼 개선 - 보라색으로 변경 */
    #prev-btn, #next-btn {
        padding: 15px 30px;
        min-width: 130px;
        font-size: 1.1rem;
        border-radius: 25px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    #prev-btn {
        background: #6c757d;
        border: none;
        color: white;
    }
    
    #next-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
    }
    
    /* 카드 헤더 - 배경색 제거 */
    .card-header {
        border-radius: 20px 20px 0 0 !important;
        padding: 20px;
    }
    
    .card-header h3 {
        font-weight: 700;
    }
}

@media (max-width: 576px) {
    /* 작은 모바일용 추가 개선 */
    .question-image {
        max-height: 220px !important;
        padding: 8px;
    }
    
    #question-image-container {
        min-height: 200px !important;
        margin-bottom: 15px;
    }
    
    .option-image {
        max-height: 50% !important;
        /* width: 80% !important; */
    }
    
    .option-btn {
        min-height: 45px !important;
        padding: 8px !important;
        border-radius: 8px !important;
        margin-bottom: 8px;
    }
    
    /* 작은 모바일에서는 2x2 그리드로 배치 */
    #options-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        margin-bottom: 20px;
        padding: 5px;
    }
    
    #question-text {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    #question-container {
        padding: 12px;
        border-radius: 15px;
    }
    
    #timer, #progress {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    #prev-btn, #next-btn {
        padding: 10px 20px;
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .card-header {
        padding: 12px;
    }
    
    #loading {
        padding: 30px 10px;
    }
    
    #submit-container {
        padding: 25px 15px;
    }
    
    #submit-container h4 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    #submit-container p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    #submit-btn {
        padding: 12px 25px;
        font-size: 1rem;
        border-radius: 20px;
    }
} 

/* 선지 컨테이너 스타일 */
.option-container {
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
    aspect-ratio: 1;
}

.option-container:hover {
    transform: none;
}

/* 선지 이미지 스타일 */
.option-image {
    max-width: 100%;
    max-height: 150px;
    width: 100%;
    /* height: 150px; */
    height : 80%;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

/* 선지 버튼 스타일 */
.option-btn {
    width: 100%;
    height: 150px;
    padding: 8px;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    /* border-color: #007bff; */
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.option-btn.btn-primary {
    /* border-color: #007bff; */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.option-btn.btn-primary .option-image {
    filter: brightness(1.1);
}

.option-btn.btn-outline-primary {
    color: #667eea;
    background: rgba(255, 255, 255, 0.95);
}

.option-btn.btn-outline-primary:hover {
    background: rgba(23, 162, 184, 0.1);
    /* border-color: #17a2b8; */
    color: #17a2b8;
    /* transform: none; */
} 

/* 결과 페이지 버튼 반응형 */
@media (max-width: 768px) {
    .result-card .d-flex.justify-content-center.gap-2 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .result-card .btn {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 576px) {
    .result-card .d-flex.justify-content-center.gap-2 {
        flex-direction: column;
        gap: 0.8rem !important;
    }
    
    .result-card .btn {
        width: 100%;
        margin: 0;
        padding: 12px 20px;
        font-size: 1rem;
    }
} 

/* 결과 페이지 분석 텍스트 색상 개선 */
#analysis {
    color: #1a1a1a;
}

#analysis ul li {
    color: #333333;
    font-weight: 500;
}

#analysis .text-success {
    color: #27ae60 !important;
}

#analysis .text-warning {
    color: #f39c12 !important;
}

#analysis .text-danger {
    color: #e74c3c !important;
}

#analysis .text-info {
    color: #3498db !important;
}

#analysis .text-primary {
    color: #2980b9 !important;
} 

/* 가이드라인 컨테이너 중앙 정렬 */
.guidelines-title {
    text-align: center;
    margin-bottom: 2rem;
}

/* 가이드라인 리스트 컨테이너 중앙 정렬 */
.col-lg-9 {
    display: block; /* flex 제거 */
}

.col-lg-9 .row {
    width: 100%;
    justify-content: center;
}

.col-lg-9 .col-md-6 {
    display: flex;
    justify-content: center;
} 

/* 반응형 설정 */
@media (max-width: 768px) {
    .list-unstyled li {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .list-unstyled li .guideline-item {
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .list-unstyled li {
        padding-left: 20px;
        padding-right: 20px;
        font-size: 1rem;
    }
    
    .list-unstyled li .guideline-item {
        max-width: 350px;
    }
    
    .list-unstyled li i {
        width: 18px;
        margin-right: 12px;
    }
}

/* IQ 레벨 섹션 스타일 */
.iq-level-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.iq-level-section h3 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.iq-level-section p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.iq-level-grid {
    margin-top: 1rem;
}

.iq-level-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.iq-level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.iq-level-card.genius::before {
    background: linear-gradient(90deg, #ffd700, #ffed4e);
}

.iq-level-card.superior::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.iq-level-card.above-avg::before {
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
}

.iq-level-card.average::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.iq-level-card.below-avg::before {
    background: linear-gradient(90deg, #feca57, #ff9ff3);
}

.iq-level-card.challenge::before {
    background: linear-gradient(90deg, #48dbfb, #0abde3);
}

.iq-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

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

.level-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.3rem;
    color: #2c3e50;
}

.level-header h4 i {
    margin-right: 0.5rem;
}

.iq-range {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.genius .iq-range {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #2c3e50;
}

.superior .iq-range {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.above-avg .iq-range {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.below-avg .iq-range {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: #2c3e50;
}

.challenge .iq-range {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}

.iq-level-card p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .iq-level-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .iq-level-section h3 {
        font-size: 1.8rem;
    }
    
    .iq-level-section p {
        font-size: 1rem;
    }
    
    .iq-level-card {
        padding: 1.2rem;
    }
    
    .level-header h4 {
        font-size: 1.1rem;
    }
    
    .iq-range {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 1.5rem;
    }
    
    .iq-level-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .iq-level-section h3 {
        font-size: 1.6rem;
    }
    
    .iq-level-section p {
        font-size: 0.95rem;
    }
    
    .iq-level-card {
        padding: 1rem;
    }
    
    .level-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .level-header h4 {
        font-size: 1rem;
    }
}

/* 문제별 답안 UI 스타일 */
.question-answer-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.question-answer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.question-answer-card .card-header {
    padding: 0.75rem 1rem;
    border-bottom: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.question-answer-card.border-success .card-header {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.question-answer-card.border-danger .card-header {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
}

.question-answer-card .card-body {
    padding: 1rem;
}

.question-answer-card .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

.question-answer-card .badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.question-answer-card .badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%) !important;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.stat-card h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card small {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.8;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .question-answer-card {
        margin-bottom: 1rem;
    }
    
    .question-answer-card .card-header h6 {
        font-size: 0.9rem;
    }
    
    .question-answer-card .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-card h4 {
        font-size: 1.5rem;
    }
    
    .stat-card small {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .question-answer-card .card-body {
        padding: 0.75rem;
    }
    
    .question-answer-card .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-card h4 {
        font-size: 1.25rem;
    }
} 