* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    line-height: 1.6;
}

/* 네비게이션 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 12px 16px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #374151;
}

.nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
}

.emoji {
    font-size: 24px;
}

.brand {
    font-family: 'Pacifico', cursive;
    color: #6366f1;
}

/* 메인 콘텐츠 */
.main-content {
    margin-top: 60px;
    padding: 24px 20px 80px;
    min-height: calc(100vh - 60px);
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* 폼 컨테이너 */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.form-header p {
    color: #6b7280;
}

.form-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.form-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

/* 방법 선택 */
.method-selector {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.method-option input[type="radio"] {
    display: none;
}

.method-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.method-option input[type="radio"]:checked + .method-card {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.05);
}

.method-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    margin-right: 12px;
    color: #6366f1;
    font-size: 20px;
}

.method-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.method-info p {
    font-size: 14px;
    color: #6b7280;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.time-input-wrapper {
    position: relative;
}

.time-input-wrapper input[type="time"] {
    padding-right: 40px;
}

/* time input의 기본 캘린더 아이콘 숨기기 */
.time-input-wrapper input[type="time"]::-webkit-calendar-picker-indicator {
    background: none;
    position: absolute;
    right: 12px;
    cursor: pointer;
    opacity: 0;
    z-index: 1;
}

.time-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 0;
}

/* 성별 선택 */
.gender-selector {
    display: flex;
    gap: 16px;
}

.gender-option {
    flex: 1;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.gender-option input[type="radio"]:checked + span {
    background-color: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* 운세 타입 선택 */
.fortune-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.fortune-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.fortune-type-card input[type="radio"],
.fortune-type-card input[type="checkbox"] {
    display: none;
}

.fortune-type-card input[type="radio"]:checked + .fortune-icon,
.fortune-type-card input[type="checkbox"]:checked + .fortune-icon {
    border-color: #6366f1;
}

.fortune-type-card:has(input:checked) {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.05);
}

.fortune-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 8px;
    font-size: 24px;
}

.fortune-icon.love {
    background: #fee2e2;
    color: #ef4444;
}

.fortune-icon.business {
    background: #dbeafe;
    color: #3b82f6;
}

.fortune-icon.wealth {
    background: #fef3c7;
    color: #f59e0b;
}

.fortune-icon.general {
    background: #e9d5ff;
    color: #a855f7;
}

.fortune-type-card span {
    font-size: 14px;
    font-weight: 500;
}

/* 폼 액션 */
.form-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    flex: 1;
    background: #6366f1;
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #5855eb;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 결과 화면 */
.result-container {
    max-width: 600px;
    margin: 0 auto;
}

.result-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.result-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    margin-right: 12px;
    font-size: 24px;
}

.result-info h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.result-info p {
    font-size: 14px;
    color: #6b7280;
}

.result-summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.result-summary p {
    margin-bottom: 8px;
}

.lucky-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.lucky-section h3 {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.lucky-section ul {
    list-style: disc;
    padding-left: 24px;
    font-size: 14px;
    color: #374151;
}

.lucky-items {
    background: #eff6ff;
    border-radius: 8px;
    padding: 16px;
}

.lucky-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    border-radius: 8px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.loading-subtitle {
    font-size: 14px;
    color: #6b7280;
}

/* 알림 */
.alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 16px;
    z-index: 1001;
    max-width: 90%;
    width: 400px;
    text-align: center;
}

.alert p {
    margin-bottom: 16px;
    color: #1f2937;
}

/* 반응형 */
@media (max-width: 640px) {
    .fortune-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

