/* ============================================
   MODERN DESIGN SYSTEM - COMPLETE REDESIGN
   ============================================ */

/* CSS Variables - Enhanced Color Palette */
:root {
    /* Primary Colors */
    --primary-cyan: #00EA6B;
    --primary-cyan-light: #33FF8F;
    --primary-cyan-dark: #00B855;
    --primary-white: #ffffff;
    --primary-black: #000000;
    
    /* Background Colors */
    --bg-dark: #0B0C0C;
    --bg-darker: #0B0C0C;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(0, 234, 107, 0.08);
    --bg-header: rgba(11, 12, 12, 0.98);
    --bg-gradient: linear-gradient(135deg, #0B0C0C 0%, #0B0C0C 25%, #0B0C0C 50%, #0B0C0C 75%, #0B0C0C 100%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-accent: #00EA6B;
    
    /* Border Colors */
    --border-default: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 234, 107, 0.4);
    --border-glow: rgba(0, 234, 107, 0.6);
    
    /* Shadow Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 234, 107, 0.4);
    --shadow-glow-strong: 0 0 40px rgba(0, 234, 107, 0.6);
    --shadow-card: 0 8px 32px rgba(0, 234, 107, 0.1);
    --shadow-card-hover: 0 12px 48px rgba(0, 234, 107, 0.2);
    
    /* Spacing Scale */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'Courier New', 'Monaco', 'Menlo', monospace;
    
    --font-xs: 11px;
    --font-sm: 13px;
    --font-base: 16px;
    --font-lg: 18px;
    --font-xl: 22px;
    --font-2xl: 28px;
    --font-3xl: 36px;
    --font-4xl: 48px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Z-index Layers */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-header: 1000;
    --z-modal: 2000;
    --z-tooltip: 3000;
    
    /* Layout */
    --container-max: 1400px;
    --header-height: 80px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    padding: var(--space-md);
    padding-top: calc(var(--header-height) + var(--space-md));
    color: var(--text-primary);
    line-height: 1.7;
    font-size: var(--font-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    word-wrap: break-word;
    overflow-x: hidden;
    position: relative;
}

/* Unified font size for all elements except footer and headings */
body *:not(.site-footer *):not(.site-footer):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    font-size: var(--font-base) !important;
}

/* Ensure specific elements also use base font size */
p, span, div, a, li, td, th, label, input, button, select, textarea, .stat-name, .stat-count, .info-card p, .info-card .value, .visitor-ip, .country-flag, .search-input, .search-button, .search-btn, .btn, .badge, code, pre {
    font-size: var(--font-base) !important;
}


/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(28px, 5vw, 48px);
    color: var(--text-primary);
}

h2 {
    font-size: clamp(22px, 4vw, 32px);
    color: var(--text-accent);
    text-shadow: 0 0 20px rgba(0, 234, 107, 0.6);
}

h3 {
    font-size: clamp(18px, 3vw, 24px);
}

h4 {
    font-size: clamp(16px, 2.5vw, 20px);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

a {
    color: var(--text-accent);
    text-decoration: none;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: var(--bg-header);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    width: 100%;
    padding: 0 var(--space-md);
    border-bottom: 1px solid var(--border-default);
    height: var(--header-height);
}


.main-nav {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    width: 100%;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: var(--space-xs) 0;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
}

.logo-link:hover {
    transform: translateY(-1px);
}

.site-logo {
    height: 50px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    position: relative;
    display: block;
    transition: all var(--transition-base);
}

.site-logo:hover {
    transform: scale(1.02);
    opacity: 0.9;
}


.logo-link span {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 234, 107, 0.1);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    color: var(--text-accent);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 234, 107, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-md);
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-base);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu a:hover {
    color: var(--text-accent);
}

.visitor-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(0, 234, 107, 0.08);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-base);
    border: 1px solid var(--border-accent);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.country-flag {
    font-size: var(--font-base) !important;
    line-height: 1;
}

