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

body {
    font-family: 'Noto Sans KR', 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: 0 20px;
}

/* 헤더 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

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

/* 메인 컨테이너 */
.main-container {
    padding: 20px 0;
}

/* 소개 섹션 */
.intro-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.intro-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

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

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    font-weight: 500;
}

.feature-icon {
    font-size: 1.5rem;
}

/* 업로드 섹션 */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.upload-container h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-guide {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.upload-area {
    position: relative;
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.15);
    transform: scale(1.02);
}

.upload-placeholder {
    pointer-events: none;
}

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

.upload-text p {
    margin-bottom: 5px;
}

.upload-subtext {
    font-size: 0.9rem;
    color: #999;
}

.uploaded-image {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.uploaded-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.upload-tips {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.upload-tips h4 {
    margin-bottom: 15px;
    color: #333;
}

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

.upload-tips li {
    padding: 5px 0;
    position: relative;
    padding-left: 25px;
}

.upload-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.analyze-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.analyze-btn:enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* 분석 중 섹션 */
.analyzing-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.analyzing-animation {
    position: relative;
    margin-bottom: 30px;
}

.scanning-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border: 3px solid #667eea;
    border-radius: 12px;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    animation: scanning 2s infinite;
}

@keyframes scanning {
    0% { transform: translateY(0); }
    100% { transform: translateY(194px); }
}

.analyzing-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    opacity: 0.3;
}

.analyzing-section h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.analyzing-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.step {
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.step.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    opacity: 1;
    transform: scale(1.02);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 결과 섹션 */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.result-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.main-result {
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.face-type {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.face-type-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.face-type-score {
    font-size: 1.2rem;
    color: #ff6b6b;
}

.face-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

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

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

.feature-analysis {
    text-align: center;
}

.feature-name {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.feature-meaning {
    color: #666;
    line-height: 1.6;
}

/* 운세 섹션 */
.fortune-section {
    margin: 30px 0;
}

.fortune-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333;
}

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

.fortune-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.fortune-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}

.fortune-score {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ff6b6b;
}

.fortune-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 조언 섹션 */
.advice-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.advice-section h3 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
}

.advice-content p {
    line-height: 1.8;
    color: #666;
    text-align: center;
}

/* 다시 하기 및 공유 섹션 */
.retry-section, .share-section {
    text-align: center;
    margin: 30px 0;
}

.retry-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.share-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.share-btn.kakao {
    background: #fee500;
    color: #3c1e1e;
}

.share-btn.url {
    background: #667eea;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 광고 컨테이너 */
.ad-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.ad-container.top {
    margin-top: 0;
}

.ad-container.bottom {
    margin-bottom: 0;
}

/* 푸터 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.footer p {
    margin-bottom: 5px;
    color: #666;
}

.disclaimer {
    font-size: 0.9rem;
    color: #999;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .intro-section,
    .upload-section,
    .analyzing-section,
    .result-section {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .intro-content h2 {
        font-size: 1.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .analyzing-face {
        font-size: 6rem;
    }
    
    .scanning-box {
        width: 150px;
        height: 150px;
    }
    
    .scan-line {
        animation: scanning 2s infinite;
    }
    
    @keyframes scanning {
        0% { transform: translateY(0); }
        100% { transform: translateY(144px); }
    }
    
    .analyzing-steps {
        gap: 8px;
    }
    
    .step {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .analysis-grid,
    .fortune-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .face-type {
        flex-direction: column;
        gap: 10px;
    }
    
    .face-type-name {
        font-size: 1.3rem;
    }
    
    .upload-tips {
        padding: 15px;
    }
    
    .upload-tips li {
        font-size: 0.9rem;
    }
}

/* 애니메이션 효과 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: fadeInUp 0.6s ease forwards;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }

/* 호버 효과 */
.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.fortune-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
