* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
    transition: all 0.5s ease;
}

/* 阴阳主题 */
body.theme-yin {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    color: #e0e0e0;
}

body.theme-yang {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #d4d4d4 100%);
    color: #333;
}

/* 五行特效背景 */
.wuxing-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.wuxing-effect.water::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 150, 255, 0.1) 0%, transparent 70%);
    animation: waterFlow 3s ease-in-out infinite;
}

@keyframes waterFlow {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.8;
    }
}

.wuxing-effect.fire::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 100, 0, 0.15) 0%, transparent 70%);
    animation: fireGlow 2s ease-in-out infinite;
}

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

.wuxing-effect.wood::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 200, 100, 0.1) 0%, transparent 70%);
    animation: woodGrow 4s ease-in-out infinite;
}

@keyframes woodGrow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

.wuxing-effect.metal::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(200, 200, 200, 0.15) 0%, transparent 70%);
    animation: metalShine 2.5s ease-in-out infinite;
}

@keyframes metalShine {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.9;
    }
}

.wuxing-effect.earth::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 90, 43, 0.12) 0%, transparent 70%);
    animation: earthPulse 3.5s ease-in-out infinite;
}

@keyframes earthPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.control-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.theme-toggle,
.location-btn,
.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover,
.location-btn:hover,
.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-yang .theme-toggle,
.theme-yang .location-btn,
.theme-yang .back-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #e94560, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-yang .title {
    background: linear-gradient(90deg, #c0392b, #d68910);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 时间信息面板 */
.info-panel {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.time-display {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-yang .time-display {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.true-solar-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.true-solar-time {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2ecc71;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
    margin-bottom: 10px;
}

.location-info {
    font-size: 0.9rem;
    color: #aaa;
}

.current-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-yang .current-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.current-shichen {
    font-size: 1.8rem;
    color: #e94560;
    font-weight: bold;
}

.current-meridian {
    font-size: 1.3rem;
    color: #f39c12;
}

.current-term {
    font-size: 1.2rem;
    color: #3498db;
}

.current-lunar {
    font-size: 1rem;
    color: #2ecc71;
}

/* 集成表盘 */
.integrated-clock {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.clock-svg-container {
    position: relative;
}

.clock-svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(243, 156, 18, 0.3));
}

.theme-yang .clock-bg {
    fill: url(#clockGradientYang) !important;
}

/* 表盘层样式 */
.layer {
    transition: all 0.3s ease;
}

/* 文字通用优化 */
.clock-svg text {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* 阳主题下的文字优化 */
.theme-yang .solar-term-layer .term-text {
    fill: #2980b9;
    text-shadow: 0 0 2px rgba(41, 128, 185, 0.2);
}

.theme-yang .solar-term-layer .term-segment.active .term-text {
    fill: #c0392b;
    text-shadow: 0 0 4px rgba(192, 57, 43, 0.4);
}

.theme-yang .meridian-layer .meridian-text {
    fill: #d68910;
    text-shadow: 0 0 2px rgba(214, 137, 16, 0.2);
}

.theme-yang .meridian-layer .meridian-segment.active .meridian-text {
    fill: #c0392b;
    text-shadow: 0 0 4px rgba(192, 57, 43, 0.4);
}

.theme-yang .shichen-layer .shichen-text {
    fill: #c0392b;
    text-shadow: 0 0 2px rgba(192, 57, 43, 0.2);
}

.theme-yang .shichen-layer .shichen-segment.active .shichen-text {
    fill: #d68910;
    text-shadow: 0 0 4px rgba(214, 137, 16, 0.4);
}

.theme-yang .shichen-layer .shichen-wuxing {
    fill: #666;
    text-shadow: 0 0 1px rgba(102, 102, 102, 0.2);
}

.theme-yang .shichen-layer .shichen-segment.active .shichen-wuxing {
    fill: #d68910;
    text-shadow: 0 0 2px rgba(214, 137, 16, 0.3);
}

/* 24节气层 */
.solar-term-layer .term-segment {
    cursor: pointer;
    transition: all 0.3s ease;
}

.solar-term-layer .term-segment:hover {
    opacity: 0.8;
}

.solar-term-layer .term-segment.active {
    filter: drop-shadow(0 0 10px rgba(52, 152, 219, 0.8));
}

.solar-term-layer .term-text {
    font-size: 12px;
    fill: #3498db;
    font-weight: 600;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    text-shadow: 0 0 3px rgba(52, 152, 219, 0.3);
}

.solar-term-layer .term-segment.active .term-text {
    font-size: 14px;
    fill: #e94560;
    text-shadow: 0 0 6px rgba(233, 69, 96, 0.6);
}

/* 子午流注层 */
.meridian-layer .meridian-segment {
    cursor: pointer;
    transition: all 0.3s ease;
}

.meridian-layer .meridian-segment:hover {
    opacity: 0.8;
}

.meridian-layer .meridian-segment.active {
    filter: drop-shadow(0 0 15px rgba(243, 156, 18, 0.9));
}

.meridian-layer .meridian-text {
    font-size: 13px;
    fill: #f39c12;
    font-weight: 700;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    text-shadow: 0 0 4px rgba(243, 156, 18, 0.4);
    letter-spacing: 0px;
}

.meridian-layer .meridian-segment.active .meridian-text {
    font-size: 15px;
    fill: #e94560;
    text-shadow: 0 0 8px rgba(233, 69, 96, 0.8);
    letter-spacing: 1px;
}

.meridian-layer .meridian-line {
    stroke: #f39c12;
    stroke-width: 2;
    opacity: 0.6;
}

.meridian-layer .meridian-segment.active .meridian-line {
    stroke: #e94560;
    stroke-width: 3;
    opacity: 1;
}

/* 十二时辰层 */
.shichen-layer .shichen-segment {
    cursor: pointer;
    transition: all 0.3s ease;
}

.shichen-layer .shichen-segment:hover {
    opacity: 0.8;
}

.shichen-layer .shichen-segment.active {
    filter: drop-shadow(0 0 12px rgba(233, 69, 96, 0.8));
}

.shichen-layer .shichen-text {
    font-size: 15px;
    fill: #e94560;
    font-weight: 700;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    text-shadow: 0 0 5px rgba(233, 69, 96, 0.5);
    letter-spacing: 1px;
}

.shichen-layer .shichen-segment.active .shichen-text {
    font-size: 17px;
    fill: #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.8);
    letter-spacing: 2px;
}

.shichen-layer .shichen-wuxing {
    font-size: 10px;
    fill: #888;
    font-weight: 500;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    text-shadow: 0 0 2px rgba(136, 136, 136, 0.3);
    letter-spacing: 0px;
}

.shichen-layer .shichen-segment.active .shichen-wuxing {
    font-size: 11px;
    fill: #f39c12;
    text-shadow: 0 0 4px rgba(243, 156, 18, 0.6);
    letter-spacing: 1px;
}

/* 时针动画 */
.hand {
    transform-origin: 300px 300px;
    transition: transform 0.1s ease-out;
}

/* 阴阳鱼动画 */
.yin-yang-fish {
    transform-origin: 300px 300px;
    animation: rotateYY 60s linear infinite;
}

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

/* 底部信息面板 */
.bottom-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.panel-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-yang .panel-section {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.panel-section h3 {
    font-size: 1.2rem;
    color: #f39c12;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(243, 156, 18, 0.3);
    padding-bottom: 10px;
}

.theme-yang .panel-section h3 {
    color: #d68910;
    border-bottom: 2px solid rgba(214, 137, 16, 0.3);
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item .label {
    color: #aaa;
    font-size: 0.9rem;
}

.theme-yang .info-item .label {
    color: #666;
}

.info-item .value {
    color: #fff;
    font-weight: bold;
}

.theme-yang .info-item .value {
    color: #333;
}

/* 今日宜忌面板 */
.yiji-panel {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.yiji-item {
    flex: 1;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid;
}

.yiji-item.yi {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.yiji-item.ji {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.yiji-label {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.yiji-item.yi .yiji-label {
    color: #2ecc71;
}

.yiji-item.ji .yiji-label {
    color: #e74c3c;
}

.yiji-value {
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.6;
}

.theme-yang .yiji-value {
    color: #333;
}

/* 健康提醒弹窗 */
.health-reminder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.health-reminder.show {
    display: flex;
}

.reminder-content {
    background: linear-gradient(145deg, #1e3a5f, #0d2137);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    border: 2px solid #f39c12;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
}

.reminder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 今日一卦面板 */
.gua-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-yang .gua-panel {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.gua-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-yang .gua-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.gua-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #f39c12;
}

.theme-yang .gua-header h3 {
    color: #d68910;
}

.gua-date {
    font-size: 0.9rem;
    color: #888;
}

.theme-yang .gua-date {
    color: #666;
}

.gua-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.gua-symbol {
    font-size: 4rem;
    color: #f39c12;
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
    min-width: 80px;
    text-align: center;
}

.theme-yang .gua-symbol {
    color: #d68910;
    text-shadow: 0 0 10px rgba(214, 137, 16, 0.3);
}

.gua-info {
    flex: 1;
}

.gua-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e94560;
    margin-bottom: 10px;
}

.theme-yang .gua-name {
    color: #c0392b;
}

.gua-interpretation {
    font-size: 1rem;
    color: #888;
    margin-bottom: 10px;
}

.theme-yang .gua-interpretation {
    color: #666;
}

.gua-advice {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
}

.theme-yang .gua-advice {
    color: #555;
}

/* 禅修模式按钮 */
.zen-mode-btn {
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.zen-mode-btn:hover {
    background: linear-gradient(145deg, #8e44ad, #7d3c98);
    transform: scale(1.05);
}

/* 退出禅修按钮 */
.exit-zen-btn {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: none;
}

.exit-zen-btn:hover {
    background: linear-gradient(145deg, #c0392b, #a93226);
    transform: scale(1.05);
}

/* 禅修模式状态 */
body.zen-mode {
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body.zen-mode .control-bar {
    display: none;
}

body.zen-mode .title {
    display: none;
}

body.zen-mode .exit-zen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    display: block;
    z-index: 1001;
}

/* 禅修模式惩罚UI */
.zen-punishment {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: punishmentPulse 1s ease-in-out infinite;
}

@keyframes punishmentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.zen-punishment.show {
    display: flex;
}

.punishment-content {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    text-align: center;
    border: 3px solid #e74c3c;
    box-shadow: 0 0 50px rgba(231, 76, 60, 0.8);
}

.punishment-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: punishmentShake 0.5s ease-in-out infinite;
}

@keyframes punishmentShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.punishment-title {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
}

.punishment-message {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.5;
}

.punishment-time {
    font-size: 1rem;
    color: #888;
    margin-bottom: 20px;
}

.punishment-close {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.punishment-close:hover {
    background: linear-gradient(145deg, #c0392b, #a93226);
    transform: scale(1.05);
}
}

.reminder-title {
    font-size: 1.5rem;
    color: #f39c12;
    margin-bottom: 15px;
}

.reminder-message {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.6;
}

.reminder-close {
    background: linear-gradient(90deg, #e94560, #f39c12);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reminder-close:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.5);
}

/* 位置设置弹窗 */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.location-modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #1e3a5f, #0d2137);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    border: 2px solid #f39c12;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
}

.modal-title {
    font-size: 1.5rem;
    color: #f39c12;
    margin-bottom: 20px;
    text-align: center;
}

.modal-body label {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #fff;
}

.modal-body input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.modal-body input:focus {
    outline: none;
    border-color: #f39c12;
}

.location-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary,
.btn-location {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(90deg, #e94560, #f39c12);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-location {
    background: linear-gradient(90deg, #3498db, #2980b9);
    color: #fff;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-location:hover {
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 1.5rem;
    }

    .true-solar-time {
        font-size: 2rem;
    }

    .clock-svg {
        width: 100%;
        height: auto;
    }

    .info-panel {
        flex-direction: column;
        gap: 15px;
    }

    .time-display,
    .current-info {
        padding: 15px 20px;
    }

    .current-shichen {
        font-size: 1.5rem;
    }

    .current-meridian {
        font-size: 1.1rem;
    }

    .current-term {
        font-size: 1rem;
    }

    .current-lunar {
        font-size: 0.9rem;
    }

    .bottom-panel {
        grid-template-columns: 1fr;
    }

    .yiji-panel {
        flex-direction: column;
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.active .current-shichen,
.active .current-meridian {
    animation: pulse 2s ease-in-out infinite;
}