.visitor-ip {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--font-base) !important;
}

/* ============================================
   CONTAINERS & LAYOUT
   ============================================ */
.container,
.stats-container {
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-default);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-xl);
    position: relative;
}


.page-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-default);
    position: relative;
}


.page-header h1 {
    margin-bottom: var(--space-sm);
}

.page-header p {
    font-size: var(--font-base) !important;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   CARDS & COMPONENTS
   ============================================ */
.info-section {
    padding: var(--space-lg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.info-card {
    background: rgba(255, 255, 255, 0.02);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}


.info-card h3 {
    color: var(--text-accent);
    font-size: var(--font-base);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.info-card p {
    color: var(--text-primary);
    font-size: var(--font-base);
    font-weight: 600;
    margin: 0;
}

.stats-card {
    background: rgba(0, 234, 107, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-glow);
    border: 2px solid var(--border-accent);
    min-height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}


.stats-card h2 {
    font-size: var(--font-2xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--border-accent);
    color: var(--text-accent);
    text-shadow: 0 0 15px rgba(0, 234, 107, 0.5);
    flex-shrink: 0;
    text-align: center;
}

.stats-card h2 a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

.stats-card h2 a:hover {
    color: var(--primary-cyan-light);
}

.stats-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    overflow: hidden;
    justify-items: stretch;
    justify-content: start;
    direction: ltr;
}

.stats-card .stats-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    justify-items: stretch;
    justify-content: start;
    direction: ltr;
}

.stat-item-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    min-height: 52px;
    max-height: 52px;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


.stat-item-simple .stat-name {
    color: var(--text-primary);
    font-size: var(--font-base);
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 90px);
    min-width: 0;
    display: block;
}

.stat-item-simple .stat-count {
    color: var(--text-accent);
    font-size: var(--font-base);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 234, 107, 0.6);
    min-width: 70px;
    text-align: right;
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ============================================
   BUTTONS & FORMS
   ============================================ */
.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    background: rgba(0, 234, 107, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: 1px solid var(--border-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--font-base);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-cyan-light) 100%);
    color: var(--primary-black);
    border: none;
    box-shadow: var(--shadow-glow);
}

.search-form {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.search-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: var(--font-base);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    font-family: var(--font-family);
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
    background: rgba(0, 0, 0, 0.6);
}

.search-button,
.search-btn {
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-cyan-light) 100%);
    color: var(--primary-black);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-base);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   MAP & VISUALIZATION
   ============================================ */
.map-section {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
}

.map-section h3 {
    color: var(--text-accent);
    margin-bottom: var(--space-md);
    text-shadow: 0 0 15px rgba(0, 234, 107, 0.5);
    font-size: var(--font-lg);
}

.map-container {
    margin-top: var(--space-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-accent);
}

.map-container #visitor-map,
.map-container #map,
#visitor-map, #map {
    height: 400px;
    width: 100%;
    border-radius: var(--radius-lg);
    background: var(--bg-dark);
}

/* ============================================
   STATISTICS GRID - ENHANCED DESIGN
   ============================================ */

/* Overview Cards Grid */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-overview-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-cyan);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.stat-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.stat-overview-card:hover::before {
    transform: scaleX(1);
}

.stat-overview-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
    filter: grayscale(0.3);
    transition: all var(--transition-base);
}

.stat-overview-card:hover .stat-overview-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.stat-overview-content {
    flex: 1;
}

.stat-overview-content h3 {
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 var(--space-xs) 0;
}

.stat-overview-number {
    color: var(--text-primary);
    font-size: var(--font-2xl);
    font-weight: 700;
    font-family: var(--font-mono);
    margin: 0;
    line-height: 1.2;
}

.stat-overview-sub {
    color: var(--text-muted);
    font-size: var(--font-xs);
    display: block;
    margin-top: var(--space-xs);
}

