* {
    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 25%, #ffecd2 75%, #fcb69f 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;
}

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

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

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

.animal-preview.cat { border-color: #ff6b9d; }
.animal-preview.dog { border-color: #ffa726; }
.animal-preview.rabbit { border-color: #66bb6a; }
.animal-preview.fox { border-color: #ff7043; }
.animal-preview.bear { border-color: #8d6e63; }
.animal-preview.hamster { border-color: #ffb74d; }

.animal-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 #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;
    font-size: 1rem;
}

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

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

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

.animal-icon {
    position: absolute;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animal-icon:nth-child(1) { top: 10px; left: 50%; transform: translateX(-50%); }
.animal-icon:nth-child(2) { top: 50%; right: 10px; transform: translateY(-50%); }
.animal-icon:nth-child(3) { bottom: 10px; left: 50%; transform: translateX(-50%); }
.animal-icon:nth-child(4) { top: 50%; left: 10px; transform: translateY(-50%); }
.animal-icon:nth-child(5) { top: 25%; right: 25%; }
.animal-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(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));
}

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

.animal-emoji-large {
    font-size: 5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.animal-result h3 {
    font-size: 2rem;
    color: #333;
    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: #667eea;
    font-size: 1.5rem;
}

.animal-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(102, 126, 234, 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, .personality-traits, .charm-points, .style-recommendations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

/* 캐릭터 섹션 */
.character-section {
    margin: 30px 0;
}

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

.character-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.character-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-emoji {
    font-size: 6rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.character-accessories {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.character-info h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.character-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.character-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-label {
    min-width: 80px;
    font-weight: 500;
    color: #666;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

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

/* 궁합 섹션 */
.compatibility-section {
    margin: 30px 0;
}

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

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

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

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

.compatibility-animals {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.compatibility-emoji {
    font-size: 2rem;
}

.compatibility-score {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.compatibility-score.excellent { color: #4caf50; }
.compatibility-score.good { color: #ff9800; }
.compatibility-score.average { color: #2196f3; }

.compatibility-description {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* 추천 아이템 섹션 */
.recommendations-section {
    margin: 30px 0;
}

.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(102, 126, 234, 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, #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;
    }
    
    .animal-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .animal-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;
    }
    
    .character-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .character-emoji {
        font-size: 4rem;
    }
    
    .compatibility-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendation-categories {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .animal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .animal-emoji {
        font-size: 2rem;
    }
    
    .animal-emoji-large {
        font-size: 4rem;
    }
    
    .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, .feature-card, .character-card, .compatibility-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;
}
