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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

.header {
    background: #16213e;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #0f3460;
}

.header h1 { font-size: 1.4rem; color: #e94560; }

.tabs {
    display: flex;
    gap: 4px;
    background: #0f3460;
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn.active { background: #e94560; color: #fff; }
.tab-btn:hover { color: #fff; }

.tab-content { display: none; padding: 20px; max-width: 1200px; margin: 0 auto; }
.tab-content.active { display: block; }

.card {
    background: #16213e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #0f3460;
}

.card h2 { color: #e94560; font-size: 1.1rem; margin-bottom: 12px; }

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.input-group input, .input-group select {
    padding: 10px 14px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 0.95rem;
    flex: 1;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { background: #c73e55; }
.btn-secondary { background: #0f3460; color: #eee; }
.btn-secondary:hover { background: #1a4a8a; }
.btn-danger { background: #a83232; color: #fff; }
.btn-danger:hover { background: #8a2828; }

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

.signal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.signal-buy { background: #00c853; color: #000; }
.signal-sell { background: #e94560; color: #fff; }
.signal-hold { background: #ffa726; color: #000; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    background: #1a1a2e;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-item .label { font-size: 0.75rem; color: #aaa; margin-bottom: 4px; }
.stat-item .value { font-size: 1.2rem; font-weight: bold; }

.chart-container { position: relative; width: 100%; margin-bottom: 16px; }

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #0f3460;
}

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

.strategy-content {
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 0.95rem;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.spinner {
    display: inline-block;
    width: 30px; height: 30px;
    border: 3px solid #0f3460;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.sentiment-result {
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.sentiment-positive { background: rgba(0,200,83,0.15); border: 1px solid #00c853; }
.sentiment-negative { background: rgba(233,69,96,0.15); border: 1px solid #e94560; }
.sentiment-neutral { background: rgba(255,167,38,0.15); border: 1px solid #ffa726; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.checkbox-group label {
    display: flex; align-items: center; gap: 4px;
    background: #1a1a2e; padding: 6px 12px; border-radius: 6px;
    cursor: pointer; font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header { flex-direction: column; gap: 12px; }
    .tabs { width: 100%; justify-content: center; }
    .input-group { flex-direction: column; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Table */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { background: #0f3460; padding: 10px 12px; text-align: left; color: #ccc; white-space: nowrap; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid #16213e; white-space: nowrap; }
.data-table tr:hover { background: rgba(15,52,96,0.5); }