/* Card Color Variants */
.stat-card-primary {
    background: linear-gradient(135deg, rgba(0, 234, 107, 0.08) 0%, rgba(0, 234, 107, 0.03) 100%);
    border-color: rgba(0, 234, 107, 0.2);
}

.stat-card-primary::before {
    background: var(--primary-cyan);
}

.stat-card-secondary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.stat-card-secondary::before {
    background: #3b82f6;
}

.stat-card-accent {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(168, 85, 247, 0.03) 100%);
    border-color: rgba(168, 85, 247, 0.2);
}

.stat-card-accent::before {
    background: #a855f7;
}

.stat-card-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.03) 100%);
    border-color: rgba(14, 165, 233, 0.2);
}

.stat-card-info::before {
    background: #0ea5e9;
}

.stat-card-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.stat-card-success::before {
    background: #22c55e;
}

.stat-card-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.03) 100%);
    border-color: rgba(251, 191, 36, 0.2);
}

.stat-card-warning::before {
    background: #fbbf24;
}

.stat-card-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.stat-card-danger::before {
    background: #ef4444;
}

.stat-card-gradient {
    background: linear-gradient(135deg, rgba(0, 234, 107, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: rgba(0, 234, 107, 0.3);
}

.stat-card-gradient::before {
    background: linear-gradient(90deg, var(--primary-cyan), #a855f7);
}

/* Enhanced Stats Card */
.enhanced-stats-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-default);
    transition: all var(--transition-base);
}

.enhanced-stats-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-card-hover);
}

/* Enhanced Stat Item */
.stat-item-enhanced {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    min-height: 60px;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
    width: 100%;
    transition: all var(--transition-base);
}

.stat-item-enhanced:hover {
    background: rgba(0, 234, 107, 0.05);
    border-color: var(--border-accent);
    transform: translateX(4px);
}

.stat-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 234, 107, 0.15);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    color: var(--text-accent);
    font-weight: 700;
    font-size: var(--font-sm);
    flex-shrink: 0;
}

.stat-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-xs);
}

.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-cyan-light));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    box-shadow: 0 0 8px rgba(0, 234, 107, 0.5);
}

/* ============================================
   STATISTICS GRID
   ============================================ */
.stats-total-section {
    margin-bottom: var(--space-xl);
}

.stats-total-section .stats-card {
    background: rgba(0, 234, 107, 0.05);
    border: 2px solid var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.stats-vertical-list .stats-total-section .stats-card {
    background: rgba(0, 234, 107, 0.05);
    border: 2px solid var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.stats-vertical-list .stats-card {
    background: rgba(0, 234, 107, 0.05);
    border: 2px solid var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.stats-vertical-list .stats-card h2 {
    font-size: var(--font-2xl);
    text-align: center;
    border-bottom: 2px solid var(--border-accent);
}

.stats-total-section .stats-card h2 {
    font-size: var(--font-2xl);
    text-align: center;
    border-bottom: 2px solid var(--border-accent);
}

.stats-total-section .stats-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    justify-items: stretch;
    justify-content: start;
    width: 100%;
    direction: ltr;
}

.stats-total-section .stats-list .stat-item-simple {
    max-width: 100%;
}

.stats-vertical-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-top: var(--space-md);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.stats-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}


.stat-item-simple-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   CONTENT PAGES
   ============================================ */
.content-container {
    max-width: 900px;
    margin: var(--space-xl) auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-default);
}

.content-container h1 {
    color: var(--text-accent);
    margin-bottom: var(--space-lg);
}

