/* ============================================
   知时 - 首页样式
   玄学风水风格 · 太极八卦 · 水墨意境
   ============================================ */

/* 基础重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-dark: #a08020;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --bg-dark: #0a0a12;
    --bg-mid: #0f0f1a;
    --bg-card: rgba(15, 15, 26, 0.85);
    --text-primary: #e8dcc8;
    --text-secondary: #8a7e6a;
    --text-dim: #5a5040;
    --border-gold: rgba(212, 175, 55, 0.25);
    --border-gold-strong: rgba(212, 175, 55, 0.5);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif SC', 'SimSun', serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ---- 背景层 ---- */
.bg-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

#bgCanvas {
    width: 100%;
    height: 100%;
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(20,15,5,0.8) 0%, transparent 50%),
        linear-gradient(180deg, rgba(10,10,18,0) 0%, rgba(10,10,18,0.6) 100%);
}

/* ---- 太极八卦装饰 ---- */
.taiji-deco {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.12;
    pointer-events: none;
}

.taiji-svg {
    animation: taijiRotate 60s linear infinite;
}

@keyframes taijiRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.taiji-fish {
    animation: fishRotate 60s linear infinite reverse;
}

@keyframes fishRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---- 主容器 ---- */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- 头部标题 ---- */
.site-header {
    text-align: center;
    margin-bottom: 50px;
    animation: headerFadeIn 1.2s ease-out;
}

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

.header-top-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 30px;
}

.site-title {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.title-char {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 56px;
    color: var(--gold);
    text-shadow: 
        0 0 20px var(--gold-glow),
        0 0 40px rgba(212,175,55,0.15);
    display: inline-block;
    animation: charFloat 3s ease-in-out infinite;
}

.title-char:nth-child(1) { animation-delay: 0s; }
.title-char:nth-child(2) { animation-delay: 0.15s; }
.title-char:nth-child(3) { animation-delay: 0.3s; }
.title-char:nth-child(4) { animation-delay: 0.45s; }

@keyframes charFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.divider-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold-strong), transparent);
}

.divider-dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-glow);
}

.site-subtitle {
    font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
    font-size: 15px;
    color: var(--text-secondary);
    letter-spacing: 6px;
}

/* ---- 表单区域 ---- */
.form-section {
    width: 100%;
    animation: formFadeIn 1s ease-out 0.3s both;
}

@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-frame {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    padding: 40px 35px 35px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 60px rgba(0,0,0,0.5),
        inset 0 0 60px rgba(212,175,55,0.02);
}

/* 四角装饰 */
.corner-deco {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--gold);
    border-style: solid;
    border-width: 0;
    opacity: 0.6;
}

.corner-deco.top-left {
    top: -1px; left: -1px;
    border-top-width: 2px;
    border-left-width: 2px;
}

.corner-deco.top-right {
    top: -1px; right: -1px;
    border-top-width: 2px;
    border-right-width: 2px;
}

.corner-deco.bottom-left {
    bottom: -1px; left: -1px;
    border-bottom-width: 2px;
    border-left-width: 2px;
}

.corner-deco.bottom-right {
    bottom: -1px; right: -1px;
    border-bottom-width: 2px;
    border-right-width: 2px;
}

/* 表单标题 */
.form-title-area {
    text-align: center;
    margin-bottom: 30px;
}

