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

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: 0 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px 0;
    padding: 30px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header-content h1 .emoji {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.header-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.language-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn.active {
    background: #667eea;
    color: white;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Form Styles */
.form-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px 0;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.form-group {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

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

/* Results Styles */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px 0;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.child-info {
    text-align: center;
    margin-bottom: 30px;
}

.child-info h2 {
    color: #4a5568;
    font-size: 2rem;
    margin-bottom: 10px;
}

.birth-info {
    color: #666;
    font-size: 1.1rem;
}

.four-pillars-display {
    margin-bottom: 40px;
}

.four-pillars-display h3 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

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

.pillar-item {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.pillar-item:hover {
    transform: translateY(-5px);
}

.pillar-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.pillar-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a5568;
}

.profile-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #feb2b2;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.profile-header h3 {
    color: #4a5568;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

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

.profile-content > div {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.profile-content h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.profile-content p {
    color: #666;
    line-height: 1.6;
}

.strengths-section ul {
    list-style: none;
    padding: 0;
}

.strengths-section li {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    margin: 8px 0;
    border-radius: 20px;
    display: inline-block;
    margin-right: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.activities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.activity-item {
    background: #f0fff4;
    border: 2px solid #9ae6b4;
    color: #276749;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.elements-chart {
    margin-bottom: 30px;
}

.elements-chart h3 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.element-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 3px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.element-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--element-color);
    border-radius: 15px 15px 0 0;
}

.element-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.element-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 8px;
}

.element-count {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.element-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.element-bar-fill {
    height: 100%;
    background: var(--element-color);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.share-section {
    text-align: center;
    padding: 20px 0;
}

.share-btn,
.new-analysis-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.share-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.new-analysis-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.share-btn:hover,
.new-analysis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px 0;
    padding: 20px;
    text-align: center;
    color: #666;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-content h1 .emoji {
        font-size: 2.5rem;
    }
    
    .form-section,
    .results-section {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .elements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-section {
        padding: 20px 0;
    }
    
    .share-btn,
    .new-analysis-btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .pillars-grid {
        grid-template-columns: 1fr;
    }
    
    .elements-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-emoji {
        font-size: 3rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Domains Section */
.domains-section {
    grid-column: 1 / -1;
    margin-top: 10px;
}

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

.domain-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid #cbd5e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.domain-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.domain-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.domain-age {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 16px;
    text-align: center;
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.domain-age:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.domain-age::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.age-icon {
    font-size: 1.3rem;
    margin-right: 4px;
}

.age-label {
    font-weight: 700;
    color: #4a5568;
}

.age-range {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.domain-detail {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.domain-detail:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.domain-detail.strength {
    border-left-color: #48bb78;
}

.domain-detail.growth {
    border-left-color: #ed8936;
}

.domain-detail.activity {
    border-left-color: #667eea;
}

.domain-detail strong {
    color: #2d3748;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.domain-detail strong::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.domain-detail.strength strong::before {
    background: #48bb78;
}

.domain-detail.growth strong::before {
    background: #ed8936;
}

.domain-detail.activity strong::before {
    background: #667eea;
}

.domain-detail p {
    margin: 0;
    color: #4a5568;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Age Timeline */
.domains-timeline {
    display: none;
    position: relative;
    padding: 20px 0;
    margin-bottom: 30px;
}

.domains-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-50%);
}

.timeline-item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.timeline-item.active {
    background: #764ba2;
    transform: translateY(-50%) scale(1.3);
}

.timeline-label {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
    white-space: nowrap;
}

/* Responsive Design for Domains */
@media (max-width: 768px) {
    .domains-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .domain-item {
        padding: 20px;
    }
    
    .domain-age {
        font-size: 1rem;
    }
    
    .domain-detail {
        padding: 10px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .domains-container {
        gap: 12px;
    }
    
    .domain-item {
        padding: 16px;
    }
    
    .domain-age {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .domain-detail {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .domain-detail strong {
        font-size: 0.9rem;
    }
    
    .domain-detail p {
        font-size: 0.9rem;
    }
}

/* Domain Animation */
.domain-item {
    animation: fadeInUp 0.6s ease-out;
}

.domain-item:nth-child(1) { animation-delay: 0.1s; }
.domain-item:nth-child(2) { animation-delay: 0.2s; }
.domain-item:nth-child(3) { animation-delay: 0.3s; }
.domain-item:nth-child(4) { animation-delay: 0.4s; }
.domain-item:nth-child(5) { animation-delay: 0.5s; }
.domain-item:nth-child(6) { animation-delay: 0.6s; }
.domain-item:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Element Colors */
.element-목 { --element-color: #4CAF50; }
.element-화 { --element-color: #FF5722; }
.element-토 { --element-color: #8BC34A; }
.element-금 { --element-color: #FFC107; }
.element-수 { --element-color: #2196F3; } 