/**
 * Birth Page - Mobile-First UX Styles
 * 遵循 44px 最小触控区域规范
 * 遵循 8px 间距系统
 */

/* === 页面容器 === */
.birth-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* 动态视口单位，适配移动端键盘 */
    padding: 24px 20px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* === Hero 标题区 === */
.birth-hero {
    text-align: center;
    padding: 32px 0 24px;
}

.birth-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text-primary);
    margin: 0 0 12px;
}

.birth-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
    letter-spacing: 0.5px;
}

/* === 表单卡片 === */
.birth-form-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* === 表单区块 === */
.form-section {
    margin-bottom: 24px;
}

.form-section-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

/* === 日期选择器行 === */
.date-row {
    display: flex;
    gap: 10px;
}

.date-field {
    flex: 1;
    position: relative;
}

/* 日期下拉框 - 移动端优化 */
.date-select {
    width: 100%;
    height: 48px; /* 超过 44px 最小触控区域 */
    padding: 0 12px;
    font-size: 16px; /* 防止 iOS 缩放 */
    font-weight: 500;
    color: var(--color-text-primary);
    background: #F8F8F8;
    border: 1px solid #EBEBEB;
    border-radius: 12px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.date-select:focus {
    outline: none;
    border-color: var(--wuxing-fire);
    background: white;
}

/* 下拉箭头 */
.date-field::after {
    content: "▾";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
    pointer-events: none;
}

/* === 性别选择器 === */
.gender-row {
    display: flex;
    gap: 12px;
}

.gender-pill {
    flex: 1;
    cursor: pointer;
}

.gender-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gender-pill-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px; /* 舒适的触控区域 */
    background: #F8F8F8;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
}

.gender-icon {
    font-size: 20px;
    opacity: 0.7;
}

/* 选中状态 */
.gender-pill input:checked + .gender-pill-inner {
    background: rgba(212, 154, 154, 0.12);
    border-color: var(--wuxing-fire);
    color: var(--wuxing-fire);
}

.gender-pill input:checked + .gender-pill-inner .gender-icon {
    opacity: 1;
}

/* Focus 状态 (键盘导航) */
.gender-pill input:focus-visible + .gender-pill-inner {
    box-shadow: 0 0 0 3px rgba(212, 154, 154, 0.3);
}

/* === CTA 按钮 === */
.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 56px; /* 大拇指友好 */
    margin-top: auto; /* 推到底部 */
    background: linear-gradient(135deg, var(--wuxing-fire), var(--wuxing-earth));
    color: white;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 20px rgba(212, 154, 154, 0.35);
}

.cta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.cta-btn:not(:disabled):active {
    transform: scale(0.97);
}

.cta-arrow {
    font-size: 20px;
    transition: transform 0.2s;
}

.cta-btn:not(:disabled):hover .cta-arrow {
    transform: translateX(4px);
}

/* === 页脚 === */
.birth-footer {
    text-align: center;
    padding: 20px 0 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-stat {
    color: var(--wuxing-fire);
    font-weight: 600;
}

/* === 响应式调整 === */
@media (max-height: 700px) {
    .birth-hero {
        padding: 16px 0;
    }
    .birth-title {
        font-size: 26px;
    }
    .birth-form-card {
        padding: 20px;
    }
    .form-section {
        margin-bottom: 20px;
    }
}

@media (min-width: 600px) {
    .birth-container {
        max-width: 420px;
        margin: 0 auto;
    }
}

/* === 兑换码输入 === */
.redeem-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 16px;
    color: var(--color-text-primary);
    background: #F8F8F8;
    border: 1px solid #EBEBEB;
    border-radius: 12px;
    transition: border-color 0.2s, background-color 0.2s;
}

.redeem-input:focus {
    outline: none;
    border-color: var(--wuxing-fire);
    background: white;
}

.redeem-input::placeholder {
    color: #AAA;
}

.redeem-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
}

.redeem-links {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.redeem-link {
    color: var(--wuxing-water);
    font-size: 13px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.redeem-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* === 加载动画 === */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* === 抖动动画 === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

