/* 易星八字 - 暗色树洞风格主题样式 */

:root {
    /* APP配色方案 - 深色绿色主题 */
    --primary-color: #A8E063;
    --primary-dark: #86C440;
    --secondary-color: #56AB2F;
    --accent-color: #A8E063;
    --success-color: #A8E063;
    --background-color: #1E1E2E;
    --background-secondary: #2D2D44;
    --card-color: #2D2D44;
    --card-hover: #353550;
    --text-color: #FFFFFF;
    --text-secondary: #FFFFFF;
    --subtitle-color: rgba(255, 255, 255, 0.7);
    --border-color: #2D2D44;
    
    /* APP渐变 - 深色背景渐变 */
    --gradient-primary: linear-gradient(135deg, #1E1E2E 0%, #2D2D44 100%);
    --gradient-warm: linear-gradient(135deg, #A8E063 0%, #56AB2F 100%);
    --gradient-success: linear-gradient(135deg, #A8E063 0%, #56AB2F 100%);
    
    /* 圆角 */
    --radius: 15px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
    background: var(--gradient-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* 移动端触摸优化 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    /* 护眼优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 全屏聊天页面样式 */
.chat-page-fullscreen {
    height: 100vh;
    overflow: hidden;
    overflow-x: hidden;
    background: var(--background-color);
    width: 100%;
    max-width: 100vw;
}

.chat-page-fullscreen #app {
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* 移除装饰元素 - APP简洁风格 */
body::before,
body::after {
    display: none;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
    }
    50% { 
        transform: translate(30px, -30px) scale(1.1);
    }
}

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

/* Element UI 主题定制 - APP深色绿色主题 */
.el-button--primary {
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    color: #000000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(168, 224, 99, 0.3);
    padding: 16px 32px;
    font-size: 18px;
}

.el-button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 224, 99, 0.4);
    filter: brightness(1.1);
}

.el-card {
    background: var(--card-color);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
}

.el-card__header {
    background: transparent;
    border-bottom: none;
    color: var(--text-secondary);
    padding: 0;
}

.el-card__body {
    padding: 24px;
    color: var(--text-color);
}

.el-input__inner {
    background-color: var(--card-color);
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 16px 20px;
}

.el-input__inner::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.el-input__inner:focus {
    border: 2px solid var(--primary-color);
    box-shadow: none;
    background-color: var(--card-color);
}

/* 下拉框样式 */
.el-select .el-input__inner {
    cursor: pointer;
}

.el-select-dropdown {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.el-select-dropdown__item {
    color: var(--text-color);
    background-color: transparent;
}

.el-select-dropdown__item:hover {
    background-color: rgba(168, 224, 99, 0.12);
}

.el-select-dropdown__item.selected {
    color: var(--primary-color);
    font-weight: 600;
    background-color: rgba(168, 224, 99, 0.08);
}

/* 单选按钮样式 - 按钮式布局 */
.el-radio-group {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    display: flex;
    gap: 16px;
}

.el-radio {
    color: var(--text-color);
    cursor: pointer;
    margin-right: 0 !important;
    display: inline-block;
    flex: 1;
    text-align: center;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    background: var(--card-color);
    transition: all 0.2s ease;
}

/* 桌面端保持横向排列 */
@media (min-width: 769px) {
    .el-radio-group {
        display: flex;
        gap: 8px;
    }
    
    .el-radio {
        flex: 1;
        width: auto;
        margin-right: 0 !important;
    }
}

.el-radio:hover {
    background: var(--card-hover);
}

.el-radio.is-checked {
    background: var(--primary-color);
    color: #000000;
    box-shadow: 0 4px 12px rgba(168, 224, 99, 0.25);
}

.el-radio__input {
    display: none;
}

.el-radio__label {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    padding-left: 0;
}

.el-radio.is-checked .el-radio__label {
    color: #000000;
    font-weight: 600;
}

/* 移动端Element UI组件优化 */
.el-select,
.el-input,
.el-button,
.el-radio {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 页面布局 */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-hero {
    background: transparent;
    padding: 20px 0 40px;
    text-align: center;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

/* 移除装饰元素 */
.page-hero::before {
    display: none;
}

.page-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-color);
    letter-spacing: 0;
    position: relative;
}

.page-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}

.header-notice {
    background: var(--gradient-warm);
    color: #000000;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
}

.gradient-text {
    color: var(--text-color);
    font-weight: 700;
}

.home-container {
    min-height: calc(100vh - 300px);
    padding-top: 0;
}

.form-card {
    max-width: 800px;
    margin: 0 auto;
}

/* 表单项间距优化 */
.el-form-item {
    margin-bottom: 24px;
}

.features-section {
    padding: 80px 0;
    background: var(--background-color);
}

/* 树洞风步骤指示器 */
.step-indicator {
    margin-top: 32px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-indicator > div {
    padding: 12px 24px;
    border-radius: 50px;
    background: var(--card-color);
    border: none;
    color: var(--text-color);
    font-weight: 600;
    display: inline-block;
    box-shadow: none;
    font-size: 14px;
    margin: 0 8px;
}

.step-indicator > div span:first-child {
    margin-right: 10px;
}

.step-indicator > div:last-child {
    background: var(--card-color);
    border: none;
    color: var(--subtitle-color);
    box-shadow: none;
}

.step-divider {
    display: inline-block;
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    vertical-align: middle;
    margin: 0 4px;
}

/* 桌面端使用flex */
@media (min-width: 769px) {
    .step-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
    }
    
    .step-indicator > div {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .step-indicator > div span:first-child {
        margin-right: 0;
    }
    
    .step-divider {
        margin: 0;
    }
}

/* 现代分割线 */
.ancient-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.ancient-divider::before,
.ancient-divider::after {
    content: '';
    height: 2px;
    width: 50px;
    background: var(--border-color);
    border-radius: 1px;
}

.ancient-divider span {
    color: var(--primary-color);
    font-size: 20px;
}

/* 聊天页面样式 - 树洞氛围 */
.ai-chat-container {
    position: relative;
    background: var(--background-color);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.ai-chat-container .el-card__body {
    height: 100%;
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
}

.chat-body {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    display: block;
}

/* 消息区域高度 - 留出输入框空间 */
.chat-body > .chat-messages {
    height: calc(100vh - 240px);
    min-height: 300px;
    max-width: 100%;
}

/* 输入区域固定在可见区域 */
.chat-body > .chat-input-area {
    position: relative;
    bottom: 0;
}

.chat-messages {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 8px;
    margin-bottom: 20px;
    background: var(--background-secondary);
    border-radius: 12px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.chat-input-area {
    padding: 20px 0;
    background: var(--background-color);
    position: relative;
    width: 100%;
    max-width: 100%;
    z-index: 5;
    margin-top: auto;
}

/* 确保输入框元素可见 */
.chat-input-area .el-input,
.chat-input-area .el-button {
    display: block;
    width: 100%;
}

/* 输入框文本域样式 */
.chat-input-area .el-textarea__inner {
    background-color: var(--background-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
    padding: 12px 16px;
    resize: none;
}

.chat-input-area .el-textarea__inner:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
    background-color: var(--card-color);
}

.back-button {
    margin-bottom: 16px;
}

/* 消息气泡样式 - 全宽布局 */

/* Markdown 样式 - 现代配色 */
.markdown-content {
    color: var(--text-color);
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3 {
    margin: 20px 0 12px 0;
    font-weight: 600;
    color: var(--primary-color);
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
    margin-top: 0;
}

.markdown-content p {
    margin: 12px 0;
    color: var(--text-color);
}

.markdown-content ul, 
.markdown-content ol {
    margin: 12px 0;
    padding-left: 24px;
    color: var(--text-color);
}

.markdown-content li {
    margin: 8px 0;
}

.markdown-content blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    color: var(--subtitle-color);
    border-radius: 0 8px 8px 0;
}

.markdown-content code {
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.markdown-content pre {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
}

/* 滚动条样式 - 现代配色 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--subtitle-color);
}

/* 产品特色卡片 - 树洞风格 */
.feature-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(167, 139, 250, 0.2);
    border-color: var(--primary-color);
    background: var(--card-hover);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.3);
}

/* 响应式设计 */
@media (max-width: 1024px) and (min-width: 769px) {
    .form-card {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 24px 0;
    }
    
    .page-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .page-hero::before {
        font-size: 200px;
    }
    
    /* 增加移动端外边距 */
    .page-container {
        padding: 0 20px;
    }
    
    .step-indicator {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }
    
    .step-divider {
        width: 3px;
        height: 24px;
        background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    }
    
    /* 移动端触摸优化 */
    .el-select,
    .el-input,
    .el-button {
        min-height: 48px;
    }
    
    .el-radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .el-radio {
        min-height: 52px;
        width: 100% !important;
    }
    
    .el-select .el-input__inner,
    .el-input__inner {
        min-height: 48px;
        line-height: 48px;
        padding: 0 16px;
        font-size: 16px;
    }
    
    .el-button {
        min-height: 48px;
        padding: 14px 24px;
        font-size: 16px;
    }
    
    /* 表单响应式优化 - 移除负边距，增加内边距 */
    .form-card {
        margin: 0 0;
        border-radius: 12px;
    }
    
    .el-card__body {
        padding: 28px 20px;
    }
    
    .el-card__header {
        padding: 20px;
    }
    
    /* 聊天页面移动端优化 - 增加内边距 */
    .chat-body {
        padding: 12px;
    }
    
    .chat-body > .chat-messages {
        height: calc(100vh - 220px);
        min-height: 250px;
        padding: 12px 6px;
        margin-bottom: 16px;
    }
    
    .chat-messages {
        padding: 12px 6px;
        margin-bottom: 12px;
    }
    
    .chat-input-area {
        padding: 12px 0;
        background: var(--background-color);
        border-top: 1px solid var(--border-color);
    }
    
    /* 移动端输入框样式 */
    .chat-input-area .el-input__inner {
        font-size: 16px !important;
    }
    
    .chat-input-area .el-textarea__inner {
        font-size: 16px !important;
        min-height: 80px !important;
    }
    
    /* 移动端消息更紧凑 */
    
    /* 表单项间距 */
    .el-form-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
        letter-spacing: 2px;
    }
    
    .page-hero::before {
        font-size: 150px;
    }
    
    /* 小屏手机增加更多边距 */
    .page-container {
        padding: 0 16px;
    }
    
    .el-card__body {
        padding: 24px 18px;
    }
    
    .el-card__header {
        padding: 18px;
    }
    
    .chat-body {
        padding: 10px;
    }
    
    .chat-body > .chat-messages {
        height: calc(100vh - 200px);
        min-height: 200px;
        padding: 10px 4px;
        margin-bottom: 12px;
    }
    
    .chat-messages {
        padding: 10px 4px;
        margin-bottom: 10px;
    }
    
    .chat-input-area {
        padding: 10px 0;
        background: var(--background-color);
        border-top: 1px solid var(--border-color);
    }
    
    /* 小屏输入框 */
    .chat-input-area .el-input__inner {
        font-size: 16px !important;
        padding: 12px 15px !important;
    }
    
    .chat-input-area .el-textarea__inner {
        font-size: 16px !important;
        padding: 10px 14px !important;
        min-height: 70px !important;
    }
    
    .chat-input-area .el-button {
        height: 48px !important;
        font-size: 16px !important;
    }
    
    /* 小屏手机消息更紧凑 */
}