/*
Theme Name: 童子查询
Theme URI: http://songtongzi.com/tongzi-query
Author: 三曜道长
Author URI: http://songtongzi.com
Description: 道教童子查询主题，仅注册用户可查询
Version: 1.0
License: GPL v2 or later
Text Domain: tongzi-query
*/

/* ========== 以下为原静态页面样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'STKaiti', 'SimSun', serif;
}

body {
    background-color: #0a1929;
    color: #e0d3b8;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 道教背景图案 */
.taiji-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
}

.taiji-bg::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 100px rgba(255, 255, 255, 0.1);
}

.yin-yang {
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(to bottom, #000 50%, #fff 50%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 60s linear infinite;
}

.yin-yang::before, .yin-yang::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 35px solid;
}

.yin-yang::before {
    background: #000;
    border-color: #fff;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.yin-yang::after {
    background: #fff;
    border-color: #000;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 八卦符号装饰 */
.bagua {
    position: fixed;
    width: 80px;
    height: 80px;
    opacity: 0.1;
    z-index: 0;
}

.bagua-1 { top: 10%; left: 5%; }
.bagua-2 { top: 15%; right: 8%; }
.bagua-3 { bottom: 20%; left: 10%; }
.bagua-4 { bottom: 10%; right: 5%; }

.bagua-symbol {
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="30" fill="none" stroke="%23e0d3b8" stroke-width="2"/><path d="M32,10 L32,54" stroke="%23e0d3b8" stroke-width="2"/><circle cx="32" cy="22" r="4" fill="%23e0d3b8"/><circle cx="32" cy="42" r="4" fill="none" stroke="%23e0d3b8" stroke-width="2"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.05; }
    100% { opacity: 0.15; }
}

/* 云纹装饰 */
.cloud {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.cloud-1 {
    width: 150px;
    height: 60px;
    top: 5%;
    left: 20%;
    box-shadow: 
        20px 10px 0 0 rgba(255, 255, 255, 0.03),
        -20px 10px 0 0 rgba(255, 255, 255, 0.03),
        0 -15px 0 0 rgba(255, 255, 255, 0.03);
}

.cloud-2 {
    width: 120px;
    height: 50px;
    bottom: 15%;
    right: 25%;
    box-shadow: 
        15px 8px 0 0 rgba(255, 255, 255, 0.03),
        -15px 8px 0 0 rgba(255, 255, 255, 0.03),
        0 -12px 0 0 rgba(255, 255, 255, 0.03);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: rgba(18, 30, 46, 0.85);
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(224, 211, 184, 0.1),
        0 0 30px rgba(120, 90, 40, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(224, 211, 184, 0.2);
}

/* 顶部道教风格装饰 */
.daoist-header {
    height: 20px;
    background: linear-gradient(90deg, 
        rgba(120, 90, 40, 0) 0%, 
        rgba(224, 211, 184, 0.7) 20%, 
        rgba(224, 211, 184, 0.7) 80%, 
        rgba(120, 90, 40, 0) 100%);
    position: relative;
}

.daoist-header::before, .daoist-header::after {
    content: "☯";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #e0d3b8;
}

.daoist-header::before {
    left: 10%;
}

.daoist-header::after {
    right: 10%;
}

header {
    background: linear-gradient(to right, rgba(44, 30, 60, 0.9), rgba(74, 40, 90, 0.9));
    color: #f5e8c7;
    padding: 25px;
    text-align: center;
    border-bottom: 2px solid #b89446;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(184, 148, 70, 0.8), 
        transparent);
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
    letter-spacing: 3px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
    font-weight: bold;
}

h1::before, h1::after {
    content: "✧";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #b89446;
    font-size: 1.5rem;
}

h1::before {
    left: -40px;
}

h1::after {
    right: -40px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
}

.input-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    border-right: 1px solid rgba(224, 211, 184, 0.2);
}

.result-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.section-title {
    color: #f5e8c7;
    border-left: 4px solid #b89446;
    padding-left: 12px;
    margin: 20px 0 15px;
    font-size: 1.4rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, #b89446, transparent);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0d3b8;
}

.stems-branches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.pillar {
    text-align: center;
    position: relative;
}

.pillar-name {
    font-size: 0.9rem;
    color: #b89446;
    margin-bottom: 5px;
    font-weight: bold;
}

