* {
    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, #ff9a8b 0%, #a8e6cf 25%, #ffd3a5 50%, #fd9853 75%, #fea47f 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, #ff6b6b, #feca57);
    -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;
}

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

.celebrity-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid transparent;
}

.celebrity-preview:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.celebrity-preview[data-category="korean"] { border-color: #ff6b6b; }
.celebrity-preview[data-category="hollywood"] { border-color: #4ecdc4; }
.celebrity-preview[data-category="kpop"] { border-color: #feca57; }
.celebrity-preview[data-category="japanese"] { border-color: #ff9ff3; }
.celebrity-preview[data-category="chinese"] { border-color: #54a0ff; }
.celebrity-preview[data-category="global"] { border-color: #5f27cd; }

.celebrity-emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* 업로드 섹션 */
.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 #ff6b6b;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    background: rgba(255, 107, 107, 0.05);
}

.upload-area:hover {
    border-color: #feca57;
    background: rgba(254, 202, 87, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #feca57;
    background: rgba(254, 202, 87, 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(255, 107, 107, 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;
    font-size: 1rem;
}

.analyze-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    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(255, 107, 107, 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;
}

.celebrity-scanner {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    border: 3px solid #ff6b6b;
    overflow: hidden;
}

.rotating-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: rotating 3s infinite linear;
}

.star-icon {
    position: absolute;
    font-size: 1.8rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-icon:nth-child(1) { top: 10px; left: 50%; transform: translateX(-50%); }
.star-icon:nth-child(2) { top: 50%; right: 10px; transform: translateY(-50%); }
.star-icon:nth-child(3) { bottom: 10px; left: 50%; transform: translateX(-50%); }
.star-icon:nth-child(4) { top: 50%; left: 10px; transform: translateY(-50%); }
.star-icon:nth-child(5) { top: 25%; right: 25%; }
.star-icon:nth-child(6) { bottom: 25%; left: 25%; }

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

.scan-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.3;
    z-index: 10;
}

.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(255, 107, 107, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

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

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

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    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(255, 107, 107, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.main-result {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(254, 202, 87, 0.1));
}

.celebrity-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.celebrity-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.celebrity-result h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.celebrity-category {
    font-size: 1rem;
    color: #666;
    background: rgba(255, 107, 107, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.similarity-score {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2rem;
    font-weight: 600;
}

.similarity-score span:last-child {
    color: #ff6b6b;
    font-size: 1.5rem;
}

.celebrity-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    max-width: 600px;
}

/* 상세 분석 */
.detailed-analysis {
    margin: 30px 0;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.features-list, .charm-points, .style-recommendations, .acting-style {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item, .charm-item, .style-item, .acting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
}

.feature-icon, .charm-icon, .style-icon, .acting-icon {
    font-size: 1.2rem;
    min-width: 25px;
}

/* 다른 닮은꼴들 */
.other-matches-section {
    margin: 30px 0;
}

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

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

.other-match-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.other-match-item:hover {
    transform: translateY(-3px);
}

.other-match-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
}

.other-match-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.other-match-score {
    font-size: 1rem;
    color: #ff6b6b;
    font-weight: 500;
}

/* 연예인 스타일 추천 */
.style-recommendations-section {
    margin: 30px 0;
}

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

.recommendation-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.category-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.recommendation-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
}

.item-icon {
    font-size: 1.3rem;
    min-width: 30px;
}

.item-text {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.item-description {
    font-size: 0.9rem;
    color: #666;
}

/* 다시 하기 및 공유 섹션 */
.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, #ff6b6b, #feca57);
    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(255, 107, 107, 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: #ff6b6b;
    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;
    }
    
    .celebrity-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .celebrity-scanner {
        width: 150px;
        height: 150px;
    }
    
    .scan-face {
        font-size: 3rem;
    }
    
    .analyzing-steps {
        gap: 8px;
    }
    
    .step {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .other-matches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recommendation-categories {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .celebrity-gallery {
        grid-template-columns: 1fr;
    }
    
    .celebrity-emoji {
        font-size: 2rem;
    }
    
    .celebrity-image {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
    
    .upload-tips {
        padding: 15px;
    }
    
    .upload-tips li {
        font-size: 0.9rem;
    }
    
    .other-matches-grid {
        grid-template-columns: 1fr;
    }
}

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

.result-card, .feature-card, .other-match-item, .category-card {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

/* [광고] 광고 컨테이너 스타일 */
.ad-container {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.ad-container.top {
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #fff5f5 0%, #fef5e7 100%);
    border: 1px solid #ff9a8b;
}

.ad-container.mid {
    margin: 30px auto;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
    border: 1px solid #74b9ff;
}

.ad-container.result {
    margin: 20px auto;
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border: 1px solid #00b894;
}

.ad-container ins {
    margin: 0 auto;
}
