/* 
   AdSense Earnings Comparative Analysis Dashboard Stylesheet
   Location: d:/xampp/htdocs/compare-quez/style.css
*/

:root {
    --rblx-color: #1f77b4;
    --rblx-light: #e6f2ff;
    --quiz-color: #ff7f0e;
    --quiz-light: #fff3e6;
    --winner-color: #15803d;
    --bg-dark: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

/* Base & Typography */
body {
    background-color: #f8fafc;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 2.5rem;
}

/* Navbar Customization */
.navbar-custom {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 3px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-brand div span {
    letter-spacing: -0.01em;
}

/* Winner Executive Banner */
.winner-banner {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(22, 101, 52, 0.4);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.winner-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.revenue-diff-box {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    height: 100%;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 700;
}

/* Badges */
.badge-rblx {
    background-color: var(--rblx-color);
    color: #ffffff;
}

.badge-quiz {
    background-color: var(--quiz-color);
    color: #ffffff;
}

/* Chart Container Cards */
.chart-container-box {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    position: relative;
}

/* Fixed & Responsive Medium Chart Wrappers */
.chart-wrapper-md {
    position: relative;
    width: 100%;
    height: 270px;
    max-height: 290px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    max-height: 270px;
}

/* Datatables Custom Styling */
.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
}

.table-custom {
    width: 100%;
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 2px solid #cbd5e1;
    padding: 12px 14px;
}

.table-custom td {
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.88rem;
    padding: 10px 14px;
}

/* Tabs Styling */
.nav-pills .nav-link {
    color: #64748b;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-pills .nav-link.active {
    background-color: #1e293b;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 18px;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    border-bottom-color: #94a3b8;
}

.nav-tabs .nav-link.active {
    font-weight: 700;
    border-bottom: 3px solid #3b82f6;
    color: #1e293b;
    background: transparent;
}

/* Utility Helper Classes */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Mobile, Tablet, Desktop)
   ========================================================================== */

@media (max-width: 1200px) {
    .metric-value {
        font-size: 1.45rem;
    }
    .chart-container-box {
        padding: 16px 20px;
    }
    .chart-wrapper-md, .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 992px) {
    .navbar-brand {
        flex-direction: row;
        align-items: center;
    }
    .winner-banner {
        padding: 1.5rem !important;
    }
    .winner-banner h2 {
        font-size: 1.35rem;
    }
    .winner-banner p {
        font-size: 1.02rem !important;
    }
    .revenue-diff-box {
        width: 100%;
        margin-top: 1rem;
    }
    .chart-wrapper-md, .chart-wrapper {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .navbar-custom {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    .navbar-brand span {
        font-size: 1.1rem !important;
    }
    .navbar-brand div div {
        font-size: 0.78rem !important;
    }
    .winner-banner h2 {
        font-size: 1.2rem;
    }
    .winner-banner p {
        font-size: 0.92rem !important;
    }
    .metric-value {
        font-size: 1.3rem;
    }
    .chart-container-box {
        padding: 14px;
        border-radius: 10px;
    }
    .chart-container-box h5 {
        font-size: 1rem;
    }
    .chart-wrapper-md, .chart-wrapper {
        height: 220px;
    }
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .table-custom td, .table-custom th {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .winner-banner {
        padding: 1rem !important;
        border-radius: 12px;
    }
    .winner-banner h2 {
        font-size: 1.05rem;
    }
    .kpi-card {
        padding: 0.85rem !important;
        border-radius: 10px;
    }
    .metric-value {
        font-size: 1.2rem;
    }
    .chart-wrapper-md, .chart-wrapper {
        height: 200px;
    }
    .nav-pills {
        flex-direction: column;
    }
    .nav-pills .nav-link {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}
