/* Additional styles for all pages */

/* Main Navigation */
.main-nav {
    background: linear-gradient(135deg, #1a1a2e 0%, #252541 100%);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand a {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    padding: 15px 0;
    display: inline-block;
}

/* Hamburger Button - Hidden on Desktop */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    margin: 0 auto;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links .nav-link {
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-links .nav-link:hover {
    color: var(--accent-primary);
    background: rgba(233, 69, 96, 0.1);
}

.nav-links .nav-link.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Page Container */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.badge.success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge.danger {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.badge.neutral {
    background: rgba(170, 170, 170, 0.2);
    color: var(--neutral);
    border: 1px solid var(--neutral);
}

.badge.info {
    background: rgba(78, 205, 196, 0.2);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
}

.badge.warning {
    background: rgba(255, 170, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.category-badge {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    background: rgba(78, 205, 196, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: var(--accent-primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

/* Responsive Navigation */
@media (max-width: 992px) {
    .nav-links {
        gap: 3px;
    }

    .nav-links .nav-link {
        padding: 15px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px 20px;
        align-items: center;
    }

    .nav-brand {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .nav-brand a {
        font-size: 1.3rem;
        padding: 10px 0;
    }

    /* Show hamburger on mobile - centered */
    .hamburger {
        display: flex;
        position: relative;
        margin-bottom: 10px;
    }

    /* Hide nav links by default on mobile */
    .nav-links {
        position: relative;
        width: 100%;
        flex-direction: column;
        background: linear-gradient(135deg, #1a1a2e 0%, #252541 100%);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        gap: 0;
    }

    /* Show nav links when active */
    .nav-links.active {
        max-height: 500px;
        opacity: 1;
    }

    .nav-links .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        border-left: 0;
    }

    .nav-links .nav-link:first-child {
        border-radius: 10px 10px 0 0;
    }

    .nav-links .nav-link:last-child {
        border-bottom: none;
        border-radius: 0 0 10px 10px;
    }

    .page-container {
        padding: 20px 10px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 15px;
    }
}

/* Data Tables - Responsive */
.data-table {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    display: table;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

/* Allow wrapping for title column to prevent overlap on desktop */
.data-table td:first-child {
    white-space: normal;
    max-width: 350px;
    word-wrap: break-word;
}

/* Ensure proper spacing between columns */
.data-table th:not(:first-child),
.data-table td:not(:first-child) {
    min-width: 90px;
}

/* Desktop specific: ensure table doesn't overflow */
@media (min-width: 769px) {
    .data-table table {
        table-layout: auto;
        min-width: 1200px;
    }
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--accent-primary);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Mobile-specific table adjustments */
@media (max-width: 768px) {
    .data-table {
        margin: 0;
        padding: 0;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .data-table table {
        font-size: 0.85rem;
        min-width: 700px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    /* Hide less important columns on mobile */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3),
    .data-table th:nth-child(4),
    .data-table td:nth-child(4),
    .data-table th:nth-child(9),
    .data-table td:nth-child(9),
    .data-table th:nth-child(10),
    .data-table td:nth-child(10),
    .data-table th:nth-child(11),
    .data-table td:nth-child(11) {
        display: none;
    }
}

@media (max-width: 576px) {
    .data-table table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.stat-value {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: bold;
}

.stat-change {
    font-size: 0.9rem;
    margin-top: 8px;
}

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

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

/* Table Styles */
.data-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.data-table thead {
    background: var(--bg-dark);
}

.data-table th {
    padding: 15px;
    text-align: left;
    color: var(--accent-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
}

.badge.danger {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger);
}

.badge.warning {
    background: rgba(255, 170, 0, 0.2);
    color: var(--warning);
}

.badge.info {
    background: rgba(78, 205, 196, 0.2);
    color: var(--accent-secondary);
}

.badge.neutral {
    background: rgba(170, 170, 170, 0.2);
    color: var(--neutral);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    background: rgba(138, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(138, 92, 246, 0.3);
}

/* Filter Form */
.filter-form {
    margin: 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-group select {
    padding: 10px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover {
    border-color: var(--accent-primary);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.btn-reset {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary), #d63864);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

/* Prediction Cards */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.prediction-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

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

.prediction-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.prediction-horizon {
    background: rgba(78, 205, 196, 0.2);
    color: var(--accent-secondary);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.prediction-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.price-item {
    text-align: center;
    padding: 10px;
    background: var(--bg-dark);
    border-radius: 8px;
}

.price-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.price-value {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: bold;
}

.prediction-confidence {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.confidence-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.5s ease;
}

/* Progress Bars */
.progress-bar {
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--accent-secondary));
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.progress-text {
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Footer */
.main-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
}

.main-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.main-footer a {
    color: var(--accent-secondary);
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

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