/* History Page Styles - Bitcoin Terminal */
:root {
    --primary-color: #41ff00;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --border-radius: 10px;
    --box-shadow: 0 0 20px rgba(65, 255, 0, 0.3);
    --transition: all 0.3s ease;
}

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

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--primary-color);
    font-family: "Courier New", monospace;
    min-height: 100vh;
    padding: 20px;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-size: 2.5em;
    text-shadow: 0 0 10px var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.8;
}

/* Navigation */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-family: inherit;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    text-align: center;
    min-width: 80px;
    flex: 0 1 auto;
}

.nav-link.active {
    background: var(--primary-color);
    color: #000;
}

.nav-link:not(.active) {
    background: rgba(65, 255, 0, 0.1);
    color: var(--primary-color);
}

.nav-link:hover:not(.active) {
    background: rgba(65, 255, 0, 0.2);
}

/* Container Base Styles */
.section-container {
    background: rgba(65, 255, 0, 0.05);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

/* Chart Styles */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5em;
    text-shadow: 0 0 5px var(--primary-color);
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(65, 255, 0, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: var(--transition);
}

.control-btn:hover,
.control-btn.active {
    background: var(--primary-color);
    color: #000;
}

.chart-wrapper {
    height: 400px;
    position: relative;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.metric-card {
    background: rgba(65, 255, 0, 0.1);
    border: 1px solid rgba(65, 255, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9em;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Metric Color Classes */
.metric-excellent { color: #00ff88; }
.metric-good { color: #41ff00; }
.metric-fair { color: #ffaa00; }
.metric-poor { color: #ff6666; }

/* Horizon Metrics */
.horizon-metrics {
    margin-top: 20px;
}

.horizon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin: 5px 0;
    background: rgba(65, 255, 0, 0.05);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.horizon-label {
    font-weight: bold;
}

.horizon-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

/* History Header */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(65, 255, 0, 0.1);
    padding: 5px 10px;
    border-radius: 3px;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table table {
    width: 100%;
    min-width: 600px;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(65, 255, 0, 0.2);
}

.history-table th {
    background: rgba(65, 255, 0, 0.1);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.history-table tr:hover {
    background: rgba(65, 255, 0, 0.05);
}

/* Status Classes */
.status-correct { color: #00ff88; font-weight: bold; }
.status-incorrect { color: #ff4444; font-weight: bold; }
.status-pending { color: #ffaa00; font-weight: bold; }

/* Prediction Classes */
.prediction-up { color: #00ff00; font-weight: bold; }
.prediction-down { color: #ff4444; font-weight: bold; }

/* Confidence Classes */
.confidence-high { color: #00ff88; }
.confidence-medium { color: #ffaa00; }
.confidence-low { color: #ff6666; }

/* Loading & Error States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    opacity: 0.7;
}

.error {
    color: #ff4444;
    text-align: center;
    padding: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination-btn {
    background: rgba(65, 255, 0, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #000;
}

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

.pagination-btn.active {
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
}

.pagination-info {
    color: var(--primary-color);
    font-size: 0.9em;
    margin: 0 15px;
}

.pagination-select {
    background: rgba(65, 255, 0, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chart-header,
    .history-header {
        flex-direction: column;
        gap: 15px;
    }

    .history-stats {
        justify-content: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 2em;
    }

    .history-table {
        font-size: 0.8em;
    }

    .history-table th,
    .history-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .nav-bar {
        gap: 8px;
        padding: 0 5px;
    }

    .nav-link {
        padding: 6px 12px;
        min-width: 60px;
        font-size: 0.8em;
        flex: 1 1 auto;
        max-width: 100px;
    }
}