.form-icon {
    display: block;
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px var(--gold-glow));
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.form-title-area h2 {
    font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.form-hint {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.form-example {
    font-size: 12px;
    color: var(--gold);
    opacity: 0.8;
    letter-spacing: 1px;
    margin-top: 6px;
    padding: 8px 14px;
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 2px;
    display: inline-block;
}
.form-example strong { font-weight: 700; }
.form-example em { font-style: normal; color: var(--text-primary); }

.trust-signals {
    display: flex; gap: 16px; justify-content: center;
    margin-top: 10px; flex-wrap: wrap;
}
.trust-signals span {
    font-size: 11px; color: var(--text-dim);
    letter-spacing: 1px; opacity: 0.7;
}

/* 表单布局 */
.birth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.form-row-single {
    grid-template-columns: 1fr;
    max-width: 50%;
    margin: 0 auto;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 4px;
    margin-bottom: 10px;
    padding-left: 2px;
    text-transform: uppercase;
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 14px 40px 14px 18px;
    font-size: 16px;
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(20,20,35,0.8);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.35s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M6 8L0 0h12z' fill='%23d4af37' opacity='0.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    box-shadow: 0 0 0 rgba(212,175,55,0), inset 0 1px 3px rgba(0,0,0,0.3);
}

.form-group select:hover {
    border-color: rgba(212,175,55,0.5);
    background-color: rgba(22,22,40,0.9);
    box-shadow: 0 0 12px rgba(212,175,55,0.06), inset 0 1px 3px rgba(0,0,0,0.3);
}

.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    background-color: rgba(25,25,45,0.95);
    box-shadow: 0 0 20px rgba(212,175,55,0.12), 0 0 40px rgba(212,175,55,0.04), inset 0 1px 3px rgba(0,0,0,0.2);
}

.form-group select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(10,10,20,0.6);
    border-color: rgba(212,175,55,0.08);
}

.form-group-minute {
    flex: 0 0 140px;
    min-width: 120px;
}
.minute-input {
    width: 100%;
    height: 46px;
    background: rgba(212,175,55,0.04);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 2px;
    color: var(--text-primary);
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    text-align: center;
    padding: 0 8px;
    letter-spacing: 2px;
    -moz-appearance: textfield;
}
.minute-input::-webkit-inner-spin-button,
.minute-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.minute-input:focus { outline: none; border-color: rgba(212,175,55,0.4); box-shadow: 0 0 10px var(--gold-glow); }
.minute-input::placeholder { color: var(--text-dim); opacity: 0.4; }
.minute-hint {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    opacity: 0.5;
    margin-top: 2px;
    text-align: center;
}

.form-group select option {
    background: #12121e;
    color: var(--text-primary);
    padding: 10px;
    font-size: 15px;
}

optgroup {
    font-family: 'Noto Serif SC', serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    background: #15152a;
    letter-spacing: 1px;
}

/* 提交按钮 */
.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 0;
    margin-top: 10px;
    font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
    font-size: 18px;
    letter-spacing: 8px;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, var(--gold-dark) 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: goldShimmer 3s ease-in-out infinite;
    overflow: hidden;
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--gold-glow);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-deco-left, .btn-deco-right {
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--bg-dark);
    opacity: 0.3;
}

.btn-deco-left { left: 20px; }
.btn-deco-right { right: 20px; }

/* ---- 底部信息 ---- */
.footer-info {
    text-align: center;
    margin-top: 50px;
}

.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.divider-diamond {
    color: var(--gold);
    font-size: 8px;
    opacity: 0.5;
}

.footer-text {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 2px;
    line-height: 2;
}

.footer-disclaimer {
    font-size: 11px;
    color: var(--text-dim);
    opacity: 0.5;
    margin-top: 12px;
    letter-spacing: 1px;
}

/* ---- 响应式 ---- */
@media (max-width: 600px) {
    .main-container { padding: 30px 14px 40px; }
    .title-char { font-size: 40px; }
    .site-subtitle { font-size: 12px; letter-spacing: 4px; }
    .form-frame { padding: 26px 14px 22px; }
    .form-row { gap: 16px; }
    .form-row-single { max-width: 100%; }
    .submit-btn { font-size: 16px; letter-spacing: 6px; }
    .taiji-deco { opacity: 0.06; }
    .form-group select { font-size: 15px; padding: 12px 36px 12px 14px; }
    .form-group label { font-size: 11px; letter-spacing: 3px; }
}