/**
 * 天机阁紫微斗数 - Hero区域增强样式
 * Ziwei Hero Section Enhanced Styles
 * 
 * 与61项目视觉效果对齐
 */

/* ========================================
   首页Hero区域样式
   ======================================== */
.ziwei-home {
    position: relative;
    overflow-x: hidden;
}

/* 主内容区域居中 */
.ziwei-home .container {
    position: relative;
    z-index: 10;
}

/* Hero Section标题增强 */
.ziwei-home .header {
    padding: 60px 0 40px;
    position: relative;
}

.ziwei-home .logo-icon {
    font-size: 48px;
    color: var(--primary);
    animation: logoFloat 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(201, 169, 110, 0.5);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.ziwei-home .logo h1 {
    font-size: 52px;
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        #fff 50%, 
        var(--primary) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(201, 169, 110, 0.3);
    animation: titleGlow 4s ease-in-out infinite;
    letter-spacing: 12px;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.ziwei-home .subtitle {
    font-size: 18px;
    letter-spacing: 6px;
    margin-top: 12px;
    color: rgba(241, 245, 249, 0.8);
}

/* ========================================
   表单区域视觉增强
   ======================================== */
.ziwei-home .form-section {
    position: relative;
    background: rgba(37, 43, 61, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 110, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(201, 169, 110, 0.05) inset,
        0 0 60px rgba(201, 169, 110, 0.05);
    overflow: hidden;
}

/* 表单顶部金色光带 */
.ziwei-home .form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--primary) 20%,
        var(--primary-light) 50%,
        var(--primary) 80%,
        transparent 100%
    );
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 表单标题增强 */
.ziwei-home .section-title {
    border-bottom-color: rgba(201, 169, 110, 0.3);
}

.ziwei-home .section-title h2 {
    font-size: 22px;
    letter-spacing: 4px;
}

.ziwei-home .section-title .icon {
    font-size: 24px;
    animation: iconPulse 2s ease-in-out infinite;
}

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

/* ========================================
   输入框视觉增强
   ======================================== */
.ziwei-home .form-group input,
.ziwei-home .form-group select {
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(201, 169, 110, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.ziwei-home .form-group input:hover,
.ziwei-home .form-group select:hover {
    border-color: rgba(201, 169, 110, 0.4);
    box-shadow: 0 0 15px rgba(201, 169, 110, 0.1);
}

.ziwei-home .form-group input:focus,
.ziwei-home .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 
        0 0 0 3px rgba(201, 169, 110, 0.1),
        0 0 20px rgba(201, 169, 110, 0.2);
    background: rgba(26, 31, 46, 0.95);
}

/* 输入框光效 */
.ziwei-home .form-group {
    position: relative;
}

.ziwei-home .form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.ziwei-home .form-group:focus-within::after {
    width: 100%;
}

/* ========================================
   提交按钮增强
   ======================================== */
.ziwei-home .submit-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 
        0 4px 15px rgba(201, 169, 110, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s ease;
}

.ziwei-home .submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.ziwei-home .submit-btn:hover::before {
    left: 100%;
}

.ziwei-home .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(201, 169, 110, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.ziwei-home .submit-btn:active {
    transform: translateY(-1px);
}

.ziwei-home .submit-btn .btn-icon {
    animation: btnIconPulse 2s ease-in-out infinite;
}

@keyframes btnIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   信息卡片增强
   ======================================== */
.ziwei-home .info-card {
    position: relative;
    background: rgba(37, 43, 61, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(201, 169, 110, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.ziwei-home .info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 169, 110, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ziwei-home .info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--primary) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
}

.ziwei-home .info-card:hover::before {
    opacity: 1;
}

.ziwei-home .info-card h3 {
    position: relative;
    display: inline-block;
}

.ziwei-home .info-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.ziwei-home .info-card:hover h3::after {
    width: 100%;
}

/* 特性列表增强 */
.ziwei-home .feature-list li,
.ziwei-home .step-list li {
    position: relative;
    padding-left: 25px;
    transition: all 0.3s ease;
}

.ziwei-home .feature-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--primary);
    transition: all 0.3s ease;
}

.ziwei-home .feature-list li:hover::before {
    transform: scale(1.3);
    text-shadow: 0 0 10px rgba(201, 169, 110, 0.5);
}

.ziwei-home .step-list li::before {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 0 10px rgba(201, 169, 110, 0.3);
}

/* ========================================
   加载动画增强
   ======================================== */
.ziwei-home .loading {
    background: rgba(26, 31, 46, 0.98);
}

.ziwei-home .taiji-loader {
    animation: rotate 3s linear infinite, loaderGlow 2s ease-in-out infinite;
}

@keyframes loaderGlow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(201, 169, 110, 0.5);
        filter: brightness(1);
    }
    50% { 
        text-shadow: 0 0 40px rgba(201, 169, 110, 0.8);
        filter: brightness(1.3);
    }
}

.ziwei-home .loading p {
    font-size: 20px;
    letter-spacing: 2px;
}

/* ========================================
   页脚增强
   ======================================== */
.ziwei-home .footer {
    position: relative;
    padding-top: 40px;
}

.ziwei-home .footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(201, 169, 110, 0.3) 50%,
        transparent 100%
    );
}

/* ========================================
   浮动粒子（补充效果）
   ======================================== */
.floating-particle {
    animation: floatParticle 15s linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   响应式适配
   ======================================== */
@media (max-width: 768px) {
    .ziwei-home .header {
        padding: 40px 0 30px;
    }
    
    .ziwei-home .logo-icon {
        font-size: 36px;
    }
    
    .ziwei-home .logo h1 {
        font-size: 38px;
        letter-spacing: 6px;
    }
    
    .ziwei-home .subtitle {
        font-size: 14px;
        letter-spacing: 3px;
    }
    
    .ziwei-home .form-section {
        backdrop-filter: blur(5px);
    }
    
    /* 移动端隐藏复杂的背景效果以提升性能 */
    .star-plate-container {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .ziwei-home .logo h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .ziwei-home .subtitle {
        font-size: 12px;
    }
}

/* ========================================
   滚动动画
   ======================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 延迟动画类 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ========================================
   紫微斗数加载动画
   ======================================== */
.star-plate-loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.plate-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.plate-ring.outer {
    width: 120px;
    height: 120px;
    border-top-color: var(--primary);
    border-right-color: rgba(201, 169, 110, 0.3);
    animation: rotate 3s linear infinite;
}

.plate-ring.middle {
    width: 90px;
    height: 90px;
    border-bottom-color: var(--primary);
    border-left-color: rgba(201, 169, 110, 0.3);
    animation: rotate 2s linear infinite reverse;
}

.plate-ring.inner {
    width: 60px;
    height: 60px;
    border-top-color: var(--primary);
    animation: rotate 1.5s linear infinite;
}

.center-star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    animation: pulse 2s ease-in-out infinite;
}

.orbiting-star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin: -4px;
    box-shadow: 0 0 10px var(--primary);
    animation: orbit 6s linear infinite;
    animation-delay: var(--orbit-delay);
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.ziwei-home .loading-title {
    font-size: 22px;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.loading-progress {
    width: 200px;
    height: 3px;
    background: rgba(201, 169, 110, 0.2);
    border-radius: 3px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    animation: progressMove 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(201, 169, 110, 0.5);
}

@keyframes progressMove {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 50%;
        margin-left: 25%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}
