/* 星盘查询网站样式文件 */

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

html, body {
    height: 100%;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

/* 粒子背景容器 */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    animation-delay: -2s;
    background: rgba(138, 43, 226, 0.1);
}

.particle:nth-child(3n) {
    animation-delay: -4s;
    background: rgba(255, 20, 147, 0.1);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    padding: 2rem 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 3rem;
    color: #8a2be2;
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

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

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #8a2be2, #ff1493, #00bfff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* 表单区域 */
.chart-form-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.form-header h2 i {
    color: #8a2be2;
    margin-right: 0.5rem;
}

.form-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* 表单样式 */
.chart-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.form-group label i {
    color: #8a2be2;
    width: 18px;
    font-size: 1rem;
    flex-shrink: 0;
}

.form-group input,
.form-group select {
    padding: 1.2rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 56px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

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

/* 日期时间输入框特殊样式 */
input[type="datetime-local"] {
    color-scheme: dark;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

input[type="datetime-local"]::-webkit-datetime-edit {
    color: #ffffff;
}

input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    color: #ffffff;
}

input[type="datetime-local"]::-webkit-datetime-edit-text {
    color: #ffffff;
}

input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
    color: #ffffff;
}

.form-group select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* 提交按钮 */
.form-actions {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-btn {
    position: relative;
    padding: 1.4rem 4rem;
    background: linear-gradient(45deg, #8a2be2, #ff1493);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 240px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn i {
    margin-right: 0.5rem;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 结果展示区域 */
.result-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
}

.result-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.close-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    background: rgba(138, 43, 226, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(138, 43, 226, 0.2);
    animation: pulseHint 2s ease-in-out infinite;
}

.close-hint i {
    color: #8a2be2;
    font-size: 0.8rem;
}

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

.result-header h2 {
    font-size: 2rem;
    color: #ffffff;
}

.result-header h2 i {
    color: #8a2be2;
    margin-right: 0.5rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* 结果内容 */
.result-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-section h3 i {
    color: #8a2be2;
}

/* 基本信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-label {
    font-weight: 600;
    color: #8a2be2;
    margin-bottom: 0.5rem;
}

.info-value {
    color: #ffffff;
}


/* 行星分析网格 */
.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.planet-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.planet-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
}

.planet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.planet-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #8a2be2;
}

.planet-position {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.planet-description {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 宫位分析网格 */
.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.house-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.house-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.2);
}

.house-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff1493;
    margin-bottom: 0.5rem;
}

.house-sign {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.house-description {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 四轴分析网格 */
.axes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.axis-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.axis-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.2);
}

.axis-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00bfff;
    margin-bottom: 0.5rem;
}

.axis-sign {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.axis-description {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 相位分析列表 */
.aspects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aspect-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.aspect-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 165, 0, 0.2);
}

.aspect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.aspect-planets {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffa500;
}

.aspect-type {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.aspect-description {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 特色介绍区域 */
.features-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 4rem;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.features-container h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffffff;
}

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

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(45deg, #8a2be2, #ff1493);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

/* 消息提示 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 2000;
    max-width: 400px;
}

.message-toast.show {
    transform: translateX(0);
}

.message-toast.success {
    border-left: 4px solid #4caf50;
}

.message-toast.error {
    border-left: 4px solid #f44336;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-icon.success::before {
    content: "✓";
    color: #4caf50;
}

.toast-icon.error::before {
    content: "✗";
    color: #f44336;
}

/* 位置选择器样式 */
.location-selector {
    position: relative;
    width: 100%;
}

.location-selector input[type="text"] {
    width: 100%;
    padding: 1.2rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 56px;
    box-sizing: border-box;
}

.location-selector input[type="text"]:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.location-selector input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.location-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.location-dropdown.show {
    display: block;
}

.location-options {
    padding: 0.5rem 0;
}

.location-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-option:hover {
    background: rgba(138, 43, 226, 0.2);
}

.location-option.selected {
    background: rgba(138, 43, 226, 0.3);
}

.location-option .city-name {
    font-weight: 500;
    color: #ffffff;
}

.location-option .province-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: auto;
}

.location-option .location-icon {
    color: #8a2be2;
    font-size: 0.9rem;
}

.location-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    margin-top: 0.5rem;
}

.location-selected .selected-text {
    color: #ffffff;
    font-weight: 500;
}

