/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --background: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 20px;

    /* 프리미엄 디자인 토큰 */
    --brand-gradient: linear-gradient(135deg, #6d5efc 0%, #8b5cf6 45%, #d946a8 100%);
    --brand-gradient-soft: linear-gradient(135deg, #7c6ffd 0%, #9d6bf0 100%);
    --gold-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --glass-bg: rgba(255, 255, 255, 0.14);
    --glass-border: rgba(255, 255, 255, 0.28);
    --shadow-soft: 0 10px 40px rgba(31, 38, 135, 0.18);
    --shadow-premium: 0 20px 60px rgba(76, 29, 149, 0.28);
    --shadow-card: 0 18px 50px rgba(30, 41, 59, 0.12);
    --radius-lg: 28px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', '맑은 고딕', sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(217, 70, 168, 0.35) 0%, transparent 42%),
        radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.28) 0%, transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(124, 58, 237, 0.35) 0%, transparent 55%),
        linear-gradient(135deg, #4c1d95 0%, #6d28d9 45%, #7c3aed 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

/* 헤더 */
header {
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-content > div {
    flex: 1;
    text-align: center;
}

/* 브랜드 로고 영역 */
.header-content > div.brand {
    text-align: left;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    justify-content: flex-start;
}

.brand-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 15px;
    filter: drop-shadow(0 6px 16px rgba(124, 58, 237, 0.45));
    transition: transform 0.35s ease;
}

.brand-logo:hover {
    transform: scale(1.06) rotate(-3deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.brand-text h1 {
    margin-bottom: 2px;
    font-size: 2.1rem;
    line-height: 1.15;
}

.brand-text .subtitle {
    margin: 0;
}

body.rtl .brand {
    text-align: right;
    flex-direction: row-reverse;
}

header h1 {
    font-size: 2.6rem;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.92);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 언어 선택 - 드롭다운 콤보 */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    padding: 6px 14px;
    border-radius: 50px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
}

.lang-globe {
    font-size: 1.05rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.lang-select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding-right: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 20px;
    letter-spacing: 0.2px;
}

.lang-select option {
    color: #333;
    background: #fff;
    font-weight: 500;
    padding: 8px;
}

/* RTL(아랍어) 지원 */
body.rtl .header-content,
body.rtl .header-actions {
    direction: rtl;
}
body.rtl .language-selector {
    flex-direction: row-reverse;
}
body.rtl .lang-select {
    background-position: left center;
    padding-right: 4px;
    padding-left: 20px;
}
body.rtl .welcome-card,
body.rtl .benefit-list,
body.rtl .options,
body.rtl .result-card {
    text-align: right;
}
body.rtl .benefit-list li {
    direction: rtl;
}

.help-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.help-icon {
    font-size: 1.2rem;
}

/* 인증 버튼 */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-auth {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.btn-auth:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.btn-auth-primary {
    background: var(--gold-gradient);
    border-color: transparent;
    color: #7c3a1d;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(253, 160, 133, 0.4);
}

.btn-auth-primary:hover {
    background: var(--gold-gradient);
    filter: brightness(1.05);
    box-shadow: 0 10px 26px rgba(253, 160, 133, 0.55);
}

/* 사용자 메뉴 */
.user-menu {
    position: relative;
}

.user-info-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.user-info-btn:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.user-icon {
    font-size: 1.2rem;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    pointer-events: auto; /* 터치 이벤트 활성화 */
}

.user-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-weight: 500;
    min-height: 44px; /* 모바일 터치 영역 최소 크기 */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); /* 모바일 터치 피드백 */
    touch-action: manipulation; /* 더블탭 줌 방지 */
    user-select: none; /* 텍스트 선택 방지 */
    -webkit-user-select: none;
    pointer-events: auto; /* 터치 이벤트 활성화 */
    position: relative; /* z-index를 위한 positioning */
    z-index: 1; /* 다른 요소 위에 표시 */
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item:active {
    background: #e9ecef;
}

.dropdown-item span {
    font-size: 1.2rem;
}

/* 화면 전환 */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

/* 카드 스타일 */
.welcome-card,
.survey-card,
.loading-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    box-shadow: var(--shadow-card);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
}

/* 카드 상단 고급스러운 그라데이션 액센트 라인 */
.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--brand-gradient);
    background-size: 200% 100%;
    animation: shimmerLine 6s linear infinite;
}

