/* 奇门遁甲排盘系统样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移动端优化 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 输入区域样式 */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    color: #2c3e50;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

.auto-detect-hint {
    font-size: 0.8em;
    color: #667eea;
    font-weight: 400;
    opacity: 0.8;
}

.input-group input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 时区选择器样式 */
.input-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group select:hover {
    border-color: #5a6fd8;
}

.input-group select option {
    padding: 8px;
    background: white;
    color: #2c3e50;
}

/* 时区自动检测提示样式 */
.auto-detect-hint {
    font-size: 0.8em;
    color: #667eea;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 4px;
    position: relative;
}

.auto-detect-hint::before {
    content: "🕐";
    margin-right: 2px;
}

/* 时区选择器组样式 */
.timezone-group {
    position: relative;
}

.timezone-group .input-group {
    position: relative;
}

.timezone-group .timezone-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

/* 时区选择器响应式优化 */
@media (max-width: 768px) {
    .input-group select {
        font-size: 14px;
        padding: 10px;
        padding-right: 35px;
    }
    
    .auto-detect-hint {
        font-size: 0.75em;
    }
    
    .event-hint {
        font-size: 0.75em;
    }
    
    .input-group textarea {
        font-size: 14px;
        min-height: 70px;
    }
    
    .char-count {
        font-size: 0.75em;
    }
    
    .timezone-group.focused {
        transform: none;
    }
    
    .label-icon {
        font-size: 1em;
        margin-right: 4px;
    }
}

/* 小屏幕时区选择器优化 */
@media (max-width: 480px) {
    .input-group select {
        font-size: 13px;
        padding: 8px;
        padding-right: 30px;
    }
    
    .timezone-icon {
        font-size: 12px;
        right: 8px;
    }
    
    .auto-detect-hint {
        font-size: 0.7em;
    }
    
    .event-hint {
        font-size: 0.7em;
    }
    
    .input-group textarea {
        font-size: 13px;
        min-height: 60px;
        padding: 8px;
    }
    
    .char-count {
        font-size: 0.7em;
    }
}

/* 标签图标样式 */
.label-icon {
    margin-right: 6px;
    font-size: 1.1em;
}

/* optgroup样式 */
.input-group select optgroup {
    font-weight: 600;
    color: #667eea;
    background: #f8f9fa;
    padding: 4px 0;
}

.input-group select optgroup option {
    font-weight: 400;
    color: #2c3e50;
    background: white;
    padding: 8px 12px;
}

/* 时区选择器悬停效果 */
.input-group select option:hover {
    background: #667eea;
    color: white;
}

/* 事件说明输入框样式 */
.event-description-group {
    grid-column: 1 / -1; /* 占满整行 */
}

.event-hint {
    font-size: 0.8em;
    color: #e74c3c;
    font-weight: 500;
    opacity: 0.9;
}

.input-group textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.input-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.char-count {
    text-align: right;
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
}

.char-count span {
    color: #667eea;
    font-weight: 600;
}

/* 时区选择器焦点样式增强 */
.timezone-group:focus-within .timezone-icon,
.timezone-group.focused .timezone-icon {
    color: #5a6fd8;
    transform: translateY(-50%) scale(1.1);
    transition: all 0.3s ease;
}

/* 时区选择器聚焦状态 */
.timezone-group.focused {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.timezone-group.focused select {
    border-color: #5a6fd8;
    box-shadow: 0 0 0 3px rgba(90, 111, 216, 0.15);
}

/* 按钮样式 */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn:disabled,
.btn.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    background: #95a5a6 !important;
    color: #ecf0f1 !important;
}

.btn.btn-disabled:hover {
    background: #95a5a6 !important;
    color: #ecf0f1 !important;
    transform: none !important;
}

/* 位置获取样式 */
.location-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.location-header {
    margin-bottom: 20px;
}

.location-header h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.3em;
    font-weight: 600;
}

.location-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95em;
}

.location-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.location-content .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.btn-icon {
    font-size: 1.1em;
}

.btn-text {
    font-weight: 500;
}

.location-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    max-width: 400px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

.status-icon {
    font-size: 1.1em;
}

.status-text {
    font-size: 0.95em;
}

.location-status.loading {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
    box-shadow: 0 2px 4px rgba(133, 100, 4, 0.1);
}

.location-status.loading .status-icon {
    animation: pulse 1.5s infinite;
}

.location-status.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    box-shadow: 0 2px 4px rgba(21, 87, 36, 0.1);
}

.location-status.success .status-icon {
    color: #28a745;
}

.location-status.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    box-shadow: 0 2px 4px rgba(114, 28, 36, 0.1);
}

