/* AI 택일소 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav a:hover,
.nav a.active {
    color: white;
    background: rgba(255,255,255,0.2);
}

/* 히어로 섹션 */
.hero {
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    min-width: 100px;
}

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

/* 목적 선택 */
.purpose-selection {
    padding: 4rem 2rem;
    text-align: center;
    background: #fafafa;
}

.purpose-selection h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.purpose-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.purpose-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #e8a87c;
}

.purpose-card.selected {
    border-color: #e8a87c;
    background: #fff8f5;
}

.purpose-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.purpose-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.purpose-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.purpose-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e8a87c;
    background: #fff5f0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
}

/* 택일 폼 */
.choice-form {
    padding: 4rem 2rem;
    background: #f8f9fa;
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff8f5;
    border-radius: 15px;
    border-left: 4px solid #e8a87c;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: #c38d9e;
    font-size: 1.3rem;
}

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

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e8a87c;
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 100px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-group input[type="date"] {
    font-family: inherit;
}

/* 체크박스 그룹 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.checkbox-group label:hover {
    border-color: #e8a87c;
    background: #fff8f5;
}

.checkbox-group label input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-top: 0;
}

.checkbox-group label input[type="checkbox"]:checked + span {
    color: #e8a87c;
    font-weight: bold;
}

/* 폼 액션 */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-back,
.btn-submit,
.btn-new,
.btn-share,
.btn-save {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-back {
    background: #6c757d;
    color: white;
}

.btn-submit {
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    color: white;
}

.btn-new {
    background: #28a745;
    color: white;
}

.btn-share {
    background: #17a2b8;
    color: white;
}

.btn-save {
    background: #ffc107;
    color: #333;
}

.btn-back:hover,
.btn-submit:hover,
.btn-new:hover,
.btn-share:hover,
.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 결과 섹션 */
.result-section {
    padding: 4rem 2rem;
    background: #f8f9fa;
}

.result-container {
    max-width: 1000px;
    margin: 0 auto;
}

.result-header {
    text-align: center;
    margin-bottom: 3rem;
}

.result-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.result-header p {
    font-size: 1.2rem;
    color: #666;
}

/* 달력 개요 */
.calendar-overview {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.calendar-overview h3 {
    color: #e8a87c;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.month-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.calendar-day {
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.calendar-day.header {
    background: #e8a87c;
    color: white;
    font-size: 0.9rem;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.normal {
    background: #f8f9fa;
    color: #666;
}

.calendar-day.recommended {
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(232, 168, 124, 0.3);
    animation: pulse 2s infinite;
}

.calendar-day.good {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.calendar-day.bad {
    background: #f8d7da;
    color: #721c24;
    text-decoration: line-through;
}

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

/* 날짜 결과 */
.date-results {
    display: grid;
    gap: 2rem;
}

.date-result {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 5px solid #e8a87c;
}

.date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #fff8f5;
}

.date-title {
    font-size: 2rem;
    font-weight: bold;
    color: #e8a87c;
}

.date-rank {
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
}

.date-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    background: #fff8f5;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.info-label {
    font-weight: bold;
    color: #c38d9e;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-value {
    color: #333;
    font-size: 1.1rem;
}

.date-analysis {
    background: #f0f8f0;
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1rem;
}

.analysis-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-content {
    color: #555;
    line-height: 1.6;
}

/* 길흉 점수 */
.fortune-score {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-bar {
    flex: 1;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.score-text {
    font-weight: bold;
    color: #333;
    min-width: 60px;
}

/* 결과 액션 */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e8a87c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-content h3 {
    margin-bottom: 1rem;
    color: #333;
}

.loading-text {
    color: #666;
    margin-bottom: 1rem;
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #e8a87c 0%, #c38d9e 100%);
    border-radius: 3px;
    animation: progress 4s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* 푸터 */
.footer {
    background: #333;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-features {
        gap: 1rem;
    }
    
    .feature {
        min-width: 80px;
        padding: 0.8rem;
    }
    
    .purpose-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .form-container {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .date-info {
        grid-template-columns: 1fr;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .month-calendar {
        font-size: 0.9rem;
    }
    
    .calendar-day {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .purpose-selection,
    .choice-form,
    .result-section {
        padding: 2rem 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .date-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .purpose-grid {
        grid-template-columns: 1fr;
    }
}