/* 璟隆AI选股系统 - 全局样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h2 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.logo p {
    font-size: 0.9em;
    opacity: 0.8;
}

.nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: #4facfe;
}

.nav-item .icon {
    font-size: 1.3em;
    margin-right: 15px;
    width: 30px;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    font-size: 0.85em;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 主内容区 */
.main-content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
}

/* 顶部栏 */
.topbar {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.topbar h1 {
    font-size: 2em;
    color: #1e3c72;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 0.95em;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time {
    color: #666;
    font-size: 0.95em;
}

.btn-refresh {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95em;
    transition: transform 0.2s;
}

.btn-refresh:hover {
    transform: translateY(-2px);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 5px;
}

.stat-change {
    color: #4caf50;
    font-size: 0.85em;
}

/* 区块 */
.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 1.5em;
    color: #1e3c72;
}

.btn-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s;
}

.btn-link:hover {
    color: #764ba2;
}

/* 策略卡片 */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.strategy-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
}

.strategy-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.strategy-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #1e3c72;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.strategy-desc {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
    line-height: 1.6;
}

.strategy-meta {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.strategy-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
    flex: 1;
}

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

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

.btn-secondary {
    background: #f5f7fa;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    text-align: center;
    padding: 30px 20px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-card:hover {
    border-color: #667eea;
    border-style: solid;
    background: #f8f9ff;
}

.action-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.action-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 8px;
}

.action-desc {
    color: #666;
    font-size: 0.9em;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .logo p,
    .sidebar .nav-item span:not(.icon),
    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }

    .stats-grid,
    .strategy-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }
}
