/* ============================================
   황칠 AI 복용량 추천 시스템 - 추가 스타일
   ============================================ */

/* ===== AI 진단 버튼 ===== */
.ai-diagnosis-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7c4dff 0%, #b47cff 100%);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(124, 77, 255, 0.5);
    border: none;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 998;
    animation: pulseAI 2s infinite;
}

.ai-diagnosis-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(124, 77, 255, 0.7);
}

@keyframes pulseAI {
    0%, 100% { box-shadow: 0 4px 20px rgba(124, 77, 255, 0.5); }
    50% { box-shadow: 0 4px 30px rgba(124, 77, 255, 0.8); }
}

/* ===== AI 진단 모달 ===== */
.ai-diagnosis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-diagnosis-modal.active {
    opacity: 1;
    visibility: visible;
}

.ai-modal-content {
    background: white;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ai-diagnosis-modal.active .ai-modal-content {
    transform: scale(1);
}

.ai-modal-header {
    background: linear-gradient(135deg, #7c4dff 0%, #b47cff 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-modal-close {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.ai-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.ai-modal-body::-webkit-scrollbar {
    width: 8px;
}

.ai-modal-body::-webkit-scrollbar-thumb {
    background: #7c4dff;
    border-radius: 4px;
}

/* ===== 진단 단계 ===== */
.diagnosis-step {
    display: none;
}

.diagnosis-step.active {
    display: block;
    animation: fadeInStep 0.3s ease;
}

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

/* 인트로 화면 */
.intro-screen {
    text-align: center;
}

.intro-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.intro-screen h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #7c4dff;
}

.intro-screen p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.intro-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.intro-feature {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.intro-feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.intro-feature h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.intro-feature p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

.start-diagnosis-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #7c4dff 0%, #b47cff 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
}

.start-diagnosis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
}

/* 질문 화면 */
.question-screen {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c4dff 0%, #b47cff 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.question-number {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option-btn {
    width: 100%;
    padding: 18px 20px;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1.05rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-btn:hover {
    border-color: #7c4dff;
    background: #f8f5ff;
    transform: translateX(5px);
}

.option-btn.selected {
    border-color: #7c4dff;
    background: linear-gradient(135deg, #f8f5ff 0%, #ede7ff 100%);
    font-weight: 600;
}

.option-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.question-buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.prev-btn,
.next-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.prev-btn {
    background: #f0f0f0;
    color: #666;
}

.prev-btn:hover {
    background: #e0e0e0;
}

.next-btn {
    background: linear-gradient(135deg, #7c4dff 0%, #b47cff 100%);
    color: white;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.4);
}

.next-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 로딩 화면 */
.loading-screen {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 6px solid #e8e8e8;
    border-top-color: #7c4dff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.loading-subtext {
    font-size: 1rem;
    color: #888;
    line-height: 1.6;
}

/* 결과 화면 */
.result-screen {
    animation: fadeInStep 0.5s ease;
}

.result-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f5ff 0%, #ede7ff 100%);
    border-radius: 15px;
    margin-bottom: 30px;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #7c4dff;
    margin-bottom: 10px;
}

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

.result-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.result-card:hover {
    border-color: #7c4dff;
    box-shadow: 0 5px 20px rgba(124, 77, 255, 0.1);
}

.result-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dosage-info {
    background: linear-gradient(135deg, #7c4dff 0%, #b47cff 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.dosage-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0;
}

.dosage-unit {
    font-size: 1.2rem;
    opacity: 0.9;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.schedule-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.schedule-time {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 8px;
}

.schedule-dose {
    font-size: 1.3rem;
    font-weight: 700;
    color: #7c4dff;
}

.warnings-list {
    list-style: none;
    padding: 0;
}

.warnings-list li {
    padding: 12px 0;
    padding-left: 35px;
    position: relative;
    line-height: 1.6;
}

.warnings-list li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 12px 0;
    padding-left: 35px;
    position: relative;
    line-height: 1.6;
}

.tips-list li::before {
    content: '💡';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.result-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.action-btn {
    padding: 15px;
    border: 2px solid #7c4dff;
    border-radius: 12px;
    background: white;
    color: #7c4dff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: #7c4dff;
    color: white;
    transform: translateY(-2px);
}

.action-btn.primary {
    background: linear-gradient(135deg, #7c4dff 0%, #b47cff 100%);
    color: white;
    border: none;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
}

/* 면책 고지 */
.disclaimer-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.disclaimer-box h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disclaimer-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #856404;
    margin: 0;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .ai-diagnosis-button {
        bottom: 90px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .ai-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .ai-modal-body {
        padding: 20px;
    }
    
    .intro-features {
        grid-template-columns: 1fr;
    }
    
    .result-header {
        padding: 20px;
    }
    
    .result-icon {
        font-size: 3rem;
    }
    
    .result-title {
        font-size: 1.5rem;
    }
    
    .dosage-amount {
        font-size: 2.5rem;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        grid-template-columns: 1fr;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .ai-modal-header {
        padding: 20px;
    }
    
    .ai-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .intro-icon {
        font-size: 3rem;
    }
    
    .intro-screen h3 {
        font-size: 1.5rem;
    }
    
    .option-btn {
        padding: 15px;
    }
    
    .result-card {
        padding: 20px;
    }
}