* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: fixed;
    height: 100%;
}

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;900&display=swap');

body {
    font-family: 'Barlow', 'Arial', sans-serif;
    background:
        radial-gradient(circle at 30% 40%, rgba(24, 21, 18, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(148, 138, 103, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #000000, #0a0a0a, #181512);
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    width: 100%;
    max-width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 98px,
            rgba(147, 0, 0, 0.03) 100px
        );
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

/* NEW CSS GRID LAYOUT SYSTEM - RESPONSIVE WITHOUT TRANSFORM SCALING */
.container {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header"
        "dashboard"
        "progress";
    width: 100%;
    height: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.header {
    grid-area: header;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    /* Use clamp for responsive sizing */
    padding: clamp(0.5rem, 2vh, 2rem) clamp(1rem, 3vw, 3rem);
    border-bottom: 2px solid rgba(148, 138, 103, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.logo h1 {
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.logo-image {
    max-height: clamp(8rem, 15vh, 12rem);
    width: auto;
    display: block;
    margin: 0 auto -1rem auto;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
    object-fit: contain;
}

.logo p {
    font-size: 1.8rem;
    text-align: center;
    opacity: 0.7;
    color: #948a67;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 0;
    position: relative;
    z-index: 2;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes chartWave {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.dashboard {
    grid-area: dashboard;
    display: block;
    padding: clamp(0.5rem, 1vw, 1rem);
    overflow: hidden;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 2rem;
    height: 100%;
    max-width: 95vw;
    margin: 0 auto;
    /* Center the entire layout */
    align-content: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    height: 100%;
    /* No overflow - everything must fit */
    overflow: hidden;
    box-sizing: border-box;
}


.stats-cards-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(148, 138, 103, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 1.2rem;
    width: 100%;
    height: 100%;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-left: 1rem;
    padding-right: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    height: 100%;
    max-width: 100%;
    overflow: visible; /* Allow card to size naturally */
    box-sizing: border-box;
}

.right-panel .chart-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    max-height: none;
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(148, 138, 103, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.right-panel .weekly-chart-container {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.platform-section {
    margin-bottom: 0.5rem;
}

.game-stats-section {
    margin-top: 0.5rem;
}

.stats-section-title {
    text-align: center;
    margin-bottom: 0.8rem;
}

.stats-section-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Barlow', sans-serif;
    margin: 0;
}

.stats-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: flex-start;
    align-items: stretch;
    height: 100%;
    overflow-y: auto;
}

/* CARD AUTO-CENTERING WITH CSS GRID */
.platform-cards-row,
.game-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-content: stretch;
    align-items: stretch;
    /* Smooth transitions for add/remove */
    transition: grid-template-columns 0.3s ease;
    width: 100%;
    margin: 0;
}

/* Game statistics - single column below 1920px to prevent truncation */
@media (max-width: 1919px) {
    .game-stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .platform-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .platform-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .platform-cards-row,
    .game-stats-row {
        grid-template-columns: 1fr;
    }
}

.game-stats-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 138, 103, 0.3), transparent);
    margin: 0.5rem 0;
}

.stat-card {
    /* Flexible dimensions */
    min-width: 140px;
    height: 95px;
    /* Allow cards to grow */
    flex-shrink: 0;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(148, 138, 103, 0.15);
    border-radius: 8px;
    display: flex;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    /* Enable container queries */
    container-type: inline-size;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    will-change: transform;
    transform: translateZ(0);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.stat-card:active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transform: translateY(0);
}

.stat-card__icon-wrapper {
    width: clamp(60px, 25%, 80px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0.8rem;
}

.stat-card__icon {
    width: clamp(24px, 8cqi, 48px);
    height: clamp(24px, 8cqi, 48px);
    color: #ffffff;
    font-size: clamp(24px, 8cqi, 48px);
}

.stat-card__data {
    flex: 1;
    align-self: center;
    padding: 0 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Allow text to shrink */
    overflow: hidden; /* Prevent text overflow */
}

.stat-card__header {
    margin: 0;
    color: #948a67;
    font-size: clamp(1.1rem, 12cqi, 2.2rem);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 10px rgba(148, 138, 103, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-card__subheader {
    margin: 2px 0 0 0;
    color: #948a67;
    font-size: clamp(0.7rem, 6cqi, 1.2rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Tablet-specific text handling */
@media (min-width: 481px) and (max-width: 1024px) {
    .stat-card__data {
        padding: 0.25rem 0.5rem;
    }

    .stat-card__header {
        font-size: clamp(1rem, 3.5vw, 1.6rem) !important;
        white-space: nowrap;
    }

    .stat-card__subheader {
        font-size: clamp(0.65rem, 2vw, 0.95rem) !important;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.1;
    }

    .stat-card {
        min-height: 85px;
        padding: 0.5rem;
    }

    .stat-card__icon-wrapper {
        width: clamp(55px, 20%, 70px);
        margin-right: 0.5rem;
    }

    .stat-card__icon {
        font-size: clamp(20px, 6cqi, 38px) !important;
    }
}

/* Mobile-specific text handling */
@media (max-width: 480px) {
    .stat-card__header {
        font-size: clamp(1rem, 5vw, 1.3rem) !important;
    }

    .stat-card__subheader {
        font-size: clamp(0.6rem, 3vw, 0.75rem) !important;
    }

    .stat-card {
        min-height: 75px;
        padding: 0.4rem;
    }
}

/* Tactical theme colors - Transparent with accent borders */
.stat-card--bg-tactical-gold {
    background: rgba(148, 138, 103, 0.15);
    border-color: rgba(148, 138, 103, 0.4);
}

.stat-card--bg-tactical-green {
    background: rgba(90, 107, 58, 0.15);
    border-color: rgba(90, 107, 58, 0.4);
}

.stat-card--bg-tactical-blue {
    background: rgba(58, 79, 90, 0.15);
    border-color: rgba(58, 79, 90, 0.4);
}

.stat-card--bg-tactical-orange {
    background: rgba(166, 124, 82, 0.15);
    border-color: rgba(166, 124, 82, 0.4);
}

.stat-card--bg-tactical-red {
    background: rgba(139, 76, 66, 0.15);
    border-color: rgba(139, 76, 66, 0.4);
}

.stat-card--bg-tactical-purple {
    background: rgba(107, 76, 139, 0.15);
    border-color: rgba(107, 76, 139, 0.4);
}

/* Darker icon wrapper backgrounds */
.stat-card--bg-dark-tactical-gold {
    background: rgba(122, 112, 80, 0.6);
}

.stat-card--bg-dark-tactical-green {
    background: rgba(71, 85, 48, 0.6);
}

.stat-card--bg-dark-tactical-blue {
    background: rgba(48, 64, 71, 0.6);
}

.stat-card--bg-dark-tactical-orange {
    background: rgba(139, 100, 66, 0.6);
}

.stat-card--bg-dark-tactical-red {
    background: rgba(115, 64, 53, 0.6);
}

.stat-card--bg-dark-tactical-purple {
    background: rgba(87, 64, 115, 0.6);
}

.stat-card--color-white {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.stat-card--color-tactical-gold {
    color: #c9b037 !important;
    text-shadow: 0 0 8px rgba(201, 176, 55, 0.4);
}

.stat-card--color-tactical-blue {
    color: #5bc0eb !important;
    text-shadow: 0 0 8px rgba(91, 192, 235, 0.4);
}

.stat-card--color-tactical-green {
    color: #27ae60 !important;
    text-shadow: 0 0 8px rgba(39, 174, 96, 0.4);
}

.stat-card--color-tactical-red {
    color: #e74c3c !important;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
}

.stat-card--color-tactical-orange {
    color: #f39c12 !important;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.4);
}

.stat-card--has-text-right {
    text-align: right;
}

/* Removed icon-right functionality - all icons are now left-aligned */

.right-panel .chart-header h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Barlow', sans-serif;
    margin: 0;
}


.stats-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(148, 138, 103, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 120px;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

.stats-icon {
    margin-bottom: 1rem;
}

.stats-icon i {
    font-size: 3.5rem;
    color: #948a67;
    text-shadow: 0 0 20px rgba(148, 138, 103, 0.5);
    animation: iconGlow 3s ease-in-out infinite alternate;
}

@keyframes iconGlow {
    from { 
        color: #948a67; 
        text-shadow: 0 0 20px rgba(148, 138, 103, 0.5);
    }
    to { 
        color: #ffffff; 
        text-shadow: 0 0 30px rgba(148, 138, 103, 0.8);
    }
}

/* ENHANCED LARGE DISPLAY TEXT SCALING */
.stats-number {
    font-size: clamp(3rem, 12vw, 12rem);
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    margin-bottom: 0.8rem;
    font-family: 'Barlow', sans-serif;
    animation: numberPulse 2s ease-in-out infinite alternate;
    line-height: 0.9;
    /* Add text stroke for better visibility */
    -webkit-text-stroke: 2px rgba(0, 0, 0, 0.3);
    text-stroke: 2px rgba(0, 0, 0, 0.3);
    word-break: break-all;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stats-number {
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    }
}

/* Animation for card removal */
.stat-card.removing {
    animation: cardRemove 0.3s ease forwards;
}

@keyframes cardRemove {
    to {
        opacity: 0;
        transform: scale(0.8);
        width: 0;
        margin: 0;
        padding: 0;
    }
}

@keyframes numberPulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.stats-label {
    font-size: 1.6rem;
    font-weight: 700;
    color: #948a67;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Barlow', sans-serif;
    text-shadow: 0 0 10px rgba(148, 138, 103, 0.3);
    line-height: 1.2;
}

.chart-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(148, 138, 103, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, height 0.3s ease; /* Add height transition */
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

.chart-header {
    text-align: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Ensure chart controls stay compact */
.chart-controls {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

/* Graph tabs should stay compact */
.graph-tabs {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chart-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Barlow', sans-serif;
    margin: 0;
}

.weekly-chart-container,
.chart-container {
    flex: 1;
    position: relative;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.chart-container iframe,
.chart-container .grafana-chart {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    transition: transform 0.3s ease;
}

.weekly-chart-container canvas,
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.weekly-chart-container .grafana-chart,
.chart-container .grafana-chart {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}

@media (min-width: 481px) and (max-width: 1024px) {
    .chart-container {
        min-height: 350px !important;
        height: 350px !important;
        max-height: 500px;
        overflow: hidden;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .chart-container iframe,
    .chart-container .grafana-chart {
        width: 100% !important;
        height: 100% !important;
        min-height: 350px !important;
        border: none;
        display: block;
        flex: 1;
    }

    .chart-card {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        min-height: 450px !important;
        height: auto !important;
    }

    .chart-header {
        flex-shrink: 0;
    }

    .right-panel {
        min-height: 500px !important;
    }
}

@media (max-width: 480px) {
    .chart-container {
        min-height: 250px !important;
        height: 250px !important;
        max-height: 350px;
        overflow: hidden;
    }

    .chart-container iframe,
    .chart-container .grafana-chart {
        width: 100% !important;
        height: 100% !important;
        min-height: 250px !important;
        border: none;
        display: block;
    }
}

.total-players-ring {
    stroke-dasharray: 0 1256;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: center;
    opacity: 1;
    transition: stroke-dasharray 2s ease-in-out;
}

.total-players-track {
    opacity: 0;
    animation: fadeInTrack 1s ease 0.5s forwards;
}

.total-players-title, .total-players-subtitle, .total-players-value {
    opacity: 0;
    animation: fadeInLabels 1s ease 1.5s forwards;
}

.stats-base {
    opacity: 0;
    animation: fadeInBase 1s ease 0.5s forwards;
}

.stats-track {
    opacity: 0;
    animation: fadeInTrack 1s ease 1s forwards;
}

.stats-ring {
    transform: rotate(-90deg);
    transform-origin: center;
    opacity: 0;
}

.stats-labels {
    opacity: 0;
    animation: fadeInLabels 0.8s ease 1.4s forwards;
}

.stats-labels text {
    opacity: 0;
    animation: fadeInLabels 0.8s ease 1.4s forwards;
}

.stats-center-title, .stats-center-subtitle {
    opacity: 0;
    animation: fadeInCenter 1s ease 2s forwards;
}

.stats-center-total {
    opacity: 0;
    animation: fadeInTotal 1s ease 2.5s forwards;
}

@keyframes fadeInBase {
    to { opacity: 0.2; }
}

@keyframes fadeInTrack {
    to { opacity: 0.3; }
}

@keyframes drawRing {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeInLabels {
    to { opacity: 1; }
}

@keyframes fadeInCenter {
    to { opacity: 1; }
}

@keyframes fadeInTotal {
    from { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes fadeInTotalPlayers {
    to { opacity: 1; }
}

@keyframes rotateTotalPlayers {
    from { 
        stroke-dasharray: 0 565;
    }
    to { 
        stroke-dasharray: 565 0;
    }
}


/* =================================================================
   TACTICAL PROGRESS CONTAINER - Loading Animation System
   ================================================================= */

/**
 * Main tactical progress container
 * Handles the overall loading animation layout and positioning
 */
.tactical-progress {
    grid-area: progress;
    /* Container dimensions and positioning */
    width: 100%;
    
    height: 0;
    padding: 0;
    /* Layout properties */
    position: relative;
    display: block;
    z-index: 10;
    
    /* Visual properties */
    background: transparent;
    overflow: visible;
    
    /* Performance hint for animations */
    will-change: transform;
}


/**
 * Loading information container
 * Contains the loading text positioned to the right above progress bar
 */
.tactical-progress .loading-info {
    /* Positioning - above progress bar */
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: auto;
    z-index: 150;

    /* Flexbox layout for compact right-aligned text */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0px;

    /* Layering above progress bar */
    z-index: 3;
}

/**
 * Loading status text
 * Styled for military/tactical theme consistency
 */
.tactical-progress .loading-text {
    /* Typography */
    font-size: 0.9rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;

    /* Visual styling */
    color: #948a67;
    text-align: right;
    text-shadow: 0 0 6px rgba(148, 138, 103, 0.3);
    white-space: nowrap;
}

/**
 * Animated dots after loading text
 * Provides visual feedback that system is active
 */
.tactical-progress .loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
    display: inline-block;
    width: 1.5em;
    text-align: left;
}

/* =================================================================
   PROGRESS BAR SYSTEM - Full-Width Loading Indicator
   ================================================================= */

/**
 * Main progress bar background
 * Spans full viewport width at bottom of screen
 */
.tactical-progress .progress-bar {
    /* Full-width positioning at bottom of screen */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 10px !important;

    /* Proper z-index layering */
    z-index: 10000 !important;

    /* Force visibility */
    visibility: visible !important;
    display: block !important;

    /* Visual styling - tactical theme */
    background: rgba(148, 138, 103, 0.2) !important;
    border-top: 2px solid rgba(148, 138, 103, 0.4) !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;

    /* Layout properties */
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;

    /* Performance optimizations */
    will-change: transform;
    contain: layout style paint;
}

/**
 * Animated progress fill
 * Uses transform scaling for GPU acceleration with delayed start
 */
.tactical-progress .progress-fill {
    /* Dimensions */
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;

    /* Positioning */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    /* Visual appearance */
    background: linear-gradient(90deg, #948a67, #c9c1a3) !important;
    border-radius: 0 !important;

    /* Force visibility */
    z-index: 50 !important;
    visibility: visible !important;
    display: block !important;

    /* Animation properties - handled by JavaScript */
    /* animation: progressLoadDelayed 60s linear infinite; */
    transform: scaleX(0);
    transform-origin: left center;

    /* Performance optimizations */
    will-change: transform, opacity;
    backface-visibility: hidden;
    box-sizing: border-box !important;
}

/**
 * Progress bar shine effect
 * Adds visual polish with moving highlight
 */
.tactical-progress .progress-fill::after {
    content: '';
    
    /* Positioning */
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    
    /* Visual effect */
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    
    /* Animation */
    animation: progressShine 1.8s ease-in-out infinite;
    
    /* Performance */
    will-change: transform, opacity;
}

@media (max-width: 1920px) {
    .logo h1 { font-size: 3.5rem; }
    .logo-image { max-height: 10.5rem; margin: 0 auto -0.8rem auto; }
    .logo p { font-size: 1.6rem; }
    .stat-title { font-size: 3rem; }
    .stat-value { font-size: 7rem; }
}

@media (max-width: 1366px) {
    .logo h1 { font-size: 3rem; }
    .logo-image { max-height: 9rem; margin: 0 auto -0.6rem auto; }
    .logo p { font-size: 1.4rem; }
    .stat-title { font-size: 2.5rem; }
    .stat-value { font-size: 6rem; }
    .chart-container { height: 400px; }
}

/* =================================================================
   TACTICAL PROGRESS ANIMATIONS - Performance Optimized
   ================================================================= */

/**
 * Removed - soldier no longer moves horizontally
 * Soldier now walks in place at center position
 */

/**
 * Progress bar fill - Synchronized movement with soldier
 * Fills at constant rate, soldier walks on leading edge
 */
@keyframes progressLoadSync {
    0% { 
        transform: scaleX(0);
        transform-origin: left center;
        opacity: 1;
    }
    85% { 
        transform: scaleX(0.85);
        transform-origin: left center;
        opacity: 1;
    }
    90% { 
        transform: scaleX(1);
        transform-origin: left center;
        opacity: 1;
    }
    95% { 
        transform: scaleX(1);
        transform-origin: left center;
        opacity: 0.3;
    }
    100% { 
        transform: scaleX(0);
        transform-origin: left center;
        opacity: 0;
    }
}

/**
 * Progress bar animation - Simple loading indicator
 * Fills completely, fades out, then restarts cycle
 */
@keyframes progressLoadDelayed {
    0% { 
        transform: scaleX(0);
        transform-origin: left center;
        opacity: 1;
    }
    90% { 
        transform: scaleX(1);
        transform-origin: left center;
        opacity: 1;
    }
    95% { 
        transform: scaleX(1);
        transform-origin: left center;
        opacity: 0.3;
    }
    100% { 
        transform: scaleX(0);
        transform-origin: left center;
        opacity: 0;
    }
}

/**
 * Progress bar shine effect - GPU accelerated
 * Uses transform instead of position changes
 */
@keyframes progressShine {
    0% { 
        transform: translateX(-100%) translateZ(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% { 
        transform: translateX(200%) translateZ(0);
        opacity: 0;
    }
}

/**
 * Loading text dots animation - Content changes for visual feedback
 * Minimal performance impact as it only affects pseudo-element content
 */
@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* =================================================================
   RESPONSIVE DESIGN - Mobile and Tablet Optimizations
   ================================================================= */

/**
 * Mobile devices - Smaller screens require scaled elements
 * Maintains visual proportions while reducing resource usage
 */
@media (max-width: 480px) {
    .tactical-progress {
        height: 100px;
        padding: 10px 0;
    }

    /* Adjusted typography for mobile readability */
    .tactical-progress .loading-text {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    /* Thinner progress bar for mobile */
    .tactical-progress .progress-bar {
        height: 6px;
    }
    
    /* Tighter spacing for mobile layout */
    .tactical-progress .loading-info {
        gap: 0px;
        bottom: 6px;
        right: 15px;
    }
    
    /* Smaller shine effect for performance */
    .tactical-progress .progress-fill::after {
        width: 40px;
    }
}


/* Settings Cog and Panel Styles */
.settings-cog {
    position: fixed;
    top: 20px; /* Move to top right */
    right: 20px;
    width: 28px;
    height: 28px;
    background: rgba(148, 138, 103, 0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid rgba(148, 138, 103, 0.2);
    backdrop-filter: blur(10px);
}

.settings-cog:hover {
    background: rgba(148, 138, 103, 0.25);
    transform: rotate(45deg);
    border-color: rgba(148, 138, 103, 0.4);
}

.settings-cog i {
    color: rgba(148, 138, 103, 0.8);
    font-size: 14px;
    transition: color 0.3s ease;
}

.settings-cog:hover i {
    color: rgba(148, 138, 103, 1);
}

.settings-panel {
    position: fixed;
    top: 55px; /* Below the settings cog */
    right: 20px;
    width: 280px;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(148, 138, 103, 0.3);
    border-radius: 8px;
    z-index: 999;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.settings-panel.show {
    display: block;
    animation: settingsSlideIn 0.3s ease;
}

@keyframes settingsSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(148, 138, 103, 0.3);
}

.settings-header h3 {
    color: #948a67;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.settings-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.settings-close:hover {
    color: #948a67;
}

.settings-content {
    padding: 15px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

/* Custom checkbox styling */
.setting-label input[type="checkbox"] {
    display: none; /* Hide default checkbox */
}

.setting-label {
    position: relative;
    padding-left: 35px; /* Space for custom checkbox */
}

.setting-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: rgba(148, 138, 103, 0.1);
    border: 2px solid rgba(148, 138, 103, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.setting-label:hover::before {
    border-color: rgba(148, 138, 103, 0.5);
    background: rgba(148, 138, 103, 0.15);
}


/* Checked state classes added via JavaScript */
.setting-label.checked::before {
    background: rgba(148, 138, 103, 0.8);
    border-color: #948a67;
}

.setting-label::after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #1a1a1a;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.setting-label.checked::after {
    opacity: 1;
}

.setting-text {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

/* =================================================================
   CONNECTION STATUS INDICATOR
================================================================= */

.connection-status {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(148, 138, 103, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    font-size: 0.85rem;
    color: #ffffff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.connection-status i {
    font-size: 0.6rem;
    animation: pulse 2s infinite;
}

.connection-status.connected {
    border-color: rgba(39, 174, 96, 0.5);
}

.connection-status.connected i {
    color: #27ae60;
}

.connection-status.disconnected {
    border-color: rgba(231, 76, 60, 0.5);
}

.connection-status.disconnected i {
    color: #e74c3c;
    animation: none;
}

.connection-status.reconnecting {
    border-color: rgba(243, 156, 18, 0.5);
}

.connection-status.reconnecting i {
    color: #f39c12;
    animation: spin 1s infinite linear;
}

.connection-status.error {
    border-color: rgba(231, 76, 60, 0.7);
    background: rgba(231, 76, 60, 0.1);
}

.connection-status.error i {
    color: #e74c3c;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mobile-message {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(148, 138, 103, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.mobile-message i {
    font-size: 3rem;
    color: rgba(148, 138, 103, 0.7);
    margin-bottom: 1rem;
    display: block;
}

.mobile-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #948a67;
    margin-bottom: 1rem;
}

.mobile-message p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.mobile-message .mobile-hint {
    font-size: 0.8rem;
    color: rgba(148, 138, 103, 0.5);
    font-style: italic;
}

@media (max-width: 767px) {
    .mobile-message {
        display: block !important;
    }
    
    .chart-card {
        display: none !important;
    }
}

/* Connection error banner */
.connection-error {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 15px;
    text-align: center;
    z-index: 100000;
    animation: slideDown 0.3s ease;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.error-content button {
    background: white;
    color: #e74c3c;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.error-content button:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* New Graph Tab System Styles */


/* Game Stats Arc Visualization */
.game-stats-arc-container {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.game-stats-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(148, 138, 103, 0.3));
}

.stats-ring {
    transform-origin: center;
    transition: all 0.3s ease;
}

.stats-labels text {
    transition: all 0.3s ease;
}

.chart-container-relative {
    position: relative;
}

/* ================================================================
   MOBILE-FRIENDLY IMPROVEMENTS
   ================================================================ */

/* Settings Panel Mobile Optimization */
@media (max-width: 480px) {
    .settings-cog {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        z-index: 10000;
    }

    .settings-cog i {
        font-size: 18px;
    }

    .settings-panel {
        top: 50px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
    }

    .setting-text {
        font-size: 0.85rem;
    }

    /* Make stats cards stack better on mobile */
    .stats-section-title h2 {
        font-size: 0.9rem !important;
    }

    /* Ensure text doesn't overflow on small screens */
    .stat-card__subheader {
        font-size: 0.6rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Better spacing for mobile */
    .stats-cards-grid {
        gap: 0.5rem !important;
    }

    .platform-section,
    .game-stats-section {
        gap: 0.5rem !important;
    }
}

/* Tablet optimizations */
@media (min-width: 481px) and (max-width: 1024px) {
    .settings-cog {
        width: 32px;
        height: 32px;
    }

    .settings-panel {
        width: 260px;
    }
}

/* Touch device general improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch target for settings cog */
    .settings-cog {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects that don't work on touch */
    .settings-cog:hover {
        transform: none;
    }

    /* Better tap feedback */
    .settings-cog:active {
        transform: scale(0.95);
        background: rgba(148, 138, 103, 0.3);
    }

    .settings-close:active {
        transform: scale(0.95);
    }

    /* Prevent text selection on interactive elements */
    .stat-card,
    .settings-cog,
    .settings-panel {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    /* Improve scrolling on mobile */
    .dashboard,
    .stats-cards-container,
    .settings-panel {
        -webkit-overflow-scrolling: touch;
    }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10000;
    pointer-events: none;
}

footer .tactical-progress {
    height: auto;
    pointer-events: auto;
}