select {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(184, 148, 70, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    background-color: rgba(10, 25, 41, 0.8);
    color: #e0d3b8;
    transition: all 0.3s;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23b89446" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

select:focus {
    outline: none;
    border-color: #b89446;
    box-shadow: 0 0 10px rgba(184, 148, 70, 0.3);
}

.gender-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.gender-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.gender-option input {
    margin-right: 8px;
    accent-color: #b89446;
}

button {
    background: linear-gradient(to right, rgba(74, 40, 90, 0.9), rgba(44, 30, 60, 0.9));
    color: #f5e8c7;
    border: 1px solid #b89446;
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    letter-spacing: 1px;
    width: 100%;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 148, 70, 0.2), transparent);
    transition: all 0.5s;
    z-index: -1;
}

button:hover {
    background: linear-gradient(to right, rgba(44, 30, 60, 0.9), rgba(74, 40, 90, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(184, 148, 70, 0.2);
}

button:hover::before {
    left: 100%;
}

.result-box {
    background-color: rgba(10, 25, 41, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    border-left: 4px solid #b89446;
    border: 1px solid rgba(184, 148, 70, 0.3);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.result-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184, 148, 70, 0.5), transparent);
}

.result-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(184, 148, 70, 0.3);
}

.result-title {
    font-weight: 700;
    color: #f5e8c7;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.result-title i {
    margin-right: 8px;
    color: #b89446;
}

.result-content {
    color: #d8c9a8;
    padding-left: 24px;
}

.true-child {
    color: #ff7e7e;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 126, 126, 0.3);
}

.false-child {
    color: #7ebaff;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(126, 186, 255, 0.3);
}

.example {
    background-color: rgba(18, 40, 60, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin-top: 25px;
    border-left: 4px solid #4a8bb8;
    border: 1px solid rgba(74, 139, 184, 0.3);
}

.example-title {
    font-weight: 700;
    color: #f5e8c7;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.example-title i {
    margin-right: 8px;
    color: #4a8bb8;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-true {
    background-color: #ff7e7e;
}

.legend-false {
    background-color: #7ebaff;
}

.instructions {
    background-color: rgba(30, 40, 20, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin-top: 25px;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid rgba(184, 148, 70, 0.2);
}

footer {
    text-align: center;
    padding: 20px;
    color: #a89b7c;
    font-size: 0.9rem;
    border-top: 1px solid rgba(184, 148, 70, 0.2);
    background-color: rgba(10, 20, 30, 0.8);
    position: relative;
}

footer::before {
    content: "道";
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(184, 148, 70, 0.1);
    font-family: "STKaiti";
}

footer::after {
    content: "法自然";
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: rgba(184, 148, 70, 0.1);
    font-family: "STKaiti";
}

@media (max-width: 768px) {
    .stems-branches {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .input-section, .result-section {
        border-right: none;
        border-bottom: 1px solid rgba(224, 211, 184, 0.2);
    }
    
    .bagua, .cloud {
        display: none;
    }
    
    h1::before, h1::after {
        display: none;
    }
}

.result-details {
    background-color: rgba(15, 30, 45, 0.7);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    font-size: 0.95rem;
    border-left: 3px solid rgba(184, 148, 70, 0.5);
}

.highlight {
    background-color: rgba(184, 148, 70, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
    color: #f5e8c7;
}

/* 符咒样式装饰 */
.fu-decoration {
    position: absolute;
    width: 60px;
    height: 150px;
    border: 1px solid rgba(184, 148, 70, 0.3);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.1;
    z-index: 0;
}

.fu-left {
    left: -30px;
    background: linear-gradient(to bottom, transparent 10%, rgba(184, 148, 70, 0.1) 50%, transparent 90%);
}

.fu-right {
    right: -30px;
    background: linear-gradient(to bottom, transparent 10%, rgba(184, 148, 70, 0.1) 50%, transparent 90%);
}

/* 八卦按钮 */
.bagua-btn {
    position: relative;
    overflow: hidden;
}

.bagua-btn::after {
    content: "☯";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.7;
}

/* 输入框道教风格 */
.daoist-input {
    position: relative;
}

.daoist-input::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #b89446;
    transition: width 0.3s;
}

.daoist-input:focus-within::before {
    width: 100%;
}