.location-status.error .status-icon {
    color: #dc3545;
}

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

/* 结果显示样式 */
.result {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    color: #2c3e50;
}

.result.show {
    display: block;
}

/* 左右布局样式 */
.result-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.result-left {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
}

.result-right {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
    min-height: 400px;
}

/* 解读区域头部样式 */
.interpretation-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px 12px 0 0;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.interpretation-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.header-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.header-actions .btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.header-actions .btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* 解读内容区域样式 */
.interpretation-content {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-top: none;
    border-radius: 0 0 12px 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

/* 解读提示区域样式 */
.interpretation-placeholder {
    background: transparent;
    border: none;
    border-radius: 0 0 12px 12px;
    padding: 40px 20px;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.placeholder-content {
    max-width: 350px;
}

.placeholder-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.6;
}

.placeholder-content h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 600;
}

.placeholder-content p {
    color: #718096;
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 25px;
}

/* 功能特性展示 */
.placeholder-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.feature-icon {
    font-size: 16px;
}

/* 事件描述显示区域样式 */
.event-description-display {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.event-description-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 14px;
}

.event-icon {
    font-size: 16px;
}

.event-description-text {
    color: #2d3748;
    line-height: 1.5;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

/* 解读按钮区域样式 - 已移除，功能整合到右侧解读区域 */

/* 基本信息样式 - 简化布局 */
.basic-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: #2c3e50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .basic-info {
        padding: 20px;
        margin-bottom: 15px;
        border-radius: 10px;
    }
}

