/* 全局样式 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: default;
}

/* 主布局 */
.main-layout {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}

/* 左侧区域 */
.left-section {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

/* 中间区域 */
.center-section {
    flex: 1.4;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 右侧区域 */
.right-section {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

/* 算命版块样式 */
.fortune-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.fortune-section:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* 版块头部 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.section-header h2 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.6rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* 版块内容 */
.section-content {
    color: rgba(255, 255, 255, 0.9);
}

/* 表单样式调整 */
.fortune-section .fortune-form {
    background: transparent;
    backdrop-filter: none;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
}

.fortune-section .form-group {
    margin-bottom: 15px;
}

.fortune-section .form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fortune-section .form-group input,
.fortune-section .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.fortune-section .form-group select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
}

.fortune-section .form-group select option {
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
}

.fortune-section .form-group input:hover,
.fortune-section .form-group select:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

.fortune-section .form-group input:focus,
.fortune-section .form-group select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2) inset;
    background: rgba(255, 255, 255, 0.18);
}

.fortune-section .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.fortune-section .submit-btn {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 8px;
    backdrop-filter: blur(10px);
}

.fortune-section .submit-btn:hover {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* 结果样式调整 */
.fortune-section .fortune-result {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    max-height: 450px;
    overflow-y: auto;
}

.fortune-section .fortune-result:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.fortune-section .fortune-result::before {
    content: '点击空白区域返回';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fortune-section .fortune-result:hover::before {
    opacity: 1;
}

.fortune-section .result-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-size: 0.85rem;
    cursor: default;
    max-height: 400px;
    overflow-y: auto;
}

.fortune-section .result-section {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.fortune-section .result-section h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fortune-section .result-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.bagua-container {
    position: relative;
    width: 60vmin;
    height: 60vmin;
    min-width: 400px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bagua-container {
    position: relative;
    width: 60vmin;
    height: 60vmin;
    min-width: 400px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 太极八卦组合容器 */
.taiji-bagua-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 700px;
    height: 700px;
    min-width: 350px;
    min-height: 350px;
    margin: 0 auto;
}

/* 外围八卦图 */
.bagua-outer {
    width: 700px;
    height: 700px;
    position: absolute;
    animation: rotate 30s linear infinite reverse; /* 反向旋转，与太极图形成对比 */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* 中心旋转太极图 */
.yin-yang {
    width: 180px;
    height: 180px;
    position: relative;
    z-index: 3; /* 确保在八卦图之上 */
    animation: rotate 10s linear infinite;
    box-shadow: 0 0 20px #fff, 0 0 40px #fff, 0 0 60px #fff;
    border-radius: 50%;
}

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

/* 八卦图定位 */
.trigram-image {
    position: absolute;
    width: 25%;
    height: auto;
    object-fit: contain;
    left: 37.5%; 
    top: 37.5%;
    transform-origin: center center;
}

/* 先天八卦方位布局 */
.trigram-1 { transform: rotate(0deg) translateY(-140%) rotate(0deg); }      /* 乾 - Top */
.trigram-2 { transform: rotate(315deg) translateY(-140%) rotate(-315deg); } /* 兑 - Top-Left */
.trigram-3 { transform: rotate(270deg) translateY(-140%) rotate(-270deg); } /* 离 - Left */
.trigram-4 { transform: rotate(225deg) translateY(-140%) rotate(-225deg); } /* 震 - Bottom-Left */
.trigram-5 { transform: rotate(45deg) translateY(-140%) rotate(-45deg); }   /* 巽 - Top-Right */
.trigram-6 { transform: rotate(90deg) translateY(-140%) rotate(-90deg); }   /* 坎 - Right */
.trigram-7 { transform: rotate(135deg) translateY(-140%) rotate(-135deg); } /* 艮 - Bottom-Right */
.trigram-8 { transform: rotate(180deg) translateY(-140%) rotate(-180deg); } /* 坤 - Bottom */

/* 粒子效果 */
#particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

/* 八卦背景 */
.bagua-background {
    position: absolute;
    width: 100vmin;
    height: 100vmin;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bagua-circle {
    position: relative;
    width: 60vmin;
    height: 60vmin;
    min-width: 300px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 八卦符号 */
.bagua-trigram {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: 0 0;
    text-align: center;
}

.trigram-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
}

.trigram-char {
    color: #fff;
    font-size: calc(1.5vw + 10px);
    margin-bottom: 15px;
    font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
    font-weight: bold;
}

.lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bagua-trigram .line {
    height: 10px;
    background: #fff;
}
.bagua-trigram .line.yang {
    width: 80px;
}
.bagua-trigram .line.yin {
    width: 80px;
    background: none;
    display: flex;
    justify-content: space-between;
}
.line.yin .yin-part {
    width: 35px;
    height: 10px;
    background: #fff;
}

/* 八卦方位布局 */
.bagua-trigram.t0 { transform: translate(0, -220px); }
.bagua-trigram.t1 { transform: rotate(45deg) translate(0, -220px) rotate(-45deg); }
.bagua-trigram.t2 { transform: rotate(90deg) translate(0, -220px) rotate(-90deg); }
.bagua-trigram.t3 { transform: rotate(135deg) translate(0, -220px) rotate(-135deg); }
.bagua-trigram.t4 { transform: translate(0, 220px) rotate(180deg); }
.bagua-trigram.t5 { transform: rotate(225deg) translate(0, -220px) rotate(-225deg); }
.bagua-trigram.t6 { transform: rotate(270deg) translate(0, -220px) rotate(-270deg); }
.bagua-trigram.t7 { transform: rotate(315deg) translate(0, -220px) rotate(-315deg); }


/* 头部和页脚 */
.header, .footer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: 100%;
    text-align: center;
}
.header {
    top: 5%;
}
.footer {
    bottom: 5%;
    color: #555;
}
.title {
    font-size: 2.5rem;
}
.subtitle {
    font-size: 1rem;
    color: #888;
}

@media (max-width: 768px) {
    .bagua-circle {
        transform: scale(0.8);
    }
    .bagua-trigram.t0 { transform: translate(0, -200px); }
    .bagua-trigram.t1 { transform: rotate(45deg) translate(0, -200px) rotate(-45deg); }
    .bagua-trigram.t2 { transform: rotate(90deg) translate(0, -200px) rotate(-90deg); }
    .bagua-trigram.t3 { transform: rotate(135deg) translate(0, -200px) rotate(-135deg); }
    .bagua-trigram.t4 { transform: translate(0, 200px) rotate(180deg); }
    .bagua-trigram.t5 { transform: rotate(225deg) translate(0, -200px) rotate(-225deg); }
    .bagua-trigram.t6 { transform: rotate(270deg) translate(0, -200px) rotate(-270deg); }
    .bagua-trigram.t7 { transform: rotate(315deg) translate(0, -200px) rotate(-270deg); }
}

@media (max-width: 480px) {
    .bagua-circle {
        transform: scale(0.6);
    }
}

/* 主要内容样式 */
.main-content {
    position: relative;
    z-index: 5;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #222;
    text-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* 算命类型网格 */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.type-card {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(6px);
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.06);
}

.type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
    transition: left 0.5s;
}

.type-card:hover::before {
    left: 100%;
}

.type-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: #222;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, #fff, #eee);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #222;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border: 2px solid #222;
}

.type-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #222;
}

.type-card p {
    color: #555;
    line-height: 1.6;
}

/* 特殊效果 */
.type-card:nth-child(1) .card-icon {
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
}

.type-card:nth-child(2) .card-icon {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
}

.type-card:nth-child(3) .card-icon {
    background: linear-gradient(45deg, #a8e6cf, #dcedc1);
}

.type-card:nth-child(4) .card-icon {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .fortune-section {
        max-width: 280px;
        padding: 20px;
    }
    
    .bazi-section .form-group input,
    .bazi-section .form-group select,
    .bazi-section .submit-btn,
    .palm-section .form-group input,
    .palm-section .form-group select,
    .palm-section .submit-btn {
        min-width: 180px;
        max-width: 220px;
        box-sizing: border-box;
    }
    
    .bagua-outer {
        width: 600px;
        height: 600px;
    }
    
    .yin-yang {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .left-section, .center-section, .right-section {
        flex: none;
        padding: 15px;
        min-height: auto;
    }
    
    .center-section {
        order: -1;
        min-height: 350px;
    }
    
    .fortune-section {
        max-width: 100%;
        padding: 20px;
    }
    
    .bazi-section .form-group input,
    .bazi-section .form-group select,
    .bazi-section .submit-btn,
    .palm-section .form-group input,
    .palm-section .form-group select,
    .palm-section .submit-btn {
        min-width: 200px;
        max-width: 300px;
        box-sizing: border-box;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .bagua-outer {
        width: 450px;
        height: 450px;
    }
    
    .yin-yang {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .left-section, .center-section, .right-section {
        padding: 10px;
    }
    
    .fortune-section {
        padding: 15px;
    }
    
    .bazi-section .form-group input,
    .bazi-section .form-group select,
    .bazi-section .submit-btn,
    .palm-section .form-group input,
    .palm-section .form-group select,
    .palm-section .submit-btn {
        min-width: 150px;
        max-width: 250px;
        box-sizing: border-box;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .bagua-outer {
        width: 350px;
        height: 350px;
    }
    
    .yin-yang {
        width: 90px;
        height: 90px;
    }
}

/* 右侧手相版块特殊样式 */
.palm-section .section-header {
    flex-direction: row;
    justify-content: center;
}

.palm-section .section-header h2 {
    text-align: center;
}

.palm-section .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.palm-section .form-group label {
    text-align: center;
    margin-bottom: 8px;
    width: 100%;
}

.palm-section .form-group input,
.palm-section .form-group select {
    text-align: center;
    width: 100%;
    min-width: 200px;
    max-width: 250px;
    box-sizing: border-box;
}

.palm-section .submit-btn {
    text-align: center;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
    margin: 0 auto;
    display: block;
}

.palm-section .result-content {
    text-align: center;
}

.palm-section .result-section h3 {
    text-align: center;
}

.palm-section .result-section p {
    text-align: center;
}

/* 左侧八字版块特殊样式 */
.bazi-section .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bazi-section .form-group label {
    text-align: center;
    margin-bottom: 8px;
    width: 100%;
}

.bazi-section .form-group input,
.bazi-section .form-group select {
    width: 100%;
    min-width: 200px;
    max-width: 250px;
    text-align: center;
    box-sizing: border-box;
}

/* 特别确保性别选择框与其他输入框一致 */
.bazi-section #gender {
    width: 100%;
    min-width: 200px;
    max-width: 250px;
    text-align: center;
    box-sizing: border-box;
}

.bazi-section .submit-btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto;
    display: block;
}

/* 左侧八字版块结果样式 */
.bazi-section .result-content {
    text-align: center;
}

.bazi-section .result-section h3 {
    text-align: center;
}

.bazi-section .result-section p {
    text-align: center;
}

/* 当有结果显示时，背景显示点击提示 */
/* 删除背景点击提示 */

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 推特社交图标样式 */
.twitter-social {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -54px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    z-index: 3;
}
.twitter-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 64px !important;
    height: 64px !important;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-decoration: none;
}
.twitter-social a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    box-shadow: 0 4px 16px #fff;
}
.twitter-icon {
    display: block;
    width: 56px !important;
    height: 56px !important;
}

@media (max-width: 768px) {
    .twitter-social {
        bottom: -44px;
    }
}

.top-banner {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}
.bagua-title {
    font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
    font-size: 2.8rem;
    color: #fff;
    font-weight: bold;
    letter-spacing: 0.2em;
    text-shadow: 0 0 12px #fff, 0 0 32px #fff, 0 2px 8px #000;
    user-select: none;
} 