/**
 * Fortune Forms - 운세 폼 공통 스타일
 * 모든 운세 페이지(사주, 오늘의운세, 궁합, 꿈해몽, 신년운세)에서 공통으로 사용
 */

/* ============================================
   헤더 영역
   ============================================ */
.fortune-header {
    text-align: center;
    padding: 120px 20px 40px;
    margin-top: 60px;
}

.character-emoji {
    font-size: 80px;
    margin-bottom: 20px;
}

.character-form-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    margin: 0 auto 30px;
    display: block;
}

.fortune-title {
    font-size: 38px;
    margin-bottom: 10px;
}

.fortune-subtitle {
    font-size: 20px;
    color: #a0a0a0;
    margin-bottom: 10px;
}

.fortune-description {
    font-size: 16px;
    color: #d0d0d0;
}

/* ============================================
   폼 컨테이너
   ============================================ */
.form-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

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

label {
    display: block;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    font-size: 18px;
}

/* ============================================
   입력 필드 (Input, Select, Textarea)
   ============================================ */
input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 18px;
    color: #333333;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

input::placeholder,
textarea::placeholder {
    color: #999999;
}

/* Select 드롭다운 화살표 커스텀 */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ============================================
   제출 버튼
   ============================================ */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-submit:hover {
    background: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   섹션 구분선
   ============================================ */
.section-divider {
    margin: 32px 0;
    border-top: 1px solid #e0e0e0;
    padding-top: 32px;
}

.form-section-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2d5016;  /* 고급스러운 다크 그린 */
    font-weight: 700;
}

/* ============================================
   성별 선택 버튼
   ============================================ */
.gender-buttons {
    display: flex;
    gap: 12px;
}

.gender-btn {
    flex: 1;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gender-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.gender-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: #ffffff;
    font-weight: 600;
}

.gender-btn .emoji {
    font-size: 20px;
}

/* ============================================
   양력/음력 선택 버튼
   ============================================ */
.label-with-calendar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.calendar-buttons {
    display: flex;
    gap: 6px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
}

.calendar-btn {
    padding: 6px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-btn:hover {
    color: #333333;
    background: rgba(52, 152, 219, 0.1);
}

.calendar-btn.active {
    background: #3498db;
    color: #ffffff;
    font-weight: 600;
}

.calendar-btn svg {
    display: none;
}

/* ============================================
   커스텀 알림창 (Alert)
   ============================================ */
.custom-alert {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.custom-alert.active {
    display: flex;
}

.custom-alert-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-alert-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.custom-alert-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.custom-alert-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.custom-alert-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-alert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ============================================
   모바일 반응형
   ============================================ */
@media (max-width: 768px) {
    .fortune-header {
        padding: 40px 15px 30px;
    }

    .character-emoji {
        font-size: 60px;
    }

    .character-form-image {
        max-width: 90vw;
        border-radius: 16px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        margin-bottom: 20px;
    }

    .fortune-title {
        font-size: 30px;
    }

    .fortune-subtitle {
        font-size: 18px;
    }

    .form-container {
        margin: 20px 15px;
        padding: 24px;
        border-radius: 16px;
    }

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

    label {
        font-size: 18px;
    }

    input[type="text"],
    input[type="date"],
    select,
    textarea {
        padding: 12px;
        font-size: 18px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 17px;
    }

    .gender-btn {
        padding: 12px;
        font-size: 15px;
    }

    .calendar-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .form-section-title {
        font-size: 18px;
    }
}