.content-container h2 {
    color: var(--text-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.content-container p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-item {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-default);
}

.contact-item h3 {
    color: var(--text-accent);
    margin-bottom: var(--space-sm);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    color: var(--text-primary);
    margin-top: var(--space-2xl);
    padding: var(--space-2xl) var(--space-md) var(--space-lg);
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    margin-bottom: calc(-1 * var(--space-md));
    border-top: 1px solid var(--border-default);
    position: relative;
}


.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h3 {
    color: var(--text-accent);
    margin-bottom: var(--space-md);
    font-size: var(--font-lg);
    text-shadow: 0 0 10px rgba(0, 234, 107, 0.5);
}
/* Footer font sizes are intentionally left as they are - user requested to keep footer unchanged */

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--font-sm);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--text-accent);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.social-links a {
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

.social-links a:hover {
    color: var(--text-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-default);
    color: var(--text-muted);
    font-size: var(--font-xs);
}

/* ============================================
   UTILITIES
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-base) !important;
    font-weight: 600;
    background: rgba(0, 234, 107, 0.15);
    color: var(--text-accent);
    border: 1px solid var(--border-accent);
    box-shadow: 0 0 10px rgba(0, 234, 107, 0.2);
}

.badge-country {
    background: rgba(0, 234, 107, 0.1);
    color: var(--text-accent);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-base) !important;
    border: 1px solid var(--border-accent);
}

.error-message {
    background: rgba(255, 0, 0, 0.15);
    color: #ff6b6b;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
    text-align: center;
    border: 1px solid rgba(255, 107, 107, 0.5);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.no-data {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: var(--space-xl);
}

.breadcrumb {
    margin-bottom: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    font-size: var(--font-base) !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--text-accent);
}

.breadcrumb span {
    color: var(--text-muted);
    margin: 0 var(--space-xs);
}

.actions {
    text-align: center;
    margin: var(--space-xl) 0;
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
}

.pagination-btn {
    padding: var(--space-sm) var(--space-lg);
    background: rgba(0, 234, 107, 0.1);
    color: var(--text-accent);
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-accent);
    font-weight: 600;
}

.pagination-btn:hover {
    background: rgba(0, 234, 107, 0.2);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: var(--font-base);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    padding: var(--space-lg);
    -webkit-overflow-scrolling: touch;
    margin: 0 auto;
    width: 50%;
    max-width: 50%;
}

.viewer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-md);
    min-width: 400px;
    max-width: 100%;
}

.viewer-table thead {
    background: rgba(0, 234, 107, 0.1);
}

.viewer-table th {
    background: transparent;
    color: var(--text-accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--font-base) !important;
    letter-spacing: 1.5px;
    padding: var(--space-md);
    text-align: left;
    border-bottom: 2px solid var(--border-accent);
    position: sticky;
    top: 0;
    z-index: 10;
}

.viewer-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-default);
    color: var(--text-secondary);
}

.viewer-table tr:hover {
    background: rgba(0, 234, 107, 0.05);
}

.map-link {
    color: var(--text-accent);
}

.map-link:hover {
    text-decoration: underline;
}

/* ============================================
   CODE & PRE
   ============================================ */
code {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    color: var(--text-accent);
    border: 1px solid var(--border-accent);
    font-size: var(--font-base) !important;
    box-shadow: 0 0 10px rgba(0, 234, 107, 0.2);
}

pre {
    background: rgba(0, 0, 0, 0.5);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-sm);
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-cyan), rgba(0, 234, 107, 0.5));
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 234, 107, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-cyan-light), var(--primary-cyan));
    box-shadow: 0 0 15px rgba(0, 234, 107, 0.8);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: rgba(0, 234, 107, 0.3);
    color: var(--primary-white);
    text-shadow: 0 0 10px rgba(0, 234, 107, 0.8);
}

