:root {
    --primary-color: #2c1654;
    --secondary-color: #6b46c1;
    --accent-color: #d4af37;
    --bg-dark: #0f0a1e;
    --bg-card: #1a1333;
    --text-light: #f5f5f5;
    --text-gray: #b8b8b8;
    --shadow: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Noto Serif KR', serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-color) 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 스타일 */
.header {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.header-content {
    animation: fadeInDown 1s ease-out;
}

.header-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.header-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px var(--shadow);
    background: linear-gradient(90deg, var(--accent-color), #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    font-weight: 300;
}

/* 입력 폼 섹션 */
.input-section {
    margin-bottom: 60px;
}

.form-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 1px solid rgba(212, 175, 55, 0.2);
    animation: fadeInUp 1s ease-out;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    font-size: 1.5rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-gray);
    font-weight: 500;
}

.form-group input {
    padding: 15px;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    background: rgba(107, 70, 193, 0.1);
    color: var(--text-light);
    transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.form-group textarea {
    padding: 15px;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    background: rgba(107, 70, 193, 0.1);
    color: var(--text-light);
    transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.form-group textarea::placeholder {
    color: rgba(184, 184, 184, 0.6);
}

.submit-btn {
    grid-column: 1 / -1;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-light);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Noto Serif KR', serif;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

.submit-btn i {
    font-size: 1.3rem;
}

/* 결과 섹션 */
.result-section {
    animation: fadeInUp 1s ease-out;
}

/* 핵심 카드 */
.core-cards {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

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

.card-item {
    background: rgba(107, 70, 193, 0.2);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.card-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.card-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-gray);
    font-weight: 500;
}

.card-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Cinzel', serif;
}

/* 분석 컨테이너 */
.analysis-container {
    display: grid;
    gap: 30px;
}

.analysis-item {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px var(--shadow);
    border-left: 5px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.analysis-item:hover {
    transform: translateX(5px);
    border-left-color: var(--accent-color);
}

.analysis-item h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.analysis-item h3 i {
    font-size: 1.3rem;
}

.analysis-content {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-light);
}

.analysis-content strong {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.analysis-item.highlight {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.3), rgba(212, 175, 55, 0.2));
    border: 2px solid var(--accent-color);
}

.analysis-item.card-summary {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--accent-color);
}

.card-summary-content {
    display: grid;
    gap: 15px;
}

.card-summary-item {
    background: rgba(107, 70, 193, 0.2);
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
}

.card-summary-item strong {
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* 푸터 */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

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

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

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .form-container,
    .core-cards,
    .analysis-item {
        padding: 25px;
    }

    .birth-form {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* 로딩 스피너 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