/* 统一的信息网格布局 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* 统一的信息项样式 */
.info-item,
.true-solar-time,
.location-info,
.jiju-info {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    padding: 12px 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-item:hover,
.true-solar-time:hover,
.location-info:hover,
.jiju-info:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.info-item strong,
.true-solar-time strong,
.location-info strong,
.jiju-info strong {
    display: block;
    font-size: 1em;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 600;
}

.info-item .sub-info,
.true-solar-time .sub-info,
.location-info .sub-info,
.jiju-info .sub-info {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

/* 特殊颜色标识 */
.true-solar-time {
    background: rgba(255, 193, 7, 0.08);
    border-color: rgba(255, 193, 7, 0.2);
}

.true-solar-time strong {
    color: #e67e22;
}

.location-info {
    background: rgba(46, 204, 113, 0.08);
    border-color: rgba(46, 204, 113, 0.2);
}

.location-info strong {
    color: #27ae60;
}

.jiju-info {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.2);
}

.jiju-info strong {
    color: #e74c3c;
}

/* 时间行布局 - 使用CSS3 Flexbox */
.time-row {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    align-items: stretch;
}

.time-item {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
}

/* 真太阳时样式调整 */
.true-solar-time {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .time-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-item,
    .true-solar-time {
        flex: none;
        width: 100%;
    }
}

/* 位置信息样式 */
.location-info {
    display: block;
    width: 100%;
    margin: 15px 0;
}

/* 九宫格样式 */
.palace-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.palace {
    position: relative;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

        .palace-number {
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8em;
            font-weight: bold;
            z-index: 3;
            border: 2px solid #ffffff;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }

.palace-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 35px;
    position: relative;
    z-index: 2;
}

.palace-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.palace-content .value {
    color: #34495e;
    font-size: 0.75em;
    text-align: center;
    word-break: keep-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
}

/* 大屏幕字体优化 */
@media (min-width: 1200px) {
    .palace-content div {
        font-size: 0.9em;
        min-height: 16px;
        padding: 3px 0;
    }
    
    .palace-content .value {
        font-size: 0.85em;
        line-height: 1.1;
    }
    
    .palace-number {
        font-size: 1.3em;
    }
}

@media (min-width: 1600px) {
    .palace-content div {
        font-size: 0.95em;
        min-height: 17px;
        padding: 3px 0;
    }
    
    .palace-content .value {
        font-size: 0.9em;
        line-height: 1.1;
    }
    
    .palace-number {
        font-size: 1.4em;
    }
}

/* 五行颜色统一管理 - CSS3变量 */
:root {
    --color-water: #3498db;  /* 水 - 蓝色 */
    --color-earth: #8b4513;  /* 土 - 棕色 */
    --color-wood: #27ae60;   /* 木 - 绿色 */
    --color-metal: #95a5a6;  /* 金 - 灰色 */
    --color-fire: #e74c3c;   /* 火 - 红色 */
}

/* 九星五行颜色 */
.palace-content .value.star-water { color: var(--color-water) !important; }
.palace-content .value.star-earth { color: var(--color-earth) !important; }
.palace-content .value.star-wood { color: var(--color-wood) !important; }
.palace-content .value.star-metal { color: var(--color-metal) !important; }
.palace-content .value.star-fire { color: var(--color-fire) !important; }

/* 八门五行颜色 */
.palace-content .value.door-water { color: var(--color-water) !important; }
.palace-content .value.door-earth { color: var(--color-earth) !important; }
.palace-content .value.door-wood { color: var(--color-wood) !important; }
.palace-content .value.door-metal { color: var(--color-metal) !important; }
.palace-content .value.door-fire { color: var(--color-fire) !important; }

/* 八神统一样式 - 无五行颜色 */
.palace-content .value.spirit-default {
    color: #333333 !important;  /* 统一的深灰色 */
}

/* 天干五行颜色 */
.palace-content .value.gan-water { color: var(--color-water) !important; }
.palace-content .value.gan-earth { color: var(--color-earth) !important; }
.palace-content .value.gan-wood { color: var(--color-wood) !important; }
.palace-content .value.gan-metal { color: var(--color-metal) !important; }
.palace-content .value.gan-fire { color: var(--color-fire) !important; }

/* 时辰天干高亮边框 */
.palace-content .value.time-gan-highlight {
    border: 2px solid #ff6b35 !important;
    border-radius: 4px !important;
    padding: 1px 3px !important;
    background: rgba(255, 107, 53, 0.1) !important;
    font-weight: bold !important;
}

/* 八卦符号样式 */
.palace-content .value.trigram-symbol {
    font-size: 1.2em !important;
    font-weight: bold !important;
    color: #2c3e50 !important;
}

/* 特殊标记样式 */
.special-mark {
    position: absolute;
    font-size: 0.65em;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 4px;
    color: white;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

        .special-mark.kongwang {
            top: clamp(2px, 0.5vw, 5px);
            right: clamp(2px, 0.5vw, 5px);
            background: #e74c3c;
            z-index: 2;
        }

        .special-mark.maxing {
            top: clamp(2px, 0.5vw, 5px);
            left: clamp(2px, 0.5vw, 5px);
            background: #f39c12;
            z-index: 2;
        }
        
        /* 当同时有空亡和马星时的样式 */
        .special-mark.both-marks.kongwang {
            background: #e74c3c;
            width: fit-content;
            max-width: 40px;
        }
        
        .special-mark.both-marks.maxing {
            background: #f39c12;
            width: fit-content;
            max-width: 40px;
        }
        
        /* 特殊标记容器样式 */
        .special-marks-container {
            position: absolute;
            top: clamp(2px, 0.5vw, 5px);
            right: clamp(2px, 0.5vw, 5px);
            display: flex;
            flex-direction: column;
            gap: 2px;
            z-index: 2;
        }
        
        .special-marks-container .special-mark {
            position: static;
            width: fit-content;
            max-width: 40px;
        }

/* 特殊信息样式 */
.special-info {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.special-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.special-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.special-item.kongwang {
    border-left-color: #e74c3c;
}

.special-item h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.special-item p {
    color: #34495e;
    margin: 5px 0;
    font-size: 0.9em;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

/* 错误信息样式 */
.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #f5c6cb;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.error::before {
    content: "⚠️ ";
    margin-right: 8px;
    font-size: 1.1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .input-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .location-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .location-content {
        gap: 10px;
    }
    
    .location-status {
        max-width: 100%;
        padding: 8px 10px;
        font-size: 14px;
    }
    
    /* 基本信息区域优化 */
    .basic-info {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }
    
    .info-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .info-item,
    .true-solar-time,
    .location-info,
    .jiju-info {
        padding: 12px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        margin: 8px 0;
    }
    
    .info-item strong,
    .true-solar-time strong,
    .location-info strong,
    .jiju-info strong {
        font-size: 1.1em;
        display: block;
        margin-bottom: 4px;
    }
    
    .info-item .sub-info,
    .true-solar-time .sub-info,
    .location-info .sub-info,
    .jiju-info .sub-info {
        font-size: 0.9em;
        opacity: 0.9;
    }
    
    /* 移动端时间行布局已通过flexbox处理 */
    
    /* 移动端左右布局改为垂直布局 */
    .result-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .result-right {
        min-height: auto;
    }
    
    /* 解读区域移动端优化 */
    .interpretation-header-section {
        padding: 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .interpretation-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .interpretation-header h3 {
        font-size: 1.2em;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .header-actions .btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .interpretation-content-section {
        min-height: 300px;
    }
    
    .interpretation-placeholder {
        min-height: 250px;
        padding: 25px 15px;
    }
    
    .placeholder-icon {
        font-size: 3em;
        margin-bottom: 15px;
    }
    
    .placeholder-content h3 {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    .placeholder-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .placeholder-features {
        gap: 8px;
        margin-top: 15px;
    }
    
    .feature-item {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .event-description-display {
        padding: 12px;
        margin: 15px 0;
    }
    
    .event-description-text {
        font-size: 13px;
        padding: 8px;
    }
    
    /* 解读按钮区域移动端优化 - 已移除，功能整合到右侧解读区域 */
    
    /* 九宫格优化 */
    .palace-grid {
        gap: 3px;
        margin-top: 15px;
    }
    
    .palace {
        padding: 8px;
        min-height: 80px;
        border-radius: 6px;
    }
    
    .palace-content {
        gap: 3px;
    }
    
    .palace-content .value {
        font-size: 0.65em;
        line-height: 1.2;
    }
    
    .palace-number {
        font-size: 0.8em;
        padding: 2px 4px;
    }
    
    /* 特殊信息优化 */
    .special-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 15px;
    }
    
    .special-item {
        padding: 12px;
        border-radius: 8px;
    }
    
    .special-item h4 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .special-item p {
        font-size: 0.85em;
        margin: 3px 0;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .input-section {
        padding: 12px;
    }
    
    .basic-info {
        padding: 12px;
        gap: 10px;
    }
    
    .info-item,
    .true-solar-time,
    .location-info,
    .jiju-info {
        padding: 10px;
    }
    
    .palace {
        padding: 6px;
        min-height: 70px;
    }
    
    .palace-content .value {
        font-size: 0.6em;
    }
    
    .palace-number {
        font-size: 0.7em;
        padding: 1px 3px;
    }
}

/* 解读功能样式 */
.interpretation-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 30px;
    overflow: hidden;
}

.interpretation-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.interpretation-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 300;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.interpretation-content {
    padding: 20px;
    color: #2c3e50;
    height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.interpretation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.interpretation-text {
    line-height: 1.8;
    font-size: 16px;
    white-space: pre-wrap;
    word-wrap: break-word;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
.interpretation-text::-webkit-scrollbar {
    width: 8px;
}

.interpretation-text::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.interpretation-text::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.interpretation-text::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.interpretation-text .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: #667eea;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .interpretation-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .interpretation-header h3 {
        font-size: 1.3em;
    }
    
    .interpretation-content {
        padding: 20px;
        min-height: 400px;
    }
    
    .interpretation-text {
        font-size: 15px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .interpretation-header {
        padding: 12px 15px;
    }
    
    .interpretation-header h3 {
        font-size: 1.2em;
    }
    
    .interpretation-content {
        padding: 15px;
        height: 350px;
    }
    
    .interpretation-text {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    color: #2c3e50;
}

.modal-body p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.modal-body .input-group {
    margin-bottom: 20px;
}

.modal-body .input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-body .input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.modal-body .input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.password-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #fdf2f2;
    border-radius: 5px;
    border-left: 3px solid #e74c3c;
}

.modal-footer {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e9ecef;
}

.modal-footer .btn {
    min-width: 80px;
}

/* 移动端模态框适配 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2em;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 12px 15px;
    }
}

/* Markdown 样式 */
.interpretation-text h1,
.interpretation-text h2,
.interpretation-text h3,
.interpretation-text h4,
.interpretation-text h5,
.interpretation-text h6 {
    margin: 20px 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
}

.interpretation-text h1 { font-size: 1.5em; }
.interpretation-text h2 { font-size: 1.3em; }
.interpretation-text h3 { font-size: 1.2em; }
.interpretation-text h4 { font-size: 1.1em; }

.interpretation-text p {
    margin: 10px 0;
    line-height: 1.7;
}

.interpretation-text strong,
.interpretation-text b {
    font-weight: 600;
    color: #2c3e50;
}

.interpretation-text em,
.interpretation-text i {
    font-style: italic;
    color: #7f8c8d;
}

.interpretation-text ul,
.interpretation-text ol {
    margin: 10px 0;
    padding-left: 20px;
}

.interpretation-text li {
    margin: 5px 0;
    line-height: 1.6;
}

.interpretation-text blockquote {
    margin: 15px 0;
    padding: 10px 15px;
    border-left: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #555;
}

.interpretation-text code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.interpretation-text pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.interpretation-text pre code {
    background: none;
    padding: 0;
    color: #333;
}

.interpretation-text hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 20px 0;
}

.interpretation-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.interpretation-text th,
.interpretation-text td {
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    text-align: left;
}

.interpretation-text th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
} 