/* Custom CSS for AI Tools Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Animations */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 20px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.slide-up {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Tool card hover effects */
.tool-card {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeIn 0.5s ease-out forwards;
}

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

.tool-card:nth-child(1) { animation-delay: 0.6s; }
.tool-card:nth-child(2) { animation-delay: 0.7s; }
.tool-card:nth-child(3) { animation-delay: 0.8s; }
.tool-card:nth-child(4) { animation-delay: 0.9s; }
.tool-card:nth-child(5) { animation-delay: 1.0s; }
.tool-card:nth-child(6) { animation-delay: 1.1s; }

.tool-card img {
    transition: transform 0.5s ease;
}

.tool-card:hover img {
    transform: scale(1.1);
}

.tool-icon {
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

/* Button hover effects */
button, .cta-button {
    transition: all 0.2s ease;
}

button:hover, .cta-button:hover {
    transform: scale(1.05);
}

button:active, .cta-button:active {
    transform: scale(0.95);
}

/* Scroll behavior */
section {
    scroll-margin-top: 80px;
}

/* Link transitions */
a {
    transition: color 0.2s ease;
}

/* Custom gradient backgrounds */
.gradient-purple-pink {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-indigo-purple {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-lg {
        backdrop-filter: blur(16px);
    }
    
    .backdrop-blur-sm {
        backdrop-filter: blur(4px);
    }
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Responsive image */
img {
    max-width: 100%;
    height: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8;
    --success-color: #34a853;
    --danger-color: #ea4335;
    --warning-color: #fbbc04;
    --bg-dark: #0f0f23;
    --bg-card: #262e6b;
    --bg-hover: #252540;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #2d2d44;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

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

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    margin-top: 80px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

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

.header-left i {
    font-size: 2em;
    color: var(--primary-color);
}

.header h1 {
    font-size: 1.8em;
    font-weight: 600;
}

.status-badge {
    background: linear-gradient(135deg, var(--success-color), #2d8a4e);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
    animation: pulse 2s infinite;
}

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

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ai-model-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(26, 115, 232, 0.1);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(26, 115, 232, 0.3);
}

.ai-model-info i {
    font-size: 1.5em;
    color: var(--primary-color);
}

.ai-model-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-model-name {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-model-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 2s infinite;
}

.status-dot.connected {
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

.status-dot.error {
    background: var(--danger-color);
    box-shadow: 0 0 8px var(--danger-color);
}

.status-dot.unknown {
    background: var(--warning-color);
    box-shadow: 0 0 8px var(--warning-color);
}

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

.status-text {
    color: var(--text-secondary);
}

.update-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* 卡片通用样式 */
.card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-header i {
    font-size: 1.4em;
    color: var(--primary-color);
}

.card-header h3 {
    font-size: 1.2em;
    font-weight: 600;
}

/* 顶部卡片布局 */
.top-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.info-item .value {
    font-weight: 600;
    font-size: 1.1em;
}

.leverage {
    color: var(--warning-color);
    font-weight: 700;
}

/* 价格显示 */
.price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.price {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(26, 115, 232, 0.3);
}

.price-change {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 5px;
    padding: 4px 12px;
    border-radius: 10px;
}

.price-change.positive {
    color: var(--success-color);
    background: rgba(52, 168, 83, 0.1);
}

.price-change.negative {
    color: var(--danger-color);
    background: rgba(234, 67, 53, 0.1);
}

/* 持仓显示 */
.position-display {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
    background: var(--bg-hover);
}

.position-type {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.position-type.long {
    color: var(--success-color);
}

.position-type.short {
    color: var(--danger-color);
}

.position-size {
    font-size: 1.1em;
    color: var(--text-secondary);
}

.pnl {
    font-weight: 700;
}

.pnl.positive {
    color: var(--success-color);
}

.pnl.negative {
    color: var(--danger-color);
}

/* K线图表 */
.chart-section {
    margin-bottom: 30px;
}

.chart-card {
    min-height: 500px;
}

.chart {
    width: 100%;
    height: 450px;
}

/* 底部区域 */
.bottom-section {
    display: grid;
   
    gap: 20px;
    margin-bottom: 30px;
}

/* AI决策卡片 */
.ai-latest {
    background: var(--bg-hover);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.ai-signal {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.signal-badge {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1em;
}

.signal-badge.BUY {
    background: var(--success-color);
    color: white;
}

.signal-badge.SELL {
    background: var(--danger-color);
    color: white;
}

.signal-badge.HOLD {
    background: var(--warning-color);
    color: white;
}

.confidence-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    background: var(--bg-dark);
}

.confidence-badge.HIGH {
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.confidence-badge.MEDIUM {
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
}

.confidence-badge.LOW {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.ai-reason {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.ai-prices {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
}

.stop-loss {
    color: var(--danger-color);
}

.take-profit {
    color: var(--success-color);
}

.ai-history {
    max-height: 300px;
    overflow-y: auto;
}

.ai-history-item {
    background: var(--bg-dark);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.85em;
    border-left: 3px solid var(--primary-color);
}

/* 交易记录表格 */
.trades-table {
    overflow-x: auto;
    max-height: 400px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    background: var(--bg-hover);
    z-index: 10;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9em;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9em;
}

tbody tr:hover {
    background: var(--bg-hover);
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px !important;
}

/* 信号统计 */
.stats-section {
    margin-bottom: 30px;
}

.stats-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mini-chart {
    height: 300px;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .bottom-section {
        grid-template-columns: 1fr;
    }
    
    .stats-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-cards {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
}

