/* ============================================
   XingshuAI 品牌配色方案
   ============================================ */
:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #f6ad55;
    --info-color: #4299e1;
    --dark-color: #2d3748;
    --light-bg: #f7fafc;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 基础样式 */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    min-height: 100vh;
}

/* ============================================
   品牌导航栏
   ============================================ */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.brand-logo {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    transition: all 0.3s ease;
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   现代化卡片样式
   ============================================ */
.card-modern {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.shadow-hover {
    box-shadow: var(--card-shadow);
}

.shadow-hover:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
}

.card-modern .card-header {
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%) !important;
}

/* ============================================
   现代化表单控件
   ============================================ */
.input-modern {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 16px;
}

.input-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-label {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.form-text {
    color: #718096;
    font-size: 13px;
    margin-top: 0.5rem;
}

/* ============================================
   现代化按钮
   ============================================ */
.btn-modern {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* ============================================
   功能特色卡片
   ============================================ */
.features-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e2e8f0;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 14px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.feature-item i {
    font-size: 20px;
    margin-right: 12px;
    width: 28px;
    text-align: center;
}

.feature-item:hover {
    transform: translateX(8px);
    color: var(--primary-color);
}

/* 分析结果文本区域 */
#analysisText {
    font-family: "Microsoft YaHei", Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
}

/* 分析结果文本区域 */
.analysis-content {
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 600px;
    overflow-y: auto;
    color: #333;
    padding-right: 10px;
}

.analysis-content::-webkit-scrollbar {
    width: 6px;
}

.analysis-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.analysis-content::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 10px;
}

.analysis-content::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.analysis-content h1 {
    font-size: 1.5rem;
    color: #0d6efd;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.analysis-content h2 {
    font-size: 1.3rem;
    color: #198754;
}

.analysis-content h3 {
    font-size: 1.15rem;
    color: #fd7e14;
}

.analysis-content h4 {
    font-size: 1.05rem;
    color: #6f42c1;
}

.analysis-content blockquote {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.analysis-content ul {
    padding-left: 1.5rem;
}

.analysis-content p {
    margin-bottom: 0.7rem;
}

.analysis-content .badge {
    font-weight: normal;
    font-size: 0.85em;
}

.analysis-content table {
    font-size: 0.9rem;
}

.analysis-content table th {
    background-color: #f1f8ff;
}

.analysis-content a {
    color: #0d6efd;
    border-bottom: 1px dotted;
}

.analysis-content a:hover {
    border-bottom-style: solid;
}

/* 高亮股票数据 */
.stock-highlight {
    font-weight: bold;
    border-bottom: 1px dashed #ccc;
    color: #dc3545;
    padding: 0 2px;
    background-color: rgba(220, 53, 69, 0.05);
    border-radius: 2px;
}

/* 图表容器 */
.chart-container {
    margin-bottom: 30px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container iframe {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
    max-width: 100%;
    overflow: hidden;
}

.chart-container iframe:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chart-container a.btn {
    transition: all 0.2s ease;
}

.chart-container a.btn:hover {
    transform: translateY(-2px);
}

/* 表格样式 */
.stock-info-table {
    width: 100%;
}

.stock-info-table th {
    width: 40%;
    font-weight: 600;
    color: #495057;
}

/* 加载动画容器 */
#loadingIndicator {
    min-height: 300px;
}

/* 加载动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.spinner-border {
    animation: spinner-border 1s linear infinite, pulse 2s ease-in-out infinite;
}

/* 加载步骤列表 */
.loading-steps {
    text-align: left;
    max-width: 500px;
    margin: 30px auto;
}

.loading-step {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.loading-step.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateX(5px);
}

.loading-step.completed {
    background: #d4edda;
    color: #155724;
}

.loading-step-icon {
    width: 28px;
    height: 28px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.loading-step-icon .step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #e9ecef;
    border-radius: 50%;
    color: #6c757d;
    font-size: 14px;
}

.loading-step.active .step-number {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.loading-step-icon .spinner-border {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-step.active .spinner-border {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

.loading-step-icon .check-icon {
    color: #28a745;
    font-size: 20px;
    font-weight: bold;
}

.loading-step.active .check-icon {
    color: white;
}

.loading-step-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.loading-step.pending .loading-step-text {
    color: #6c757d;
}

/* 进度条 */
.progress-container {
    max-width: 500px;
    margin: 20px auto;
}

.progress {
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% {
        background-position: -500px 0;
    }
    100% {
        background-position: 500px 0;
    }
}

/* 加载提示文字动画 */
.loading-message {
    font-size: 18px;
    color: #495057;
    margin-top: 20px;
    font-weight: 500;
}

.loading-message::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

/* 预计时间提示 */
.estimated-time {
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
}

/* 加载动画图标 */
.loading-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.loading-icon {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-icon:nth-child(2) {
    border-top-color: #764ba2;
    animation-duration: 1.5s;
    animation-direction: reverse;
    opacity: 0.5;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   页脚样式
   ============================================ */
.footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    margin-top: 80px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color));
}

/* ============================================
   响应式调整
   ============================================ */
@media (max-width: 992px) {
    .brand-title {
        font-size: 24px;
    }

    .card-modern {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .row {
        flex-direction: column-reverse;
    }

    .chart-container iframe {
        height: 600px !important;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .brand-title {
        font-size: 20px;
    }

    .brand-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .chart-container iframe {
        height: 500px !important;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .feature-item {
        font-size: 13px;
    }
} 