@keyframes shimmerLine {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.welcome-card .icon {
    font-size: 4.2rem;
    margin-bottom: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(217, 70, 168, 0.12) 100%);
    box-shadow: inset 0 2px 10px rgba(139, 92, 246, 0.12), 0 10px 30px rgba(139, 92, 246, 0.18);
    animation: floatIcon 3.5s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.welcome-card h2 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
    word-break: keep-all;
    background: linear-gradient(135deg, #1e293b 0%, #6d28d9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-card p {
    color: var(--text-light);
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 30px;
    word-break: keep-all;
    overflow-wrap: break-word;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-features {
    display: inline-block;
    background: linear-gradient(135deg, rgba(109, 94, 252, 0.08) 0%, rgba(217, 70, 168, 0.08) 100%);
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 0.98rem !important;
    font-weight: 600;
    color: #6d28d9 !important;
    margin-bottom: 28px !important;
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: inset 0 1px 3px rgba(139, 92, 246, 0.06);
    word-break: keep-all;
    line-height: 1.7;
}

/* 회원가입 혜택 박스 */
.signup-benefit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    animation: pulseGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.signup-benefit::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
        transform: scale(1.02);
    }
}

.signup-benefit:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    animation: none;
}

.benefit-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.benefit-badge {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.benefit-title {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    position: relative;
    z-index: 1;
    text-align: left;
}

.benefit-list li {
    color: white;
    font-size: 1.05rem;
    line-height: 2;
    padding: 8px 0;
    padding-left: 15px;
    transition: all 0.3s ease;
    cursor: default;
    border-radius: 8px;
    text-align: left;
}

.benefit-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 20px;
    transform: translateX(5px);
}

.btn-signup-now {
    background: white;
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-signup-now:hover {
    background: #ffeb3b;
    color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 235, 59, 0.4);
}

.btn-signup-now:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-signup-now::after {
    content: '✨';
    position: absolute;
    right: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.btn-signup-now:hover::after {
    opacity: 1;
    right: 15px;
}

/* 기능 소개 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.96);
    padding: 26px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(109, 94, 252, 0.06) 0%, rgba(217, 70, 168, 0.06) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-item .emoji {
    font-size: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin-bottom: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(109, 94, 252, 0.12) 0%, rgba(217, 70, 168, 0.12) 100%);
    position: relative;
    z-index: 1;
}

.feature-item h3 {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* 카메라 기능 소개 섹션 */
.camera-features-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 36px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* 의사 소개 섹션 */
.doctor-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    color: white;
}

.doctor-image {
    flex-shrink: 0;
}

.doctor-avatar {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.doctor-text {
    flex: 1;
}

.doctor-text h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
}

.doctor-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .doctor-intro {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 20px;
    }
    
    .doctor-avatar {
        width: 100px;
        height: 100px;
        font-size: 3.5rem;
        margin-bottom: 5px;
    }
    
    .doctor-text {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .doctor-text h4 {
        font-size: 1.2rem;
        margin-bottom: 0;
        line-height: 1.4;
    }
    
    .doctor-text p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin: 0;
    }
}

.section-title {
    color: var(--text-dark);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
    text-align: center;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 25px;
}

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

.camera-feature-card {
    background: linear-gradient(135deg, #fbfaff 0%, #f0edfb 100%);
    padding: 28px 24px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.camera-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(139, 92, 246, 0.25);
}

.camera-feature-icon {
    font-size: 2.6rem;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(109, 94, 252, 0.14) 0%, rgba(217, 70, 168, 0.14) 100%);
}

.camera-feature-card h4 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.camera-feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 진행 바 */
.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    background: var(--primary-color);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* 설문 카드 */
.survey-card {
    text-align: left;
}

.question-number {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.question-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* 옵션 스타일 */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.option {
    background: #f8f9fa;
    border: 2px solid transparent;
    padding: 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.option.selected {
    background: #e8f5e9;
    border-color: var(--primary-color);
    font-weight: 600;
}

.option-icon {
    font-size: 1.5rem;
    min-width: 30px;
}

/* 입력 필드 */
.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 버튼 */
.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--brand-gradient);
    background-size: 180% 180%;
    color: white;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 17px 40px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.35s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn-primary:hover:not(:disabled) {
    background-position: 100% 100%;
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(124, 58, 237, 0.5);
}

.btn-primary:hover:not(:disabled)::after {
    left: 130%;
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-dark);
}

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