::-moz-selection {
    background: rgba(0, 234, 107, 0.3);
    color: var(--primary-white);
    text-shadow: 0 0 10px rgba(0, 234, 107, 0.8);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large screens */
@media (min-width: 1400px) {
    .container,
    .stats-container {
        max-width: var(--container-max);
    }
    
    .table-wrapper {
        width: 50%;
        max-width: 50%;
    }
}

/* Medium screens */
@media (min-width: 769px) and (max-width: 1399px) {
    .table-wrapper {
        width: 50%;
        max-width: 50%;
    }
}

/* Tablets (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 769px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-container {
        gap: var(--space-md);
    }
    
    .stats-total-section .stats-list,
    .stats-list,
    .stats-card .stats-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Landscape (481px - 768px) */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    body {
        padding: var(--space-sm);
        padding-top: calc(var(--header-height) + var(--space-sm));
        font-size: var(--font-sm);
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .site-header {
        padding: 0 var(--space-sm);
        height: auto;
        min-height: var(--header-height);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: var(--z-header);
        width: 100%;
    }
    
    .nav-container {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm) 0;
        width: 100%;
    }
    
    .logo-section {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .site-logo {
        height: 40px;
        max-width: 100%;
    }
    
    .nav-menu {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-xs);
        font-size: var(--font-xs);
    }
    
    .nav-menu li {
        flex: 0 1 auto;
    }
    
    .nav-menu a {
        padding: var(--space-xs) var(--space-sm);
        font-size: 11px;
        white-space: nowrap;
    }
    
    .visitor-info {
        order: 3;
        width: 100%;
        justify-content: center;
        font-size: 10px;
        padding: var(--space-xs) var(--space-sm);
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    
    .container,
    .stats-container {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-md);
    }
    
    .page-header {
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-md);
    }
    
    .page-header h1 {
        font-size: clamp(24px, 6vw, 32px);
    }
    
    .page-header p {
        font-size: var(--font-base);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        width: 100%;
    }
    
    .info-card {
        padding: var(--space-md);
        width: 100%;
        box-sizing: border-box;
    }
    
    .info-card h3 {
        font-size: var(--font-base);
    }
    
    .info-card p,
    .info-card .value {
        font-size: var(--font-sm);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        width: 100%;
    }
    
    .stats-total-section .stats-list,
    .stats-list,
    .stats-card .stats-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }
    
    .stats-card {
        padding: var(--space-md);
        min-height: auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .stats-card h2 {
        font-size: var(--font-lg);
        word-wrap: break-word;
    }
    
    .stat-item-simple {
        padding: var(--space-sm);
        min-height: 48px;
        max-height: none;
        width: 100%;
        box-sizing: border-box;
    }
    
    .stat-item-simple .stat-name {
        font-size: var(--font-sm);
        max-width: 100%;
    }
    
    .stat-item-simple .stat-count {
        font-size: var(--font-sm);
        min-width: auto;
    }
    
    .search-form {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .search-input {
        font-size: var(--font-sm);
        padding: var(--space-sm) var(--space-md);
    }
    
    .search-button,
    .search-btn {
        width: 100%;
        padding: var(--space-sm);
    }
    
    .map-container #visitor-map,
    .map-container #map,
    #visitor-map, #map {
        height: 300px;
    }
    
    .map-section {
        padding: var(--space-md);
        margin-top: var(--space-md);
    }
    
    .content-container {
        padding: var(--space-lg);
        margin: var(--space-md) auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .table-wrapper {
        padding: var(--space-sm);
        width: 50%;
        max-width: 50%;
    }
    
    .viewer-table {
        font-size: var(--font-xs);
        min-width: 300px;
    }
    
    .viewer-table th,
    .viewer-table td {
        padding: var(--space-xs);
        font-size: var(--font-xs);
    }
    
    .breadcrumb {
        padding: var(--space-sm);
        font-size: var(--font-xs);
    }
    
    .actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .pagination {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .stats-total-section .stats-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-card .stats-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: Statistics Overview Grid */
@media (max-width: 768px) {
    .stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .stat-overview-card {
        padding: var(--space-md);
    }
    
    .stat-overview-icon {
        font-size: 36px;
    }
    
    .stat-overview-number {
        font-size: var(--font-xl);
    }
}

@media (max-width: 480px) {
    .stats-overview-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item-enhanced {
        padding: var(--space-sm);
        min-height: 52px;
    }
    
    .stat-rank {
        width: 28px;
        height: 28px;
        font-size: var(--font-xs);
    }
}

/* Mobile Portrait (up to 480px) */
@media (max-width: 480px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        padding: var(--space-xs);
        padding-top: calc(var(--header-height) + var(--space-xs));
        font-size: var(--font-sm);
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .container,
    .stats-container {
        padding: var(--space-sm);
        border-radius: var(--radius-md);
        width: 100%;
        box-sizing: border-box;
    }
    
    .page-header h1 {
        font-size: clamp(20px, 5vw, 24px);
        line-height: 1.3;
    }
    
    .page-header p {
        font-size: var(--font-sm);
        line-height: 1.5;
    }
    
    .info-grid {
        gap: var(--space-xs);
    }
    
    .info-card {
        padding: var(--space-sm);
    }
    
    .stats-card {
        padding: var(--space-sm);
        width: 100%;
    }
    
    .stats-card h2 {
        font-size: var(--font-base);
        line-height: 1.4;
    }
    
    .stats-total-section .stats-list,
    .stats-list,
    .stats-card .stats-list {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }
    
    .stat-item-simple {
        padding: var(--space-xs) var(--space-sm);
        min-height: 44px;
        max-height: none;
        width: 100%;
    }
    
    .stat-item-simple .stat-name {
        font-size: var(--font-xs);
        max-width: calc(100% - 60px);
    }
    
    .stat-item-simple .stat-count {
        font-size: var(--font-xs);
        min-width: 50px;
    }
    
    .site-logo {
        height: 35px;
        max-width: 100%;
    }
    
    .nav-menu {
        font-size: 9px;
        gap: 4px;
    }
    
    .nav-menu a {
        font-size: 10px;
        padding: 6px 8px;
        white-space: nowrap;
    }
    
    .visitor-info {
        font-size: 9px;
        padding: 4px 8px;
        flex-wrap: wrap;
    }
    
    .map-container #visitor-map,
    .map-container #map,
    #visitor-map, #map {
        height: 250px;
    }
    
    .table-wrapper {
        width: 90%;
        max-width: 90%;
    }
    
    .viewer-table {
        min-width: 250px;
        font-size: 10px;
    }
    
    .viewer-table th,
    .viewer-table td {
        padding: 6px 4px;
    }
}

/* Very small screens (up to 360px) */
@media (max-width: 360px) {
    body {
        padding: 6px;
        padding-top: calc(var(--header-height) + 6px);
    }
    
    .container,
    .stats-container {
        padding: var(--space-xs);
    }
    
    .page-header h1 {
        font-size: 20px;
    }
}

/* ============================================
   ACCESSIBILITY & SPECIAL MODES
   ============================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    body {
        background: var(--primary-black);
    }
    
    .info-card,
    .stats-card,
    .container {
        border: 2px solid var(--primary-white);
    }
    
    a {
        text-decoration: underline;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .actions,
    .pagination,
    .map-section {
        display: none;
    }
    
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    .container,
    .stats-container {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-top: 70px;
    }
    
    .site-header {
        padding: 4px var(--space-sm);
    }
    
    .nav-container {
        gap: var(--space-xs);
    }
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 3px;
    box-shadow: 0 0 15px rgba(0, 234, 107, 0.5);
    border-radius: var(--radius-sm);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

/* AdSense Compatibility */
.ad-container {
    margin: var(--space-xl) auto;
    text-align: center;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.leaderboard {
    min-height: 90px;
    max-width: 728px;
}

.ad-container.rectangle {
    min-height: 250px;
    max-width: 300px;
}

.ad-container.banner {
    min-height: 100px;
    max-width: 970px;
}

.ad-container.square {
    min-height: 250px;
    max-width: 250px;
}

.ad-spacing {
    margin: var(--space-xl) 0;
}

.content-wrapper {
    min-width: 300px;
    min-height: 250px;
}

/* Dark Mode Support (already dark, but ensure consistency) */
@media (prefers-color-scheme: dark) {
    /* Site is already optimized for dark mode */
}

/* Large Text Support */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
