/* ============================================
   期货智析 - Apple风格浅色主题
   设计风格：现代、简洁、优雅
   ============================================ */

:root {
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAFAFA;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(0, 122, 255, 0.3);
    
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-muted: #86868B;
    
    --apple-blue: #007AFF;
    --blue-glow: rgba(0, 122, 255, 0.15);
    --red: #FF3B30;
    --red-soft: rgba(255, 59, 48, 0.1);
    --red-glow: rgba(255, 59, 48, 0.15);
    --green: #34C759;
    --green-soft: rgba(52, 199, 89, 0.1);
    --green-glow: rgba(52, 199, 89, 0.15);
    --purple: #AF52DE;
    --purple-soft: rgba(175, 82, 222, 0.1);
    --purple-glow: rgba(175, 82, 222, 0.15);
    --amber: #FF9500;
    --amber-soft: rgba(255, 149, 0, 0.1);
    --amber-glow: rgba(255, 149, 0, 0.15);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'PingFang SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bg-grid,
.bg-glow {
    display: none;
}

.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   顶部导航 - 玻璃拟态效果
   ============================================ */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--apple-blue), var(--purple));
    border-radius: var(--radius-sm);
    color: white;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

.logo-pulse {
    display: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 500;
}

.nav-center {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px;
    border-radius: 14px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
}

.nav-item.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.nav-icon {
    font-size: 14px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--green-soft);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-green 2s ease-in-out infinite;
}

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

.status-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 0.5px;
}

