/* assets/css/style.css - 样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 10px;
    min-height: 100vh;
}

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

/* 顶部导航栏 */
.navbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
}

.system-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-time {
    font-size: 1.1rem;
    font-weight: 500;
    color: #93c5fd;
}

/* 通用卡片样式 */
.card {
    background-color: #1e293b;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 第一排 - 交易对选择 */
.trading-pairs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.pair-btn {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.pair-btn.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.5);
}

.pair-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

/* 实时数据网格 */
.realtime-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.data-item {
    background-color: #334155;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.data-label {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 5px;
}

.data-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #60a5fa;
}

/* 第二排 - 行情分析和技术指标 */
.row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.market-analysis, .technical-indicators {
    background-color: #1e293b;
    border-radius: 10px;
    padding: 15px;
}

.market-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.market-item {
    background-color: #334155;
    border-radius: 8px;
    padding: 12px;
}

.market-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 5px;
}

.market-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.price-value {
    color: #10b981;
}

.trend-value {
    color: #f59e0b;
}

.rsi-value {
    color: #f87171;
}

.consistency-value {
    color: #60a5fa;
}

.pattern-value {
    color: #a78bfa;
}

.win-rate-value {
    color: #2dd4bf;
}

/* 支撑位阻力位 */
.support-resistance {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.support, .resistance {
    flex: 1;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.support {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    margin-right: 8px;
}

.resistance {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%);
    margin-left: 8px;
}

.sr-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #d1fae5;
}

.sr-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

/* 技术指标区域 */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.indicator-item {
    background-color: #334155;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.2s ease;
}

.indicator-item:nth-child(odd) {
    background-color: #3c4a61;
}

.indicator-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 第三排 - 综合分析预测 */
.comprehensive-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.prediction, .suggestion {
    background-color: #1e293b;
    border-radius: 10px;
    padding: 15px;
}

.prediction-index {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.index-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    background: conic-gradient(#10b981 0% 65%, #f59e0b 65% 80%, #ef4444 80% 100%);
    position: relative;
}

.index-circle::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: #1e293b;
    border-radius: 50%;
}

.index-value {
    position: relative;
    z-index: 1;
    color: #10b981;
}

.suggestion-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.suggestion-text {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #10b981;
}

.win-rate {
    font-size: 1.1rem;
    color: #f59e0b;
}

/* 第四排 - 分析周期选择 */
.timeframe-selection {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.timeframe-btn {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.timeframe-btn.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.5);
}

.timeframe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

/* 第五排 - 开始分析按钮 */
.start-analysis {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.start-btn {
    background: linear-gradient(135deg, #1e40af 0%, #10b981 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px 40px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.6);
}

.start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.refresh-btn {
    background: none;
    border: none;
    color: #60a5fa;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    color: #93c5fd;
    transform: rotate(90deg);
}

/* 窄屏手机适配 */
@media (max-width: 768px) {
    .row-two {
        grid-template-columns: 1fr;
    }
    
    .realtime-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .comprehensive-analysis {
        grid-template-columns: 1fr;
    }
    
    .market-data {
        grid-template-columns: 1fr;
    }
    
    .indicators-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .timeframe-selection {
        justify-content: center;
    }
    
    .timeframe-btn {
        min-width: 120px;
    }
    
    .pair-btn {
        min-width: 100px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .realtime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeframe-btn {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .pair-btn {
        min-width: 80px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #334155;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #60a5fa;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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