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

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --text-dark: #333;
    --text-light: #666;
    --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: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', '맑은 고딕', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.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 h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

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

/* 언어 선택 */
.language-selector {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.lang-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    font-weight: 600;
}

.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: rgba(255, 255, 255, 0.95);
    color: #667eea;
}

.btn-auth-primary:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

/* 사용자 메뉴 */
.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: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: 30px;
}

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

.welcome-card h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.welcome-card p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.welcome-features {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 0.95rem !important;
    margin-bottom: 25px !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 회원가입 혜택 박스 */
.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: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-item .emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.feature-item h3 {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 5px;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 카메라 기능 소개 섹션 */
.camera-features-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 30px 0;
}

/* 의사 소개 섹션 */
.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.5rem;
    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, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

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

.camera-feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.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(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    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;
}

.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;
}

.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: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    margin-top: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.8;
}

.copyright {
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

/* 애니메이션 */
@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;
    }

    .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;
    }
}

