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

:root {
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --blue-accent: #60a5fa;
    --dark: #0f172a;
    --card: #1e293b;
    --text: #e2e8f0;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
}

/* Analytics Header */
.analytics-header {
    background: var(--card);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.analytics-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.analytics-logo {
    height: 50px;
}

.analytics-menu {
    display: flex;
    gap: 2rem;
}

.analytics-link {
    color: rgba(226, 232, 240, 0.7);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.analytics-link.active,
.analytics-link:hover {
    color: var(--blue-light);
    background: rgba(59, 130, 246, 0.1);
}

.analytics-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--blue-accent);
    font-weight: 500;
}

.btn-analytics {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-light);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-analytics:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Dashboard */
.analytics-dashboard {
    padding: 2rem 0;
    min-height: calc(100vh - 100px);
}

.dashboard-header-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header-pro h1 {
    font-size: 2rem;
    color: var(--blue-light);
}

.range-select {
    padding: 0.5rem 1rem;
    background: var(--card);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text);
    border-radius: 5px;
    cursor: pointer;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--card);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.metric-card:hover {
    border-color: var(--blue-light);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-label {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-header i {
    color: var(--blue-light);
    font-size: 1.2rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--blue-light);
    margin-bottom: 0.5rem;
}

.metric-change {
    font-size: 0.85rem;
}

.metric-change.positive {
    color: #4ade80;
}

/* Charts */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--card);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
}

.chart-card.main {
    grid-column: 1 / -1;
}

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

.chart-header h3 {
    font-size: 1.2rem;
    color: var(--blue-light);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: rgba(226, 232, 240, 0.7);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.chart-btn.active,
.chart-btn:hover {
    background: var(--blue-light);
    color: #fff;
    border-color: var(--blue-light);
}

.chart-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 250px;
    gap: 1rem;
}

.bar {
    flex: 1;
    background: linear-gradient(to top, var(--blue) 0%, var(--blue-light) 100%);
    border-radius: 5px 5px 0 0;
    min-height: 20px;
    transition: all 0.3s;
}

.bar:hover {
    opacity: 0.8;
    transform: scaleY(1.1);
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
}

.markets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.market-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.market-name {
    width: 100px;
    font-size: 0.9rem;
}

.market-bar {
    flex: 1;
    height: 8px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.market-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
    border-radius: 5px;
    transition: width 0.3s;
}

.market-value {
    width: 50px;
    text-align: right;
    font-weight: bold;
    color: var(--blue-light);
}

/* Tables */
.tables-section {
    margin-bottom: 2rem;
}

.table-card {
    background: var(--card);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    overflow-x: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h3 {
    font-size: 1.2rem;
    color: var(--blue-light);
}

.btn-export {
    padding: 0.5rem 1rem;
    background: var(--blue-light);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-export:hover {
    background: var(--blue);
}

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

.data-table thead {
    background: rgba(59, 130, 246, 0.1);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--blue-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.data-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-badge.win {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-badge.loss {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Insights */
.insights-section {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.section-title-pro {
    font-size: 2rem;
    color: var(--blue-light);
    margin-bottom: 2rem;
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.insight-card {
    background: var(--card);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.insight-card:hover {
    border-color: var(--blue-light);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.insight-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.insight-card h4 {
    color: var(--blue-light);
    margin-bottom: 0.5rem;
}

.insight-card p {
    color: rgba(226, 232, 240, 0.7);
    margin-bottom: 1rem;
}

.insight-action {
    color: var(--blue-accent);
    font-weight: 500;
    cursor: pointer;
}

.insight-action:hover {
    color: var(--blue-light);
}

/* Footer */
.analytics-footer {
    background: var(--card);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.footer-pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-pro-logo {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-pro-col h5 {
    color: var(--blue-light);
    margin-bottom: 1rem;
}

.footer-pro-col ul {
    list-style: none;
}

.footer-pro-col ul li {
    margin-bottom: 0.5rem;
}

.footer-pro-col a {
    color: rgba(226, 232, 240, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-pro-col a:hover {
    color: var(--blue-light);
}

.footer-pro-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .analytics-menu {
        display: none;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-card.main {
        grid-column: 1;
    }
}
