* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 접근성: 스크린리더 전용 텍스트 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 포커스 접근성 개선 */
.upload-area:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
}

/* 언어 선택기 스타일 */
.language-selector {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-selector select option {
    background: #667eea;
    color: white;
    padding: 5px 10px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 업로드 섹션 */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #667eea;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.9rem !important;
    color: #999 !important;
    font-weight: normal !important;
}

/* 미리보기 섹션 */
.preview-section {
    text-align: center;
    margin-top: 30px;
}

#previewImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.analyze-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}   

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 로딩 섹션 */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* AI 로딩 섹션 */
.ai-tips-loading {
    text-align: center;
    padding: 30px 20px;
    background: #f0f8ff;
    border-radius: 10px;
    margin-bottom: 20px;
}

.ai-loader {
    width: 40px;
    height: 40px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.ai-tips-loading p {
    color: #667eea;
    font-weight: 500;
    font-style: italic;
}



.ai-tip-section {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.ai-tip-section h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.ai-tip-section p {
    line-height: 1.6;
    color: #444;
}

.ai-tip-section ul {
    padding-left: 20px;
    margin-top: 10px;
}

.ai-tip-section li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* 결과 섹션 */
.result-section {
    margin-top: 30px;
}

.result-section h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2rem;
}

.result-image-container {
    text-align: center;
    margin-bottom: 30px;
}

.result-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #667eea;
}

/* 얼굴 인식 결과 스타일 */
.face-detection-info {
    background: #f0f8ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #e0e6ff;
}

.face-detection-status h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.face-detection-status p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 15px;
}

.face-image-container {
    text-align: center;
    margin-top: 20px;
}

.face-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #667eea;
}

.skin-tone-info, .personal-color-result, .recommended-colors, .color-tips, .ai-generated-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.skin-tone-info h3, .personal-color-result h3, .recommended-colors h3, .color-tips h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skin-color-sample {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.type-badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 15px 0;
    text-align: center;
}

.type-badge.spring {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #d63384;
}

.type-badge.summer {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #0dcaf0;
}

.type-badge.autumn {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #fd7e14;
}

.type-badge.winter {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    color: #6f42c1;
}

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

.color-item {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.color-item:hover {
    transform: scale(1.1);
}

.styling-tips {
    line-height: 1.8;
}

.tip-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.reset-btn {
    display: block;
    margin: 30px auto 0;
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    /* 언어 선택기 모바일 스타일 */
    .language-selector {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .language-selector select {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 25px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .color-palette {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 10px;
    }
    
    .result-image {
        max-width: 250px;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .language-selector select {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 10px;
    }
    
    .upload-content p {
        font-size: 1rem;
    }
    
    .result-image {
        max-width: 200px;
        max-height: 200px;
    }
} 