.clear-location {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-location:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.location-loading {
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.location-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.location-no-results {
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* 热门城市推荐 */
.location-popular {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.location-popular-title {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.location-popular-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem;
}

.location-popular-city {
    padding: 0.25rem 0.75rem;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-popular-city:hover {
    background: rgba(138, 43, 226, 0.3);
    transform: translateY(-1px);
}

.location-popular-city.user-location {
    background: rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.3);
    position: relative;
}

.location-popular-city.user-location:hover {
    background: rgba(0, 191, 255, 0.3);
}

.location-popular-city.user-location i {
    color: #00bfff;
    margin-right: 0.25rem;
}

.location-tag {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #00bfff;
    color: #ffffff;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 8px;
    font-weight: 500;
}

/* AI深度分析样式 */
.ai-analysis {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.ai-analysis.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    margin: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    overflow: hidden;
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ai-analysis-header h3 {
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fullscreen-toggle {
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 8px;
    color: #8a2be2;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.fullscreen-toggle:hover {
    background: rgba(138, 43, 226, 0.3);
    transform: translateY(-1px);
}

.fullscreen-toggle i {
    font-size: 1rem;
}

.ai-chat-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ai-chat-messages {
    flex: 1;
    max-height: calc(100vh - 300px);
    min-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.ai-analysis.fullscreen .ai-chat-messages {
    max-height: calc(100vh - 320px);
    min-height: calc(100vh - 320px);
}

.ai-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.3s ease;
}

.ai-message:last-child {
    margin-bottom: 0;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #8a2be2, #ff1493);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-avatar {
    background: linear-gradient(45deg, #00bfff, #1e90ff);
}

.ai-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-content {
    background: rgba(138, 43, 226, 0.1);
    border-color: rgba(138, 43, 226, 0.3);
}

.ai-content p {
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.ai-content p:last-child {
    margin-bottom: 0;
}

.ai-content h1,
.ai-content h2,
.ai-content h3,
.ai-content h4,
.ai-content h5,
.ai-content h6 {
    color: #ffffff;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    line-height: 1.3;
}

.ai-content h1 {
    font-size: 1.6rem;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
}

.ai-content h2 {
    font-size: 1.4rem;
    color: #8a2be2;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.ai-content h3 {
    font-size: 1.2rem;
    color: #ff1493;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.ai-content h4 {
    font-size: 1.1rem;
    color: #00bfff;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.ai-content ul,
.ai-content ol {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

.ai-content li {
    margin: 0.4rem 0;
    line-height: 1.6;
    color: #ffffff;
}

.ai-content ul li {
    list-style-type: disc;
}

.ai-content ul li::marker {
    color: #8a2be2;
}

.ai-content ol li {
    list-style-type: decimal;
}

.ai-content ol li::marker {
    color: #8a2be2;
    font-weight: bold;
}

.ai-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a2be2, transparent);
    margin: 1.5rem 0;
}

.ai-content strong {
    color: #ffd700;
    font-weight: 600;
}

.ai-content em {
    color: #87ceeb;
    font-style: italic;
}


.ai-welcome {
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.ai-welcome .ai-avatar {
    background: linear-gradient(45deg, #00bfff, #1e90ff);
}

.ai-chat-input-container {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ai-chat-input {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-chat-input input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ai-chat-input input:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.ai-chat-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ai-chat-input button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, #8a2be2, #ff1493);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ai-chat-input button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.ai-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-chat-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.ai-analysis.fullscreen .ai-chat-tips {
    max-height: 100px;
    margin-top: 0.25rem;
}

.ai-tip {
    padding: 0.5rem 1rem;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-analysis.fullscreen .ai-tip {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.ai-tip:hover {
    background: rgba(138, 43, 226, 0.3);
    transform: translateY(-1px);
}

.ai-typing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.ai-typing-dots {
    display: flex;
    gap: 0.25rem;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Markdown内容样式 */
.ai-content .markdown-content {
    line-height: 1.7;
    color: #ffffff;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-content .markdown-content h1,
.ai-content .markdown-content h2,
.ai-content .markdown-content h3,
.ai-content .markdown-content h4,
.ai-content .markdown-content h5,
.ai-content .markdown-content h6 {
    color: #ffffff;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    line-height: 1.3;
}

.ai-content .markdown-content h1 {
    font-size: 1.6rem;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
}

.ai-content .markdown-content h2 {
    font-size: 1.4rem;
    color: #8a2be2;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.ai-content .markdown-content h3 {
    font-size: 1.2rem;
    color: #ff1493;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.ai-content .markdown-content h4 {
    font-size: 1.1rem;
    color: #00bfff;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.ai-content .markdown-content p {
    margin: 0.8rem 0;
    text-align: justify;
}

.ai-content .markdown-content strong {
    color: #ffd700;
    font-weight: 600;
}

.ai-content .markdown-content em {
    color: #87ceeb;
    font-style: italic;
}

.ai-content .markdown-content ul,
.ai-content .markdown-content ol {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

.ai-content .markdown-content li {
    margin: 0.4rem 0;
    line-height: 1.6;
}

.ai-content .markdown-content ul li {
    list-style-type: disc;
}

.ai-content .markdown-content ul li::marker {
    color: #8a2be2;
}

.ai-content .markdown-content ol li {
    list-style-type: decimal;
}

.ai-content .markdown-content ol li::marker {
    color: #8a2be2;
    font-weight: bold;
}

.ai-content .markdown-content blockquote {
    margin: 1rem 0;
    padding: 0.8rem 1.2rem;
    background: rgba(138, 43, 226, 0.1);
    border-left: 4px solid #8a2be2;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.ai-content .markdown-content code {
    background: rgba(0, 0, 0, 0.3);
    color: #ffd700;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
}

.ai-content .markdown-content pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.ai-content .markdown-content pre code {
    background: none;
    color: #ffffff;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-content .markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.ai-content .markdown-content th,
.ai-content .markdown-content td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-content .markdown-content th {
    background: rgba(138, 43, 226, 0.2);
    color: #ffffff;
    font-weight: 600;
}

.ai-content .markdown-content tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ai-content .markdown-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a2be2, transparent);
    margin: 1.5rem 0;
}

.ai-content .markdown-content a {
    color: #00bfff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.ai-content .markdown-content a:hover {
    color: #87ceeb;
    border-bottom-color: #87ceeb;
}

/* AI分析Modal模态框样式 */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.modal-header h2 i {
    color: #8a2be2;
}

.modal-close-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.modal-close-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: rotate(90deg);
}

.modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content .ai-chat-messages {
    flex: 1;
    max-height: calc(90vh - 200px);
    min-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.modal-content .ai-chat-input-container {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.modal-content .ai-chat-tips {
    max-height: 100px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .chart-form {
        gap: 1.5rem;
    }
    
    .form-group {
        gap: 0.5rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 1rem;
        min-height: 52px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .result-container {
        padding: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .message-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .submit-btn {
        padding: 1.2rem 3rem;
        min-width: 200px;
    }
    
    /* 移动端日期时间输入框优化 */
    input[type="datetime-local"] {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 移动端位置选择器优化 */
    .location-dropdown {
        max-height: 250px;
        font-size: 0.9rem;
    }
    
    .location-option {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .location-popular-cities {
        gap: 0.75rem;
    }
    
    .location-popular-city {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .location-selected {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 移动端AI对话优化 */
    .ai-analysis {
        min-height: 50vh;
    }
    
    .ai-analysis.fullscreen {
        padding: 0.5rem;
    }
    
    .ai-chat-messages {
        max-height: calc(100vh - 250px);
        min-height: 300px;
        padding: 1rem;
    }
    
    .ai-analysis.fullscreen .ai-chat-messages {
        max-height: calc(100vh - 200px);
        min-height: calc(100vh - 200px);
        padding: 1rem;
    }
    
    .ai-analysis.fullscreen .ai-chat-tips {
        max-height: 80px;
        margin-top: 0.25rem;
    }
    
    .ai-analysis-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .fullscreen-toggle {
        align-self: flex-end;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .ai-message {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .ai-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .ai-content {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .ai-chat-input-container {
        padding: 1rem;
    }
    
    .ai-chat-input {
        gap: 0.5rem;
    }
    
    .ai-chat-input input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .ai-chat-input button {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .ai-tip {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* 移动端关闭提示优化 */
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
    
    .close-hint {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .close-hint span {
        display: none; /* 在移动端隐藏文字，只显示图标 */
    }
    
    /* 移动端Modal优化 */
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-content .ai-chat-messages {
        max-height: calc(95vh - 180px);
        min-height: 300px;
        padding: 1rem;
    }
    
    .modal-content .ai-chat-input-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 1.5rem 1rem;
    }
    
    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.7);
}
