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

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%);
    min-height: 100vh;
    color: #2d3436;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.test-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 광고 컨테이너 */
.ad-container {
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* 애니메이션 정의 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(300%); }
}

@keyframes fillUp {
    0% { height: 0%; }
    100% { height: var(--height, 60%); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(116, 185, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(116, 185, 255, 0.6); }
}

/* 시작 페이지 */
.start-page {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.title-section {
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.8em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #74b9ff, #0984e3, #6c5ce7);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    animation: bounceIn 1s ease;
}

.sub-title {
    font-size: 1.6em;
    color: #636e72;
    font-weight: 600;
    margin-bottom: 30px;
}

/* 히어로 비주얼 */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.license-card {
    width: 160px;
    height: 100px;
    background: linear-gradient(45deg, #fd79a8, #e84393);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(253, 121, 168, 0.3);
    animation: slideRight 1s ease 0.5s both;
    position: relative;
    overflow: hidden;
}

.license-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: slideRight 2s ease 1.5s infinite;
}

.card-content {
    text-align: center;
    color: white;
    z-index: 1;
}

.license-icon {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.license-text {
    font-size: 0.9em;
    font-weight: bold;
}

.exchange-arrow {
    font-size: 2.5em;
    color: #74b9ff;
    animation: pulse 2s ease-in-out infinite 1s;
}

.rewards-box {
    width: 160px;
    height: 100px;
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(0, 184, 148, 0.3);
    animation: slideRight 1s ease 1s both;
    color: white;
}

.reward-icons {
    display: flex;
    gap: 5px;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.reward-text {
    font-size: 0.9em;
    font-weight: bold;
}

/* 소개 메시지 */
.intro-message {
    background: rgba(116, 185, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #74b9ff;
    font-size: 1.1em;
}

.intro-message strong {
    color: #0984e3;
    font-weight: 700;
}

/* 혜택 하이라이트 */
.benefit-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.benefit-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.benefit-item:hover {
    border-color: #74b9ff;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(116, 185, 255, 0.2);
}

.benefit-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.benefit-item h3 {
    color: #0984e3;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.benefit-item p {
    color: #636e72;
    font-size: 0.95em;
    line-height: 1.5;
}

/* 긴급 알림 */
.urgency-alert {
    background: linear-gradient(45deg, #ff7675, #fd79a8);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    animation: glow 3s ease-in-out infinite 2s;
}

.alert-header {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.alert-content p {
    font-size: 1em;
    line-height: 1.6;
}

.alert-content strong {
    font-weight: 700;
    text-decoration: underline;
}

/* 버튼 스타일 */
.start-btn, .primary-btn {
    background: linear-gradient(45deg, #00b894, #00cec9);
    color: white;
    padding: 20px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 184, 148, 0.3);
    margin: 25px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.start-btn:hover, .primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 184, 148, 0.4);
}

.start-btn::after, .primary-btn::after {
    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;
}

.start-btn:hover::after, .primary-btn:hover::after {
    left: 100%;
}

.btn-icon {
    font-size: 1.1em;
}

/* 공유 섹션 */
.share-section {
    margin-top: 30px;
}

.kakao-share {
    display: inline-flex;
    align-items: center;
    background: #FEE500;
    color: #381E1F;
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(254, 229, 0, 0.3);
    gap: 10px;
}

.kakao-share:hover {
    background: #F5D800;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(254, 229, 0, 0.4);
}

.kakao-icon {
    font-size: 1.2em;
}

/* 질문 페이지 */
.question-page {
    animation: fadeInUp 0.6s ease;
}

.progress-header {
    margin-bottom: 40px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(116, 185, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.question-info {
    text-align: center;
    font-weight: bold;
    color: #0984e3;
    font-size: 1.1em;
}

.question-content {
    text-align: center;
}

.question-title {
    font-size: 2.2em;
    margin-bottom: 40px;
    color: #2d3436;
    font-weight: bold;
    line-height: 1.3;
}

.question-options {
    display: grid;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.option-item {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(116, 185, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.option-item:hover {
    border-color: #74b9ff;
    background: rgba(116, 185, 255, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(116, 185, 255, 0.2);
}

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

.option-item.selected {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    border-color: #0984e3;
    transform: scale(1.02);
}

/* 결과 페이지 */
.result-page {
    animation: fadeInUp 0.8s ease;
    text-align: center;
}

.result-header {
    margin-bottom: 40px;
}

.result-badge {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
    animation: bounceIn 1s ease 0.5s both;
}

.result-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.result-subtitle {
    font-size: 1.2em;
    color: #636e72;
    margin-bottom: 30px;
}

.result-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(116, 185, 255, 0.3);
    text-align: left;
}

.benefits-summary {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #2d3436;
}

.detailed-benefits {
    background: rgba(116, 185, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 4px solid #74b9ff;
}

.application-guide {
    margin-top: 25px;
}

.guide-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.guide-link {
    display: inline-block;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.3);
    text-align: center;
}

.guide-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(116, 185, 255, 0.4);
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* 분석 팝업 */
.analysis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.analysis-visual {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 0 auto 30px;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    border-radius: 15px;
    overflow: hidden;
}

.scanning-effect {
    position: relative;
    width: 100%;
    height: 100%;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    animation: scan 2s ease-in-out infinite;
}

.data-visualization {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.data-bar {
    width: 6px;
    background: white;
    border-radius: 3px;
    animation: fillUp 1.5s ease-in-out infinite;
    animation-delay: var(--delay);
}

.data-bar:nth-child(1) { --height: 40%; }
.data-bar:nth-child(2) { --height: 70%; }
.data-bar:nth-child(3) { --height: 55%; }
.data-bar:nth-child(4) { --height: 80%; }

.analysis-info h3 {
    color: #0984e3;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.countdown-timer {
    font-size: 4em;
    font-weight: bold;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 20px 0;
    animation: pulse 1s infinite;
}

.analysis-info p {
    color: #636e72;
    line-height: 1.5;
}

.popup-ad-space {
    margin-top: 30px;
    padding: 20px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 15px;
}

/* 숨김 클래스 */
.hidden {
    display: none !important;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .test-container {
        padding: 25px;
    }
    
    .main-title {
        font-size: 2.2em;
    }
    
    .hero-visual {
        flex-direction: column;
        gap: 20px;
    }
    
    .exchange-arrow {
        transform: rotate(90deg);
    }
    
    .benefit-highlights {
        grid-template-columns: 1fr;
    }
    
    .question-title {
        font-size: 1.8em;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 25px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8em;
    }
    
    .license-card, .rewards-box {
        width: 140px;
        height: 85px;
    }
    
    .license-icon {
        font-size: 2em;
    }
    
    .license-text, .reward-text {
        font-size: 0.8em;
    }
    
    .benefit-item {
        padding: 20px 15px;
    }
    
    .question-title {
        font-size: 1.6em;
    }
    
    .result-title {
        font-size: 2em;
    }
}

/* 가이드 모달 스타일 */
.guide-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 2px solid #e1f5fe;
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: white;
    margin: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.close-btn {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
}

.guide-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1f5fe;
}

.guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.guide-section h3 {
    color: #0984e3;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-section ol,
.guide-section ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.guide-section li {
    margin-bottom: 8px;
    color: #2d3436;
    line-height: 1.6;
}

.guide-section li strong {
    color: #0984e3;
    font-weight: 600;
}

.benefit-details {
    display: grid;
    gap: 16px;
}

.benefit-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid #0984e3;
}

.benefit-item h4 {
    color: #0984e3;
    font-size: 1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefit-item p {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
}

.benefit-item small {
    color: #636e72;
    font-size: 0.85rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.contact-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.contact-item strong {
    color: #0984e3;
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.contact-item p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3436;
}

.useful-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.useful-links a {
    display: inline-block;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.useful-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(9, 132, 227, 0.3);
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .guide-modal {
        max-width: 95vw;
        margin: 10px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* [광고] 광고 컨테이너 추가 스타일 */
.ad-container.top {
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #fff5f5 0%, #fef5e7 100%);
    border: 1px solid #fd79a8;
}

.ad-container.mid {
    margin: 30px auto;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
    border: 1px solid #74b9ff;
}

.ad-container.result {
    margin: 20px auto;
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border: 1px solid #00b894;
}

.ad-container ins {
    margin: 0 auto;
}
