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

body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segue UI Symbol', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.input-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.input-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #4a5568;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group select {
    width: 100%;
    padding: 12px 40px 12px 15px !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

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

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

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

.button-row {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    align-items: center;
}

.button-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.group-title {
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    margin-right: 8px;
    white-space: nowrap;
}

.option-button {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.option-button:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.option-button.active {
    background: #748BFF;
    color: white;
    border: none;
}

.option-button.active:hover {
    background: #6b7cff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 24px;
}

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

.result-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-height: 100vh;
}

.result-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #4a5568;
    font-size: 1.8rem;
}

.saju-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.calendar-info {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.calendar-info h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.saju-pillar {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pillar-title {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.heavenly-stem, .earthly-branch {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3748;
    margin: 5px 0;
}

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

.fortune-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.fortune-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.fortune-content {
    line-height: 1.6;
    color: #2d3748;
}

.unknown-time {
    color: #e53e3e;
    font-style: italic;
    font-weight: 600;
}

/* 결과 페이지 스타일 */
.result-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-height: 100vh;
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.back-btn {
    padding: 10px 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

#result-title {
    color: #2d3748;
    font-size: 2rem;
    margin: 0;
}

.content-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.tab-button.active {
    background: #748BFF;
    color: white;
    border-color: #748BFF;
}

.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.fortune-content {
    line-height: 1.8;
    color: #2d3748;
    font-size: 16px;
}

.fortune-content h3 {
    color: #000000;
    margin-bottom: 4px;
    font-size: 1.2rem;
    font-weight: 600;
}

.fortune-content p {
    margin-bottom: 16px;
    color: #6b7280;
}

.fortune-content p:last-of-type {
    margin-bottom: 0 !important;
}

/* 성격 특징 탭의 마지막 문단 마진 조정 */
#personality .fortune-content p:last-of-type {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .saju-chart {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fortune-sections {
        grid-template-columns: 1fr;
    }
    
    .content-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.restart-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.restart-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

.restart-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 푸터 스타일 */
.site-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 15px;
    font-size: 14px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 0;
}

/* 모바일 푸터 조정 */
@media (max-width: 768px) {
    .site-footer {
        padding: 15px 0;
        margin-top: 20px;
    }
    
    .footer-links {
        margin-bottom: 8px;
    }
    
    .footer-link {
        font-size: 13px;
    }
    
    .footer-separator {
        margin: 0 10px;
    }
    
    .footer-copyright {
        font-size: 11px;
    }
}
