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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 레이아웃 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 헤더 */
.main-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

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

.api-key-input {
    margin-top: 20px;
}

.api-key-input input {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* 업로드 섹션 */
.upload-section {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-preview {
    width: 100%;
    height: 300px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.upload-controls {
    text-align: center;
}

.upload-controls input[type="file"] {
    display: none;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 버튼 스타일 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: #3498db;
    color: white;
}

.btn.primary:hover {
    background-color: #2980b9;
}

.btn.secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.btn.secondary:hover {
    background-color: #bdc3c7;
}

.icon {
    font-size: 1.2em;
}

/* 스타일 버튼 */
.style-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.style-btn {
    padding: 8px 16px;
    border: 2px solid #3498db;
    border-radius: 20px;
    background: transparent;
    color: #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.style-btn:hover {
    background: #3498db;
    color: white;
}

.style-btn.active {
    background: #3498db;
    color: white;
}

/* 스타일 상세 정보 */
.style-detail {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.style-detail h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.style-detail .suitability {
    color: #2c3e50;
    margin: 10px 0;
}

.key-items {
    margin-top: 15px;
}

.key-items ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 8px;
}

.key-items li {
    padding: 4px 0;
    color: #666;
}

/* 결과 섹션 */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.result-box {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.result-box:last-child {
    margin-bottom: 0;
}

.result-box header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.result-box h2 {
    color: #2c3e50;
    font-size: 1.5em;
}

/* 분석 결과 스타일 */
.analysis-results {
    line-height: 1.8;
}

.analysis-results h3 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
}

.analysis-results p {
    margin-bottom: 12px;
    color: #444;
}

.analysis-results li {
    margin-left: 24px;
    margin-bottom: 8px;
    color: #444;
}

/* 분석 결과 섹션 */
.face-analysis,
.style-recommendations,
.styling-tips {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-item {
    margin-bottom: 15px;
}

.result-item h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.result-item p {
    color: #666;
    line-height: 1.5;
}

/* 쇼핑 프레임 스타일 */
.shopping-frame-container {
    margin-top: 20px;
    width: 100%;
    height: 600px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

#shoppingFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 로딩 메시지 스타일 */
.loading-message {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

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

/* 에러 메시지 스타일 */
.error-message {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.error-message h3 {
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.error-message p {
    color: #4a5568;
    margin-bottom: 1rem;
}

.error-message .btn {
    margin-top: 1rem;
}