.navigation-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* 로딩 화면 */
.loader {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

/* 결과 화면 */
.result-header {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.result-header h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.health-score {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--primary-color), #66BB6A);
    color: white;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: var(--shadow);
}

/* 건강 점수 막대 그래프 */
.health-score-bar-container {
    max-width: 600px;
    margin: 0 auto;
}

.health-score-bar-background {
    position: relative;
    width: 100%;
    height: 35px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.health-score-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 18px;
    transition: width 1s ease, background-color 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg, currentColor 0%, rgba(255, 255, 255, 0.3) 100%);
}

.health-score-indicator {
    position: absolute;
    top: 0;
    width: 5px;
    height: 100%;
    background-color: #fff;
    border-radius: 3px;
    z-index: 3;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    transition: left 1s ease;
}

.health-score-indicator::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #fff;
}

.health-score-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.health-score-indicator:hover .health-score-tooltip {
    opacity: 1;
}

.health-score-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.9;
    padding: 0 3px;
    margin-bottom: 5px;
}

.health-score-labels span {
    font-weight: 600;
}

.health-score-zones {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-top: 5px;
}

.health-score-zones span {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.zone-bad {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.zone-warning {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.zone-good {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.zone-excellent {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.result-summary {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.summary-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.summary-item h4 {
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.recommendations {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.recommendations h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.supplement-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.supplement-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.supplement-card .priority {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.supplement-card .priority.high {
    background: #ff5252;
}

.supplement-card .priority.medium {
    background: #ffa726;
}

.supplement-card .priority.low {
    background: #66bb6a;
}

.supplement-card p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.supplement-card .benefit {
    color: #ffeb3b;
    font-weight: 500;
}

.supplement-card .dosage {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

.supplement-card .caution {
    background: rgba(255, 82, 82, 0.25);
    border-left: 3px solid #ff5252;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-top: 12px;
}

.supplement-card .synergy {
    background: rgba(102, 187, 106, 0.25);
    border-left: 3px solid #66bb6a;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
}

.supplement-card .evidence {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 4px;
}

/* 건강 점수 산출 근거 */
.score-breakdown {
    margin-top: 25px;
    background: #f8f9fb;
    border-radius: 12px;
    padding: 18px 20px;
    text-align: left;
}

.score-breakdown h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.score-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.score-breakdown-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 0.92rem;
}

.score-breakdown-list li:last-child {
    border-bottom: none;
}

.score-breakdown-list .sb-delta {
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
}

.score-breakdown-list .score-plus .sb-delta {
    color: #2e7d32;
    background: rgba(76, 175, 80, 0.15);
}

.score-breakdown-list .score-minus .sb-delta {
    color: #c62828;
    background: rgba(244, 67, 54, 0.12);
}

/* 의학적 면책 배너 */
.medical-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffa000;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 20px 0;
}

.medical-disclaimer .disclaimer-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.medical-disclaimer p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #6d4c41;
    margin: 0;
}

/* 결과 저장/공유 액션 버튼 */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.result-actions .btn {
    flex: 1 1 auto;
    min-width: 180px;
    max-width: 280px;
}

/* 건강 점수 추이 차트 */
.health-trend-chart-wrap {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 18px 16px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.health-trend-chart-wrap canvas {
    width: 100% !important;
    max-height: 220px;
}

/* 건강 미션 */
.mission-board {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.mission-board h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: var(--text-color, #333);
}

.mission-group {
    margin-top: 16px;
}

.mission-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-progress-bar {
    flex: 1;
    height: 8px;
    background: #eceff1;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 8px;
}

.mission-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #43a047);
    border-radius: 6px;
    transition: width 0.4s ease;
}

.mission-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mission-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-size: 0.92rem;
}

.mission-item:hover {
    background: #f1f8e9;
    border-color: #c5e1a5;
}

.mission-item.done {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
    text-decoration: line-through;
    opacity: 0.85;
}

.mission-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #bdbdbd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: transparent;
    transition: all 0.2s;
}

.mission-item.done .mission-check {
    background: #43a047;
    border-color: #43a047;
    color: #fff;
}

.mission-reward {
    margin-left: auto;
    font-size: 0.82rem;
    color: #f9a825;
    font-weight: 700;
    white-space: nowrap;
}

/* 영양제 조합 추천 */
.combo-section {
    background: linear-gradient(135deg, #f1f8e9, #e8f5e9);
    border: 1px solid #c5e1a5;
    border-radius: 14px;
    padding: 22px;
    margin: 20px 0;
}

.combo-section h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    color: #2e7d32;
}

.combo-subtitle {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: #558b2f;
}

.combo-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.combo-card:last-child {
    margin-bottom: 0;
}

.combo-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.combo-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #37474f;
}

/* 건강 칼럼 아카이브 */
.health-column-section {
    margin-top: 40px;
    padding-top: 10px;
}

.health-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.health-column-card {
    background: var(--white, #fff);
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,0.06));
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.health-column-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.column-card-icon {
    font-size: 2rem;
}

.column-card-title {
    margin: 0;
    font-size: 1.05rem;
    color: #2e3a4d;
    font-weight: 700;
}

.column-card-summary {
    margin: 0;
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.5;
    flex: 1;
}

.column-card-more {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #43a047;
    font-weight: 700;
}

.column-modal-body {
    line-height: 1.7;
    color: #37474f;
    font-size: 0.95rem;
}

.column-modal-body ul {
    padding-left: 20px;
    margin: 12px 0;
}

.column-modal-body li {
    margin-bottom: 8px;
}

.column-modal-body p {
    margin: 10px 0;
}

.health-tips {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.health-tips h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.tip-item {
    padding: 15px;
    background: #fff3e0;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    gap: 12px;
}

.tip-item .tip-icon {
    font-size: 1.5rem;
}

.tip-item p {
    color: var(--text-dark);
    line-height: 1.6;
}

/* 카메라 체크 선택 화면 */
.camera-intro {
    text-align: center;
    color: var(--text-light);
    margin: 20px 0 20px;
    line-height: 1.8;
}

.device-notice {
    background: #e3f2fd;
    border-left: 4px solid var(--secondary-color);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0 30px;
    font-size: 0.9rem;
    line-height: 1.8;
}

.device-notice p {
    margin: 5px 0;
    color: var(--text-dark);
}

.device-notice strong {
    color: var(--secondary-color);
}

.camera-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.camera-option-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.camera-option-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.camera-option-card .camera-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.camera-option-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.camera-option-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 카메라 화면 */
.camera-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.camera-step-indicator {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.camera-card h2 {
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.camera-instruction {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 촬영 카운트다운 오버레이 */
.camera-countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: radial-gradient(circle at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
    z-index: 5;
}

.camera-countdown .count-number {
    font-size: 6rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 4px 24px rgba(109, 94, 252, 0.9), 0 2px 6px rgba(0,0,0,0.5);
    animation: countPop 1s ease-out;
}

.camera-countdown .count-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(109, 94, 252, 0.85);
    padding: 8px 18px;
    border-radius: 999px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.camera-countdown.flash {
    background: #ffffff;
    transition: background 0.15s ease;
}

@keyframes countPop {
    0% { transform: scale(1.8); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.heart-rate-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

.bpm-display {
    font-size: 3rem;
    color: #ff5252;
    font-weight: bold;
    animation: pulse 1s infinite;
}

.bpm-label {
    color: white;
    font-size: 1.2rem;
    margin-top: 10px;
}

.face-guide {
    border: 3px solid rgba(76, 175, 80, 0.8);
    border-radius: 50%;
    width: 80%;
    height: 0;
    padding-bottom: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.tongue-guide {
    border: 3px solid rgba(255, 152, 0, 0.8);
    border-radius: 20px;
    width: 70%;
    height: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.iris-guide {
    border: 3px solid rgba(156, 39, 176, 0.8);
    border-radius: 50%;
    width: 60%;
    height: 0;
    padding-bottom: 60%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.iris-tips {
    margin-top: 10px;
    padding-left: 20px;
    color: #666;
    font-size: 0.9rem;
}

.iris-tips li {
    margin: 5px 0;
}

.guide-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.camera-status {
    text-align: center;
    min-height: 60px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.camera-status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--primary-color);
}

.camera-status.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.camera-status.warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid var(--accent-color);
}

.camera-status.info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid var(--secondary-color);
}

.camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 카메라 결과 */
.camera-results {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.camera-results h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.camera-result-item {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.camera-result-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.camera-result-item .result-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.camera-result-item .result-unit {
    font-size: 1.2rem;
    opacity: 0.9;
}

.camera-result-item .result-status {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 10px;
}

.camera-result-item .result-description {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 8px 0;
}

.camera-result-item .result-detail {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* 건강 상태 막대 그래프 */
.health-bar-container {
    margin: 20px 0;
}

.health-bar-background {
    position: relative;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 8px;
}

.health-bar-normal {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(76, 175, 80, 0.4);
    border-left: 2px solid rgba(76, 175, 80, 0.8);
    border-right: 2px solid rgba(76, 175, 80, 0.8);
    z-index: 1;
}

.health-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s ease, background-color 0.5s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.health-bar-indicator {
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #fff;
    border-radius: 2px;
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
}

.health-bar-indicator::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid currentColor;
    color: inherit;
}

.health-bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    margin-bottom: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.health-bar-indicator:hover .health-bar-tooltip {
    opacity: 1;
}

.health-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.8;
    padding: 0 5px;
}

.health-bar-labels span {
    font-weight: 500;
}

/* 결과 상태 색상 */
.result-status.good,
.result-status.excellent {
    background: rgba(76, 175, 80, 0.3) !important;
    color: #4CAF50;
}

.result-status.warning {
    background: rgba(255, 152, 0, 0.3) !important;
    color: #FF9800;
}

.result-status.bad,
.result-status.poor {
    background: rgba(244, 67, 54, 0.3) !important;
    color: #F44336;
}

/* 화면 플래시 효과 */
#screen-flash {
    animation: flashPulse 1s infinite;
}

@keyframes flashPulse {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

/* 폼 요소 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.label-hint {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.error-message {
    color: #f44336;
    background: #ffebee;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 1.05rem;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.auth-modal {
    max-width: 450px;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--text-dark);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

/* 가이드 목차 */
.guide-toc {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.guide-toc h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.guide-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.guide-toc li a {
    display: block;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.guide-toc li a:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateX(5px);
}

/* 가이드 섹션 */
.guide-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

.guide-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

.guide-section h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin: 20px 0 10px;
}

.guide-section ul, .guide-section ol {
    line-height: 1.8;
    color: var(--text-dark);
    padding-left: 25px;
}

.guide-section li {
    margin: 8px 0;
}

.guide-section p {
    color: var(--text-dark);
    line-height: 1.8;
    margin: 10px 0;
}

/* 가이드 팁/경고/정보 */
.guide-tip, .guide-warning, .guide-info {
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    line-height: 1.6;
}

.guide-tip {
    background: #e8f5e9;
    border-left: 4px solid var(--primary-color);
    color: #2e7d32;
}

.guide-warning {
    background: #fff3e0;
    border-left: 4px solid var(--accent-color);
    color: #e65100;
}

.guide-info {
    background: #e3f2fd;
    border-left: 4px solid var(--secondary-color);
    color: #1565c0;
}

/* 기기 가이드 */
.device-guide {
    display: grid;
    gap: 15px;
    margin: 15px 0;
}

.device-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.device-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.device-item ul {
    margin: 0;
    padding-left: 20px;
}

/* 팁 그리드 */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tip-card {
    padding: 20px;
    border-radius: 12px;
    display: flex;
    gap: 15px;
}

.tip-card.success {
    background: #e8f5e9;
    border-left: 4px solid var(--primary-color);
}

.tip-card.error {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-card ul {
    margin: 5px 0 0;
    padding-left: 20px;
}

/* 기기 카드 */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.device-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.device-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.device-card strong {
    display: block;
    color: var(--text-dark);
    margin: 10px 0 5px;
    font-size: 1.1rem;
}

.device-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 5px 0;
}

/* 뱃지 */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

.badge-excellent {
    background: var(--primary-color);
    color: white;
}

.badge-good {
    background: var(--secondary-color);
    color: white;
}

/* 우선순위 색상 */
.priority-high {
    color: #f44336;
}

.priority-medium {
    color: var(--accent-color);
}

.priority-low {
    color: var(--primary-color);
}

/* FAQ */
.faq-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.faq-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.faq-item p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* 마이페이지 스타일 */
.user-info-card, .referral-card, .health-records {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.user-info-card h3, .referral-card h3, .health-records h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.user-info-card p {
    color: var(--text-dark);
    margin: 8px 0;
    line-height: 1.6;
}

.referral-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.referral-code-box.large {
    padding: 20px;
    justify-content: space-between;
}

.referral-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.referral-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.referral-link-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f9f9f9;
    color: #666;
    font-family: 'Courier New', monospace;
}

.referral-code-hint {
    text-align: center;
    color: #999;
    margin: 15px 0 5px 0;
    font-size: 0.9rem;
}

.referral-link-hint {
    text-align: center;
    color: #666;
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.referral-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 10px 0;
}

.referral-stats {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-top: 10px;
}

.health-record-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
}

.health-record-item .record-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.health-record-item .record-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 5px 0;
}

.no-records {
    text-align: center;
    color: var(--text-light);
    padding: 30px;
    font-style: italic;
}

/* 레퍼럴 정보 스타일 */
.referral-info-section {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.benefit-list li {
    padding: 10px 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.referral-code-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: white;
}

.referral-code-card h3 {
    color: white;
    margin-bottom: 15px;
}

.referral-code-card .referral-code {
    color: white;
}

.referral-code-card .btn-primary {
    background: white;
    color: #667eea;
}

.referral-code-card .btn-primary:hover {
    background: #f0f0f0;
}

.referral-stats-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.referral-guide {
    background: #fff3e0;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.referral-guide h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.referral-guide ol {
    margin: 10px 0;
    padding-left: 25px;
}

.referral-guide li {
    color: var(--text-dark);
    margin: 8px 0;
    line-height: 1.6;
}

/* 관리자 스타일 */
.admin-only {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white !important;
}

.admin-only:hover {
    background: linear-gradient(135deg, #ff5252, #e91e63);
}

.admin-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.admin-stats h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.admin-users {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.admin-users h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.users-table {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: var(--shadow);
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.users-table tbody tr:hover {
    background: #f8f9fa;
}

.user-email {
    color: var(--text-light);
    font-size: 0.9rem;
}

.user-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.point-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-edit {
    background: var(--secondary-color);
    color: white;
}

.btn-edit:hover {
    background: #1565c0;
}

.user-info-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.user-info-box p {
    margin: 8px 0;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-large {
    max-width: 1000px;
}

/* 레퍼럴 회원 목록 */
.referral-members-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.referral-members-section h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.referral-members-list {
    max-height: 400px;
    overflow-y: auto;
}

.referral-member-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.referral-member-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.member-email {
    color: var(--text-light);
    font-size: 0.9rem;
}

.member-date {
    color: var(--text-light);
    font-size: 0.85rem;
    text-align: right;
}

.member-points {
    text-align: right;
    margin-left: 15px;
}

.member-points .point-badge {
    display: block;
    margin-top: 5px;
}

/* AI 설정 스타일 */
.ai-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.ai-info-box h3 {
    color: white;
    margin-bottom: 10px;
}

.ai-info-box p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.ai-info-box .benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-info-box .benefit-list li {
    padding: 5px 0;
}

.help-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 5px;
}

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

.form-hint {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 5px;
}

.api-status {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--primary-color);
}

.api-status.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

#api-status-icon {
    font-size: 1.2rem;
}

/* 쇼핑몰 상태 */
.shopping-status {
    padding: 15px;
    border-radius: 10px;
    background: #f5f5f5;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group .btn {
    flex: 1;
}

/* 탭 스타일 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* AI 설정 카드 */
.admin-ai-settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.admin-ai-settings h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.ai-settings-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* AI 분석 결과 스타일 */
.ai-analysis {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.ai-analysis h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.ai-content {
    line-height: 1.8;
    font-size: 1rem;
}

.ai-content p {
    margin: 10px 0;
}

.ai-content strong {
    color: #ffeb3b;
}

.ai-reason {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid var(--secondary-color);
}

.ai-reason h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.ai-reason p {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 5px 0;
}

.ai-loading {
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 푸터 */
footer {
    background: linear-gradient(160deg, #1e1b3a 0%, #2a2350 55%, #3b2b63 100%);
    border-radius: var(--radius-lg);
    padding: 32px 28px 26px;
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.8;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 상단 그라데이션 액센트 라인 */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-gradient);
    background-size: 200% 100%;
    animation: shimmerLine 6s linear infinite;
}

/* 은은한 배경 광채 */
footer::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.footer-notice {
    position: relative;
    z-index: 1;
    max-width: 460px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    word-break: keep-all;
    line-height: 1.7;
}

.copyright {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.55);
    position: relative;
    z-index: 1;
}

/* 푸터 정책/네비게이션 링크 */
.footer-links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin: 18px auto 4px;
    max-width: 560px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    word-break: keep-all;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 회사 정보 카드 */
.company-info {
    position: relative;
    z-index: 1;
    margin-top: 24px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.company-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.company-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    object-fit: contain;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.company-info .company-name {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.2px;
    background: linear-gradient(135deg, #ffffff 0%, #d8b4fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    text-align: left;
}

.company-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.company-item-wide {
    grid-column: 1 / -1;
}

.company-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #c4b5fd;
}

.company-value {
    font-size: 0.86rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    word-break: keep-all;
}

/* RTL 푸터 정렬 */
body.rtl .company-grid { text-align: right; }

@media (max-width: 600px) {
    .company-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .brand,
    .header-content > div.brand {
        justify-content: center;
        text-align: center;
    }

    .brand-text {
        white-space: normal;
    }

    .brand-text h1 {
        font-size: 1.9rem;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

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

    .btn-auth {
        flex: 1;
    }

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

    .user-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .question-title {
        font-size: 1.3rem;
    }

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

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

    .btn {
        width: 100%;
    }

    .modal-content {
        margin: 10px;
        max-width: 100%;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
        max-height: 60vh;
    }

    .modal-footer {
        padding: 15px 20px;
    }

    .guide-toc ul {
        grid-template-columns: 1fr;
    }

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

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

    .users-table {
        overflow-x: auto;
    }

    .users-table table {
        min-width: 600px;
    }

    .modal-large {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .help-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

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

    .feature-item .emoji {
        font-size: 2rem;
    }
    
    .camera-features-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .camera-features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .camera-feature-card {
        padding: 20px;
    }
    
    .camera-feature-icon {
        font-size: 2.5rem;
    }
    
    .camera-feature-card h4 {
        font-size: 1rem;
    }
    
    .camera-feature-card p {
        font-size: 0.85rem;
    }
    
    .health-bar-container {
        margin: 15px 0;
    }
    
    .health-bar-background {
        height: 25px;
    }
    
    .health-bar-labels {
        font-size: 0.7rem;
    }
    
    .health-score-bar-container {
        max-width: 100%;
    }
    
    .health-score-bar-background {
        height: 30px;
    }
    
    .health-score-labels {
        font-size: 0.7rem;
    }
    
    .health-score-zones {
        font-size: 0.65rem;
    }
    
    .camera-result-item .result-detail {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .camera-result-item .result-description {
        font-size: 0.85rem;
    }

    .supplement-card h4 {
        font-size: 1.1rem;
    }

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

    .guide-section h3 {
        font-size: 1.3rem;
    }

    .guide-section h4 {
        font-size: 1.1rem;
    }

    .shopping-banner {
        padding: 30px 20px;
    }

    .shopping-banner h3 {
        font-size: 1.5rem;
    }

    .shopping-banner p {
        font-size: 1rem;
    }

    .btn-shopping {
        padding: 12px 30px;
        font-size: 1rem;
    }

    /* 회원가입 혜택 박스 모바일 */
    .signup-benefit {
        padding: 20px;
        margin: 20px 0;
    }

    .benefit-badge {
        font-size: 2rem;
    }

    .benefit-title {
        font-size: 1.2rem;
    }

    .benefit-list li {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .btn-signup-now {
        font-size: 1rem;
        padding: 12px 25px;
    }
}