.datetime {
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.nav-btn:hover {
    color: var(--apple-blue);
    background: var(--blue-glow);
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
    flex: 1;
    padding: 24px 32px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* ============================================
   搜索栏
   ============================================ */
.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px var(--blue-glow);
}

.search-box i {
    color: var(--text-muted);
    font-size: 16px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 400;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box kbd {
    padding: 4px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: inherit;
}

.view-controls {
    display: flex;
    gap: 6px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.view-btn {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 500;
}

.view-btn i {
    font-size: 14px;
}

.view-btn span {
    font-size: 13px;
    font-weight: 500;
}

.view-btn:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.view-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   筛选栏
   ============================================ */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.filter-tab:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.filter-tab.active {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    color: white;
    box-shadow: 0 4px 12px var(--blue-glow);
}

.filter-tab i {
    font-size: 12px;
}

.filter-count {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.filter-tab:not(.active) .filter-count {
    background: var(--bg-primary);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-select {
    position: relative;
}

.sort-select select {
    padding: 9px 36px 9px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236E6E73' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.sort-select select:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-md);
}

.sort-select select:focus {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px var(--blue-glow);
}

.sort-select select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

/* ============================================
   统计概览
   ============================================ */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-glow);
}

.stat-card:active {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-glow);
    border-radius: var(--radius-sm);
    color: var(--apple-blue);
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card.up .stat-icon {
    background: var(--red-soft);
    color: var(--red);
}

.stat-card.down .stat-icon {
    background: var(--green-soft);
    color: var(--green);
}

.stat-card.neutral .stat-icon {
    background: var(--amber-soft);
    color: var(--amber);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   品种卡片网格
   ============================================ */
.futures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.futures-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.futures-card.no-ai-data {
    opacity: 0.85;
    border-style: dashed;
    border-color: var(--purple);
}

.futures-card.no-ai-data:hover {
    opacity: 1;
    border-style: solid;
    box-shadow: var(--shadow-lg);
}

.ai-hint {
    text-align: center;
    padding: 12px;
    margin: 12px 0;
    background: var(--purple-soft);
    border: 1px dashed var(--purple);
    border-radius: var(--radius-sm);
    color: var(--purple);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.ai-hint i {
    font-size: 16px;
}

.futures-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--apple-blue), var(--purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.futures-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-glow);
}

.futures-card:hover::before {
    opacity: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.card-symbol {
    display: flex;
    align-items: center;
    gap: 12px;
}

.symbol-tag {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-glow), var(--purple-soft));
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--apple-blue);
    flex-shrink: 0;
}

.card-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.card-code {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-price {
    text-align: right;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.price-change {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

.up { color: var(--red); }
.down { color: var(--green); }
.neutral { color: var(--amber); }

.suggestion-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.suggestion-badge.up {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.suggestion-badge.down {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.suggestion-badge.neutral {
    background: var(--amber-soft);
    color: var(--amber);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-fill.up { background: var(--red); }
.metric-fill.down { background: var(--green); }
.metric-fill.orange { background: var(--amber); }

.metric-value {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.period-trends {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.period-tag {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.period-tag.up {
    background: var(--red-soft);
    border-color: rgba(255, 59, 48, 0.2);
    color: var(--red);
}

.period-tag.down {
    background: var(--green-soft);
    border-color: rgba(52, 199, 89, 0.2);
    color: var(--green);
}

.period-tag.neutral {
    background: var(--amber-soft);
    border-color: rgba(255, 149, 0, 0.2);
    color: var(--amber);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.key-levels {
    display: flex;
    gap: 14px;
    font-size: 13px;
    font-weight: 500;
}

.key-levels span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.key-levels .label {
    color: var(--text-muted);
}

.detail-link {
    font-size: 13px;
    color: var(--apple-blue);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.detail-link:hover {
    opacity: 0.8;
}

/* ============================================
   详情视图
   ============================================ */
.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.symbol-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.symbol-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.symbol-code {
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    font-weight: 500;
}

.price-main {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
}

.price-value {
    font-size: 36px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

.price-change {
    font-size: 16px;
    font-weight: 600;
}

.price-levels {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.level-tag {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.level-tag.resistance {
    background: var(--red-soft);
    color: var(--red);
}

.level-tag.support {
    background: var(--green-soft);
    color: var(--green);
}

.quote-grid {
    display: flex;
    gap: 32px;
}

.quote-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.quote-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.quote-value {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

/* 周期选择 */
.period-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.period-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.period-btns {
    display: flex;
    gap: 6px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.period-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.period-btn:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.period-btn.active {
    background: var(--apple-blue);
    color: white;
    box-shadow: 0 2px 8px var(--blue-glow);
}

/* 详情主体 */
.detail-body {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}

.chart-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.chart-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.chart-legend {
    display: flex;
    gap: 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.legend-dot.ma5 { background: var(--amber); }
.legend-dot.ma10 { background: var(--apple-blue); }
.legend-dot.ma20 { background: var(--purple); }

.kline-chart {
    width: 100%;
    height: 480px;
}

/* 分析侧边栏 */
.analysis-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

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

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.panel-header i {
    color: var(--apple-blue);
    font-size: 16px;
}

.panel-header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* AI建议卡片 */
.ai-analyze-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--purple), #8B5CF6);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--purple-glow);
}

.ai-analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--purple-glow);
}

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

.ai-analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-analyze-btn i {
    font-size: 12px;
}

.suggestion-card .suggestion-content {
    text-align: center;
    padding: 20px;
    background: var(--blue-glow);
    border: 1px solid rgba(0, 122, 255, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.suggestion-badge {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.suggestion-reason {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.trade-params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.param-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.param-label {
    color: var(--text-muted);
}

.param-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

/* 技术指标 */
.indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.indicator-cell {
    padding: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s;
}

.indicator-cell:hover {
    background: var(--bg-card-hover);
}

.indicator-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.indicator-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.indicator-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 关键点位 */
.levels-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-group-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.level-group.resistance .level-group-label { color: var(--red); }
.level-group.support .level-group-label { color: var(--green); }

.level-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.level-item span:first-child {
    color: var(--text-secondary);
}

.level-item span:last-child {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.level-item.pivot-point {
    background: var(--purple-soft);
    border: 1px solid rgba(175, 82, 222, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 6px 0;
}

.level-item.pivot-point span:first-child {
    color: var(--purple);
    font-weight: 600;
}

.level-item.pivot-point span:last-child {
    color: var(--purple);
    font-size: 16px;
    font-weight: 700;
}

.level-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* 多周期趋势 */
.trends-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.trend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.trend-period {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.trend-badge.up {
    background: var(--red-soft);
    color: var(--red);
}

.trend-badge.down {
    background: var(--green-soft);
    color: var(--green);
}

.trend-badge.neutral {
    background: var(--amber-soft);
    color: var(--amber);
}

/* 趋势评分 */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.score-ring {
    position: relative;
    width: 100px;
    height: 100px;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--bg-primary);
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.score-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   情景预案
   ============================================ */
.scenario-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scenario-item {
    display: grid;
    grid-template-columns: 100px 70px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.scenario-item:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-sm);
}

.scenario-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--apple-blue);
}

.scenario-probability {
    font-size: 14px;
    font-weight: 600;
    color: var(--amber);
    text-align: center;
}

.scenario-action {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   AI智能分析
   ============================================ */
.ai-analysis-content {
    min-height: 140px;
}

.ai-analysis-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: var(--text-muted);
}

.ai-analysis-placeholder i {
    font-size: 40px;
    margin-bottom: 14px;
    opacity: 0.4;
    color: var(--purple);
}

.ai-analysis-placeholder p {
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.ai-analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    gap: 14px;
}

.ai-analysis-loading i {
    font-size: 32px;
    color: var(--purple);
    animation: spin 1.5s linear infinite;
}

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

.ai-analysis-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-summary {
    padding: 16px;
    background: var(--purple-soft);
    border: 1px solid rgba(175, 82, 222, 0.15);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.ai-suggestion-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.ai-suggestion-direction {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-suggestion-direction i,
.ai-suggestion-direction span {
    font-size: 18px;
}

.ai-suggestion-direction.long i,
.ai-suggestion-direction.long span {
    color: var(--red);
}

.ai-suggestion-direction.short i,
.ai-suggestion-direction.short span {
    color: var(--green);
}

.ai-suggestion-direction.neutral i,
.ai-suggestion-direction.neutral span {
    color: var(--amber);
}

.ai-confidence {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.ai-confidence-bar {
    width: 70px;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.ai-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--amber), var(--green));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-key-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ai-metric-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.ai-metric-item .label {
    color: var(--text-muted);
}

.ai-metric-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

.ai-metric-item .value.up {
    color: var(--red);
}

.ai-metric-item .value.down {
    color: var(--green);
}

.ai-timestamp {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-weight: 500;
}

/* ============================================
   AI分析详情模态框
   ============================================ */
.modal-large {
    max-width: 960px;
    width: 90%;
}

.modal-large .modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

.ai-modal-section {
    margin-bottom: 28px;
}

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

.ai-modal-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--apple-blue);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.3px;
}

.ai-modal-section-title i {
    font-size: 18px;
}

.four-dimensional-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.four-dimensional-table th,
.four-dimensional-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.four-dimensional-table th {
    background: var(--purple-soft);
    color: var(--purple);
    font-weight: 600;
    font-size: 13px;
}

.four-dimensional-table td {
    color: var(--text-secondary);
}

.four-dimensional-table tr:last-child td {
    border-bottom: none;
}

.four-dimensional-table .period-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.scenario-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.scenario-card {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--apple-blue);
}

.scenario-card.breakthrough {
    border-left-color: var(--green);
}

.scenario-card.consolidation {
    border-left-color: var(--amber);
}

.scenario-card.reversal {
    border-left-color: var(--red);
}

.scenario-card.news {
    border-left-color: var(--purple);
}

.scenario-probability {
    display: inline-block;
    padding: 4px 10px;
    background: var(--purple-soft);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 8px;
}

.scenario-action {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.red-lines-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.red-line-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--red-soft);
    border: 1px solid rgba(255, 59, 48, 0.15);
    border-radius: 10px;
    font-size: 13px;
    color: var(--red);
    font-weight: 500;
}

.red-line-item.pass {
    background: var(--green-soft);
    border-color: rgba(52, 199, 89, 0.15);
    color: var(--green);
}

.discipline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.discipline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.discipline-item i {
    font-size: 18px;
}

.discipline-item.pass i {
    color: var(--green);
}

.discipline-item.fail i {
    color: var(--red);
}

.discipline-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.ai-experience-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--amber-soft);
    border: 1px solid rgba(255, 149, 0, 0.15);
    border-radius: 10px;
    font-size: 13px;
    color: var(--amber);
    line-height: 1.5;
}

.experience-item i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ============================================
   历史分析记录
   ============================================ */
.history-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.history-header i {
    color: var(--apple-blue);
    font-size: 18px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 36px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.history-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.history-time {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 140px;
    font-weight: 500;
}

.history-suggestion {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.history-suggestion.up {
    background: var(--red-soft);
    color: var(--red);
}

.history-suggestion.down {
    background: var(--green-soft);
    color: var(--green);
}

.history-suggestion.neutral {
    background: var(--amber-soft);
    color: var(--amber);
}

.history-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.history-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.history-metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.history-metric-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-detail-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.history-detail-btn:hover {
    color: var(--apple-blue);
    border-color: var(--apple-blue);
    background: var(--blue-glow);
}

/* ============================================
   面板头部操作按钮
   ============================================ */
.panel-header-action {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.panel-header-action:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* ============================================
   对话框
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.modal-header h3 i {
    color: var(--apple-blue);
    font-size: 20px;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 16px;
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

/* 对话框内容样式 */
.modal-suggestion-main {
    text-align: center;
    padding: 24px;
    background: var(--blue-glow);
    border: 1px solid rgba(0, 122, 255, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.modal-suggestion-main .suggestion-badge {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-suggestion-main .suggestion-reason {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.modal-param-card {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    text-align: center;
}

.modal-param-card .param-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-param-card .param-value {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.modal-section-title i {
    color: var(--apple-blue);
    font-size: 18px;
}

.modal-indicators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.modal-indicator-item {
    padding: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.modal-indicator-item .indicator-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.modal-indicator-item .indicator-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-indicator-item .indicator-detail {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.modal-levels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-level-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.modal-level-row .level-label {
    color: var(--text-secondary);
}

.modal-level-row .level-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.modal-trends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-trend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.modal-trend-period {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-trend-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.modal-trend-badge.up {
    background: var(--red-soft);
    color: var(--red);
}

.modal-trend-badge.down {
    background: var(--green-soft);
    color: var(--green);
}

.modal-trend-badge.neutral {
    background: var(--amber-soft);
    color: var(--amber);
}

/* ============================================
   Toast 提示
   ============================================ */
.toast-container {
    position: fixed;
    top: 88px;
    right: 32px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    max-width: 420px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast.removing {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: var(--green-soft);
    color: var(--green);
}

.toast.info .toast-icon {
    background: var(--blue-glow);
    color: var(--apple-blue);
}

.toast.warning .toast-icon {
    background: var(--amber-soft);
    color: var(--amber);
}

.toast.error .toast-icon {
    background: var(--red-soft);
    color: var(--red);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   刷新按钮
   ============================================ */
.refresh-all-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--apple-blue);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--blue-glow);
}

.refresh-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--blue-glow);
}

.refresh-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.refresh-all-btn i {
    font-size: 14px;
}

.refresh-all-btn.spinning i {
    animation: spin 1s linear infinite;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.refresh-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   自选按钮
   ============================================ */
.watch-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
}

.watch-btn:hover {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--amber-soft);
}

.watch-btn.active {
    background: var(--amber-soft);
    border-color: var(--amber);
    color: var(--amber);
}

/* 卡片刷新按钮 */
.card-refresh-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.card-refresh-btn:hover {
    border-color: var(--apple-blue);
    color: var(--apple-blue);
    background: var(--blue-glow);
}

.card-ai-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(175, 82, 222, 0.3);
    border-radius: 10px;
    color: var(--purple);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.card-ai-btn:hover {
    border-color: var(--purple);
    background: var(--purple-soft);
}

.card-ai-btn.analyzing {
    color: var(--amber);
    border-color: var(--amber);
    animation: pulse-opacity 1s infinite;
}

@keyframes pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-analyze-all-btn {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--purple), #8B5CF6);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--purple-glow);
}

.ai-analyze-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--purple-glow);
}

.ai-analyze-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   AI历史记录详情样式
   ============================================ */
.ai-history-detail {
    padding: 10px 0;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.detail-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.detail-header h4 i {
    color: var(--apple-blue);
}

.detail-time {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.detail-summary {
    background: var(--blue-glow);
    border-left: 4px solid var(--apple-blue);
    padding: 14px 18px;
    margin-bottom: 18px;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.detail-summary i {
    color: var(--apple-blue);
    font-size: 16px;
    margin-top: 2px;
}

.detail-summary p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.detail-suggestion {
    margin-bottom: 18px;
}

.suggestion-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.suggestion-card.long {
    border-color: var(--red);
    background: var(--red-soft);
}

.suggestion-card.short {
    border-color: var(--green);
    background: var(--green-soft);
}

.suggestion-card.neutral {
    border-color: var(--amber);
    background: var(--amber-soft);
}

.suggestion-card i {
    font-size: 28px;
}

.suggestion-card.long i {
    color: var(--red);
}

.suggestion-card.short i {
    color: var(--green);
}

.suggestion-card.neutral i {
    color: var(--amber);
}

.suggestion-text {
    font-size: 22px;
    font-weight: 700;
    flex: 1;
}

.suggestion-card.long .suggestion-text {
    color: var(--red);
}

.suggestion-card.short .suggestion-text {
    color: var(--green);
}

.suggestion-card.neutral .suggestion-text {
    color: var(--amber);
}

.confidence-text {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.metric-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.down {
    color: var(--red);
}

.detail-section {
    margin-bottom: 22px;
}

.detail-section h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.detail-section h5 i {
    color: var(--apple-blue);
    font-size: 14px;
}

.four-d-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.four-d-table th {
    background: var(--bg-primary);
    padding: 10px 12px;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.four-d-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.four-d-table tr:last-child td {
    border-bottom: none;
}

.four-d-table tr:hover td {
    background: var(--blue-glow);
}

.kdj-diagnosis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.kdj-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kdj-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.kdj-value {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.pivot-points-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.pivot-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pivot-item span:first-child {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.pivot-item strong {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 700;
}

.pivot-item.resistance span:first-child {
    color: var(--red);
}

.pivot-item.resistance strong {
    color: var(--red);
}

.pivot-item.support span:first-child {
    color: var(--green);
}

.pivot-item.support strong {
    color: var(--green);
}

.pivot-item.center {
    border-color: var(--purple);
    background: var(--purple-soft);
}

.pivot-item.center span:first-child {
    color: var(--purple);
}

.pivot-item.center strong {
    color: var(--purple);
}

.warning-list {
    list-style: none;
    padding: 0;
}

.warning-list li {
    background: var(--amber-soft);
    border-left: 4px solid var(--amber);
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.warning-list li:last-child {
    margin-bottom: 0;
}

/* ============================================
   Apple风格品种卡片样式
   ============================================ */

/* 品种卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

/* 品种代码框 */
.code-box {
    width: 36px;
    height: 36px;
    background: #F5F5F7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* 价格区域 */
.price-area {
    text-align: right;
}

.price {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.price.up {
    color: var(--red);
}

.price.down {
    color: var(--green);
}

.change {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

.change.up {
    color: var(--red);
}

.change.down {
    color: var(--green);
}

/* 操作建议标签 */
.action-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.action-pill.do-more {
    background: rgba(52, 199, 89, 0.1);
    color: var(--green);
}

.action-pill.watch {
    background: rgba(255, 149, 0, 0.1);
    color: var(--amber);
}

/* 指标区域 */
.metrics {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.metric {
    flex: 1;
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.metric-val {
    font-size: 14px;
    font-weight: 600;
}

.bar-bg {
    height: 4px;
    background: #F5F5F7;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

/* 时间框架按钮 */
.timeframes {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tf {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-muted);
    background: #F5F5F7;
    cursor: pointer;
    transition: all 0.2s;
}

.tf.active {
    background: #E8F2FF;
    color: var(--apple-blue);
    font-weight: 500;
}

.tf:hover:not(.active) {
    background: #E5E5EA;
}

/* 卡片底部 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F5F5F7;
    padding-top: 12px;
    font-size: 12px;
}

.support-resist {
    color: var(--text-muted);
}

.support-resist span {
    margin-right: 8px;
}

.support-resist .red {
    color: var(--red);
}

.support-resist .green {
    color: var(--green);
}

.link {
    color: var(--apple-blue);
    font-weight: 500;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1200px) {
    .detail-body {
        grid-template-columns: 1fr;
    }
    
    .analysis-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .futures-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-sidebar {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        gap: 18px;
        padding: 20px;
    }
    
    .quote-grid {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 14px;
    }
    
    .detail-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pivot-points-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .kdj-diagnosis-grid {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        padding: 0 16px;
    }
    
    .main-content {
        padding: 16px;
    }
}