﻿/* Modern Statistics Lab Styling */
:root {
    --bg-gradient-1: #4a90e2;
    --bg-gradient-2: #357abd;
    --button-bg: #ffffff;
    --button-hover: #4a90e2;
    --button-active: #357abd;
    --text-color: #2c3e50;
    --button-border: #e0e0e0;
    --container-bg: #f8f9fa;
}

body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    min-height: 100vh;
    color: var(--text-color);
}

/* Central Stats Container */
.stats-bg {
    min-height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #66cbea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-container {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.18);
    max-width: 1200px;
    width: 98vw;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header Styles */
.stats-header {
    background: linear-gradient(90deg, #222a36 60%, #66cbea 100%);
    padding: 32px 32px 18px 32px;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
}

.stats-header-title {
    display: flex;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.stats-logo {
    font-size: 2.2rem;
    margin-right: 12px;
}

.stats-title {
    letter-spacing: 1px;
}

/* Navbar Styles */
.stats-navbar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.stats-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    margin-bottom: 4px;
}

.stats-nav-btn:hover,
.stats-nav-btn.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

/* Main Content Area */
.stats-main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

/* Plot Window Styles */
.stats-plot-window {
    background: #f8f9fa;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.09);
    min-height: 480px;
    min-width: 700px;
    width: 85%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Coin Flip Layout */
.coin-layout {
    width: 100%;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    justify-content: space-between;
}
.coin-left {
    flex: 1 1 65%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.coin-right {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.coin-plot {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 8px;
}
.coin-metrics {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.coin-placeholder {
    font-style: italic;
    color: #666;
}

/* Sampling & CI Layout */
.ci-layout { width:100%; display:flex; gap:28px; align-items:flex-start; justify-content:space-between; }
.ci-left { flex:1 1 65%; display:flex; flex-direction:column; gap:32px; }
.ci-right { flex:1 1 35%; display:flex; flex-direction:column; gap:24px; }
.ci-plot { background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); padding:8px; }
.ci-metrics { background:#fff; border-radius:12px; padding:16px; box-shadow:0 2px 8px rgba(0,0,0,0.06); }
.ci-placeholder { font-style:italic; color:#666; }

@media (max-width: 1100px) {
    .ci-layout { flex-direction:column; }
    .ci-left, .ci-right { width:100%; }
}

@media (max-width: 1100px) {
    .coin-layout { flex-direction: column; }
    .coin-left, .coin-right { width: 100%; }
}

/* Existing Styles - Button Groups */
.button-group {
    background: var(--container-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-group h3 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 1.1em;
}

/* Button Container - Horizontal Layout */
.button-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Button Styling */
button {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
    font-size: 0.9em;
}

button:hover {
    background: var(--button-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button.active {
    background: var(--button-active);
    color: white;
    border-color: var(--button-active);
}

/* Dashboard Section */
.dashboard {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard h1 {
    color: var(--text-color);
    margin: 0 0 15px 0;
    font-size: 1.8em;
}

.dashboard p {
    color: #666;
    line-height: 1.5;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 1100px) {
    .stats-container {
        min-width: 99vw;
        max-width: 99vw;
    }
    .stats-plot-window {
        min-width: 0;
        width: 99%;
        max-width: 99vw;
    }
}

@media (max-width: 700px) {
    .stats-header {
        padding: 18px 8px 10px 8px;
    }
    .stats-main-content {
        padding: 10px;
    }
    .stats-plot-window {
        padding: 8px;
        min-height: 220px;
    }
    .stats-header-title {
        font-size: 1.2rem;
    }
    .stats-nav-btn {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
}
