
/* ============================================
    KALYAN CHART PROFESSIONAL DESIGN - ROOT
    ============================================ */
:root {
    --kcc-primary: #1a237e;
    --kcc-primary-dark: #0d145c;
    --kcc-red: #d32f2f;
    --kcc-red-dark: #b71c1c;
    --kcc-gold: #ffc107;
    --kcc-light: #f8f9fa;
    --kcc-gray: #757575;
    --kcc-success: #4caf50;
    --kcc-warning: #ff9800;
    --kcc-info: #2196f3;
    
    /* ENHANCED CHART COLORS for vibrancy (Used by Chart.js) */
    --kcc-chart-line: #00bcd4; /* Cyan/Aqua */
    --kcc-chart-bar-open: #ff9800; /* Orange */
    --kcc-chart-bar-close: #4caf50; /* Green */
    --kcc-chart-area: #9c27b0; /* Purple (for MA) */
    --kcc-chart-candle-up: #4caf50; /* Green */
    --kcc-chart-candle-down: #f44336; /* Red */
    
    --kcc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --kcc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --kcc-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
    --kcc-shadow-chart: 0 10px 40px rgba(33, 150, 243, 0.15);
    
    --kcc-radius-sm: 8px;
    --kcc-radius-md: 12px;
    --kcc-radius-lg: 16px;
    --kcc-radius-xl: 20px;
}

/* ============================================
    BASE RESET & UTILITIES
    ============================================ */
.kcc-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    padding-top: 80px;
}

.kcc-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.kcc-section {
    padding: 70px 0;
    position: relative;
}

.kcc-section.compact {
    padding: 30px 0; /* Space-saving */
}

.kcc-section.small {
    padding: 40px 0;
}

.kcc-h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kcc-h2 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--kcc-primary);
}

.kcc-h3 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--kcc-primary-dark);
}

.kcc-h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--kcc-primary-dark);
}

.kcc-p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--kcc-gray);
    margin-bottom: 20px;
}

/* ============================================
    HERO SECTION
    ============================================ */
.kcc-hero {
    padding: 100px 0 50px; /* Reduced bottom padding */
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-primary-dark) 100%);
    position: relative;
    overflow: hidden;
    margin-top: -80px;
}

.kcc-hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(211, 47, 47, 0.15) 0%, transparent 50%);
}

.kcc-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.kcc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--kcc-red) 0%, var(--kcc-red-dark) 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
    box-shadow: var(--kcc-shadow-md);
    animation: kcc-pulse 2s infinite;
}

@keyframes kcc-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.kcc-hero-badge i {
    font-size: 1.2rem;
}

.kcc-hero-title {
    color: white;
    font-size: 3rem; /* Reduced size */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px; /* Reduced margin */
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kcc-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem; /* Reduced size */
    line-height: 1.6;
    margin-bottom: 30px; /* Reduced margin */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.kcc-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Reduced gap */
    margin: 30px 0; /* Reduced margin */
}

.kcc-stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--kcc-radius-lg);
    padding: 20px 15px; /* Reduced padding */
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--kcc-shadow-sm);
}

.kcc-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--kcc-shadow-md);
    border-color: var(--kcc-gold);
}

.kcc-stat-icon {
    width: 50px; /* Reduced size */
    height: 50px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

.kcc-stat-number {
    display: block;
    font-size: 2.2rem; /* Reduced size */
    font-weight: 800;
    color: var(--kcc-primary);
    margin-bottom: 3px;
    line-height: 1;
}

.kcc-stat-label {
    font-size: 0.85rem;
    color: var(--kcc-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ============================================
    CHART NAVIGATION
    ============================================ */
.kcc-chart-nav-section {
    padding: 30px 0 20px; /* Reduced padding */
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0px; /* Reduced sticky header space */
    z-index: 100;
}

.kcc-chart-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Aligned to top for space saving */
    gap: 20px;
    flex-wrap: wrap;
}

.kcc-nav-title {
    flex: 1;
    min-width: 200px;
}

.kcc-time-filters {
    display: flex;
    gap: 8px; /* Reduced gap */
    flex-wrap: wrap;
}

.kcc-time-btn {
    padding: 10px 20px; /* Reduced padding */
    background: var(--kcc-light);
    border: 2px solid #e0e0e0;
    border-radius: var(--kcc-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--kcc-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.kcc-time-btn:hover {
    background: white;
    border-color: var(--kcc-primary);
    color: var(--kcc-primary);
    transform: translateY(-2px);
}

.kcc-time-btn.active {
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-primary-dark) 100%);
    border-color: transparent;
    color: white;
    box-shadow: var(--kcc-shadow-md);
}

.kcc-chart-types {
    display: flex;
    gap: 8px; /* Reduced gap */
    flex-wrap: wrap;
}

.kcc-chart-type-btn {
    width: 45px; /* Reduced size */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kcc-light);
    border: 2px solid #e0e0e0;
    border-radius: var(--kcc-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem; /* Reduced size */
    color: var(--kcc-gray);
}

.kcc-chart-type-btn:hover {
    background: white;
    border-color: var(--kcc-primary);
    color: var(--kcc-primary);
    transform: translateY(-2px);
}

.kcc-chart-type-btn.active {
    background: var(--kcc-primary);
    border-color: var(--kcc-primary);
    color: white;
    box-shadow: var(--kcc-shadow-sm);
}

/* ============================================
    MAIN CHART SECTION
    ============================================ */
.kcc-main-chart-section {
    padding: 30px 0 20px; /* Reduced padding */
}

.kcc-chart-container {
    background: white;
    border-radius: var(--kcc-radius-xl);
    padding: 25px; /* Reduced padding */
    box-shadow: var(--kcc-shadow-lg);
    border: 1px solid #e0e0e0;
    margin-bottom: 25px; /* Reduced margin */
}

.kcc-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* Reduced margin */
    flex-wrap: wrap;
    gap: 15px;
}

.kcc-chart-info {
    flex: 1;
    min-width: 300px;
}

.kcc-chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.kcc-chart-title .kcc-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--kcc-success) 0%, #2e7d32 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: kcc-pulse 2s infinite;
}

.kcc-chart-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kcc-chart-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kcc-light);
    border: 2px solid #e0e0e0;
    border-radius: var(--kcc-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--kcc-gray);
}

.kcc-chart-action-btn:hover {
    background: var(--kcc-primary);
    border-color: var(--kcc-primary);
    color: white;
    transform: translateY(-2px);
}

.kcc-chart-wrapper {
    position: relative;
    height: 400px; /* Reduced default height */
    width: 100%;
    margin-bottom: 20px;
}

.kcc-chart-canvas {
    width: 100% !important;
    height: 100% !important;
}

.kcc-chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.kcc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--kcc-gray);
}

.kcc-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* ============================================
    QUICK STATS GRID
    ============================================ */
.kcc-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Minimized cell width */
    gap: 15px; /* Reduced gap */
    margin-bottom: 25px;
}

.kcc-quick-stat {
    background: white;
    border-radius: var(--kcc-radius-lg);
    padding: 20px; /* Reduced padding */
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--kcc-shadow-sm);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.kcc-quick-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--kcc-shadow-md);
    border-color: var(--kcc-primary);
}

.kcc-quick-stat-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.kcc-quick-stat-content {
    flex: 1;
}

.kcc-quick-stat-value {
    display: block;
    font-size: 1.8rem; /* Reduced size */
    font-weight: 800;
    color: var(--kcc-primary);
    line-height: 1;
    margin-bottom: 3px;
}

.kcc-quick-stat-label {
    font-size: 0.85rem;
    color: var(--kcc-gray);
    font-weight: 500;
}

/* ============================================
    DATA TABLE SECTION
    ============================================ */
.kcc-data-section {
    padding: 20px 0; /* Reduced padding */
}

.kcc-data-container {
    background: white;
    border-radius: var(--kcc-radius-xl);
    padding: 25px; /* Reduced padding */
    box-shadow: var(--kcc-shadow-lg);
    border: 1px solid #e0e0e0;
}

.kcc-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.kcc-data-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kcc-data-table-wrapper {
    border-radius: var(--kcc-radius-lg);
    border: 1px solid #e0e0e0;
    overflow: auto;
    max-height: 400px; /* Reduced max height */
}

.kcc-data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Minimized width */
}

.kcc-data-table th {
    background: var(--kcc-light);
    padding: 12px 15px; /* Reduced padding */
    text-align: left;
    font-weight: 600;
    color: var(--kcc-primary);
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
}

.kcc-data-table th i {
    margin-left: 5px;
    font-size: 0.8em;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.kcc-data-table th.sort-asc i.fa-sort-up, .kcc-data-table th.sort-desc i.fa-sort-down { 
    opacity: 1; 
    color: var(--kcc-red);
}

.kcc-data-table td {
    padding: 10px 15px; /* Reduced padding */
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 0.9rem;
}

.kcc-data-table tbody tr:hover {
    background: #f9f9f9;
}

.kcc-number-cell {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kcc-primary);
}

.kcc-trend-up {
    color: var(--kcc-success);
    font-weight: 600;
}

.kcc-trend-down {
    color: var(--kcc-red);
    font-weight: 600;
}

.kcc-trend-neutral {
    color: var(--kcc-warning);
    font-weight: 600;
}

/* ============================================
    CHART INSIGHTS SECTION & TIPS
    ============================================ */
.kcc-insights-section {
    padding: 20px 0; /* Reduced padding */
}

.kcc-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Minimized cell width */
    gap: 20px;
}

.kcc-insight-card {
    background: white;
    border-radius: var(--kcc-radius-lg);
    padding: 25px; /* Reduced padding */
    box-shadow: var(--kcc-shadow-md);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.kcc-insight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--kcc-shadow-lg);
    border-color: var(--kcc-primary);
}

.kcc-insight-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.kcc-insight-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.kcc-insight-chart {
    height: 180px; /* Reduced height */
    width: 100%;
    margin: 15px 0;
}

/* ============================================
    FAQ Accordion Styling
    ============================================ */
.kcc-accordion .kcc-accordion-item {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: var(--kcc-radius-md);
    overflow: hidden;
}
.kcc-accordion .kcc-accordion-header {
    background-color: var(--kcc-light);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--kcc-primary);
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}
.kcc-accordion .kcc-accordion-header:hover {
    background-color: #f0f0f0;
}
.kcc-accordion .kcc-accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: white;
}
.kcc-accordion .kcc-accordion-content p {
    padding: 10px 0;
    margin-bottom: 0;
    font-size: 0.95rem;
}
.kcc-accordion .kcc-accordion-item.active .kcc-accordion-content {
    max-height: 500px; 
}
.kcc-accordion .kcc-accordion-item.active .kcc-accordion-icon {
    transform: rotate(180deg);
}
.kcc-accordion .kcc-accordion-icon {
    transition: transform 0.3s;
    font-size: 0.8em;
    margin-left: 10px;
}

/* ============================================
    EXPORT SECTION
    ============================================ */
.kcc-export-section {
    padding: 30px 0;
    text-align: center;
}

.kcc-export-container {
    background: linear-gradient(135deg, var(--kcc-primary) 0%, var(--kcc-primary-dark) 100%);
    border-radius: var(--kcc-radius-xl);
    padding: 40px 30px;
    color: white;
    box-shadow: var(--kcc-shadow-lg);
}

.kcc-export-title {
    color: white;
    margin-bottom: 10px;
}

.kcc-export-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 25px;
}

.kcc-export-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.kcc-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--kcc-radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.kcc-export-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
    RESPONSIVE DESIGN (Consolidated)
    ============================================ */
@media (max-width: 992px) {
    .kcc-h1 { font-size: 2.8rem; }
    .kcc-hero { padding: 80px 0 40px; }
    .kcc-hero-title { font-size: 2.6rem; }
    .kcc-hero-subtitle { font-size: 1.1rem; }
    .kcc-hero-stats { grid-template-columns: repeat(2, 1fr); }
    .kcc-chart-nav { flex-direction: column; align-items: stretch; gap: 15px; }
    .kcc-nav-title { text-align: center; }
    .kcc-time-filters, .kcc-chart-types { justify-content: center; }
    .kcc-chart-wrapper { height: 350px; }
    .kcc-insights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .kcc-h1 { font-size: 2.4rem; }
    .kcc-h2 { font-size: 2rem; }
    .kcc-h3 { font-size: 1.6rem; }
    .kcc-section { padding: 40px 0; }
    .kcc-hero { padding: 60px 0 30px; }
    .kcc-hero-title { font-size: 2.2rem; }
    .kcc-hero-stats { grid-template-columns: 1fr; gap: 10px; }
    .kcc-stat-card { padding: 15px; }
    .kcc-chart-container, .kcc-data-container { padding: 15px; }
    .kcc-chart-wrapper { height: 300px; }
    .kcc-quick-stats { grid-template-columns: 1fr; }
    .kcc-export-container { padding: 30px 20px; }
    .kcc-export-buttons { flex-direction: column; align-items: center; }
    .kcc-export-btn { width: 100%; max-width: 300px; justify-content: center; }
}

@media (max-width: 576px) {
    .kcc-container { padding: 0 10px; }
    .kcc-h1 { font-size: 2rem; }
    .kcc-hero-title { font-size: 2rem; }
    .kcc-chart-header { flex-direction: column; align-items: stretch; text-align: center; }
    .kcc-chart-actions { justify-content: center; }
    .kcc-data-header { flex-direction: column; text-align: center; }
    .kcc-data-actions { justify-content: center; }
}

.kcc-pulse-dot {
    width: 8px; height: 8px; background: #4caf50; border-radius: 50%;
    animation: kcc-pulse-small 2s infinite; display: inline-block; margin-left: 8px;
}
.text-center { text-align: center !important; }
@keyframes kcc-pulse-small {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}



/* ============================================
    GAMES SECTION PROFESSIONAL CSS
    ============================================ */
/* --- Theme Variables (Ensure these match your global :root) --- */
:root {
    --games-primary: #1a237e;
    --games-accent: #d32f2f;
    --games-success: #4caf50;
    --games-gold: #ffc107;
    --games-bg-light: #ffffff;
    --games-bg-dark: #f8f9fa;
    --games-text-dark: #212529;
    --games-text-gray: #5c6773;
    --games-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --games-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --games-radius-lg: 16px;
    --games-radius-md: 12px;
}

/* --- Base Section Styling --- */
.games-section-pro {
    padding: 70px 0;
    background-color: var(--games-bg-dark); /* Light grey background */
    font-family: 'Poppins', sans-serif;
    color: var(--games-text-dark);
}

.games-container-pro {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Section Header & Stats --- */
.section-header-pro {
    text-align: center;
    margin-bottom: 50px;
}

.section-header-pro h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--games-primary);
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 10px;
}

.section-header-pro h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--games-accent);
    border-radius: 2px;
}

.section-subtitle-pro {
    font-size: 1.05rem;
    color: var(--games-text-gray);
    max-width: 800px;
    margin: 20px auto 40px;
    line-height: 1.6;
}

/* --- Stats Bar (Optimized for space/visual flow) --- */
.stats-bar-pro {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 10px 0;
    background-color: var(--games-bg-light);
    border-radius: var(--games-radius-md);
    box-shadow: var(--games-shadow-sm);
    max-width: 900px;
    margin: 0 auto 50px;
}

.stat-item-pro {
    text-align: center;
    padding: 10px 0;
}

.stat-number-pro {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--games-accent);
    line-height: 1.1;
}

.stat-label-pro {
    font-size: 0.8rem;
    color: var(--games-text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Search Bar --- */
.search-container-pro {
    position: relative;
    max-width: 700px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    border: 3px solid var(--games-primary);
    border-radius: 50px;
    background-color: var(--games-bg-light);
    box-shadow: var(--games-shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-container-pro:focus-within {
    border-color: var(--games-accent);
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
}

.search-icon-pro {
    padding: 15px 20px;
    font-size: 1.4rem;
    color: var(--games-primary);
}

.search-bar-pro {
    flex-grow: 1;
    padding: 15px 10px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    color: var(--games-text-dark);
}

.search-results-pro {
    /* Styles for the dropdown results */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 var(--games-radius-md) var(--games-radius-md);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    display: none; 
    font-size: 1rem;
    color: var(--games-text-gray);
    box-shadow: var(--games-shadow-md);
}
.search-results-pro.active {
    display: block;
}

/* --- Filter Tabs --- */
.filter-tabs-pro {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-tab-pro {
    padding: 10px 25px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--games-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-tab-pro:hover {
    background-color: #f0f0f0;
    border-color: var(--games-accent);
}

.filter-tab-pro.active {
    background: linear-gradient(135deg, var(--games-primary) 0%, #303f9f 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
    transform: translateY(-2px);
}

.tab-count-pro {
    background-color: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Game Group Header --- */
.game-group-pro {
    margin-bottom: 50px;
    padding: 0 10px; /* Internal padding for containers */
}

.game-group-pro.hidden {
    display: none;
}

.group-header-pro {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--games-accent);
    justify-content: flex-start;
}

.group-title-pro {
    font-size: 2rem;
    font-weight: 700;
    color: var(--games-primary);
    margin: 0;
}

.group-icon-pro {
    font-size: 2.2rem;
}

.group-count-pro {
    font-size: 1rem;
    font-weight: 600;
    color: var(--games-accent);
    margin-left: auto;
    padding: 5px 15px;
    background-color: #fce4ec;
    border-radius: 50px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- Game Grid & Card --- */
.games-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card-pro {
    background-color: var(--games-bg-light);
    padding: 30px;
    border-radius: var(--games-radius-lg);
    box-shadow: var(--games-shadow-md);
    border: 1px solid #e0e0e0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.game-card-pro:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(26, 35, 126, 0.2);
    border-color: var(--games-primary);
}

.game-card-pro.hidden {
    display: none;
}

.game-card-pro.premium {
    border: 3px solid var(--games-gold);
    background: linear-gradient(145deg, #fffcf4 0%, var(--games-bg-light) 100%);
    box-shadow: 0 4px 25px rgba(255, 193, 7, 0.3);
}

.game-rank-pro {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--games-accent);
    color: white;
    padding: 8px 15px;
    border-radius: 0 var(--games-radius-lg) 0 var(--games-radius-lg);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* --- Game Card Content --- */
.game-header-pro {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.game-icon-pro {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--games-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.game-card-pro.premium .game-icon-pro {
    background-color: var(--games-gold);
    color: var(--games-primary);
}

.game-title-pro {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--games-primary);
    margin: 0;
    line-height: 1.2;
}

.game-description-pro {
    font-size: 0.95rem;
    color: var(--games-text-gray);
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

.game-meta-pro {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-type-pro {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-type-pro.day {
    background-color: #fffde7; /* Light Yellow */
    color: #ffb300;
}
.game-type-pro.night {
    background-color: #e3f2fd; /* Light Blue */
    color: #0d47a1;
}
.game-type-pro.weekly {
    background-color: #f3e5f5; /* Light Purple */
    color: #4a148c;
}

/* --- Game Stats & Actions --- */
.game-stats-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 2px dashed #eceff1;
    margin-bottom: 20px;
}

.game-stat-pro {
    text-align: center;
    flex-basis: 48%;
}

.stat-value-pro {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--games-accent);
    line-height: 1.2;
}

.stat-label-pro {
    font-size: 0.75rem;
    color: var(--games-text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-actions-pro {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.game-btn-pro {
    flex-grow: 1;
    text-align: center;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-details-pro {
    background: linear-gradient(135deg, var(--games-primary) 0%, #303f9f 100%);
    color: white;
}

.btn-details-pro:hover {
    background: linear-gradient(135deg, #303f9f 0%, var(--games-primary) 100%);
    box-shadow: 0 4px 10px rgba(26, 35, 126, 0.5);
}

.btn-charts-pro {
    background: linear-gradient(135deg, var(--games-accent) 0%, #b71c1c 100%);
    color: white;
}

.btn-charts-pro:hover {
    background: linear-gradient(135deg, #b71c1c 0%, var(--games-accent) 100%);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.5);
}

/* ===== Mobile-only: force game stats into one row (≤576px) ===== */
@media (max-width: 576px) {
  /* Keep the stats in one row and prevent stacking */
  .game-stats-pro {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    margin-bottom: 12px !important;
    border-top: 1px solid #f1f1f1 !important;
    flex-wrap: nowrap !important;
  }

  /* Each stat shares the row equally */
  .game-stat-pro {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex: 1 1 48% !important;
    min-width: 0;
    padding: 6px 8px !important;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,250,0.98));
    box-shadow: 0 6px 14px rgba(10,20,50,0.03);
    border: 1px solid #f0f0f0;
  }

  /* Keep the numeric/time value bold and clipped if needed */
  .stat-value-pro {
    font-size: 1rem !important;
    font-weight: 800 !important;






/* --- No Results --- */
.no-results-pro {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--games-radius-lg);
    margin-top: 30px;
    box-shadow: var(--games-shadow-md);
    display: none;
}

.no-results-pro h3 {
    color: var(--games-accent);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .games-grid-pro {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .section-header-pro h1 {
        font-size: 2.2rem;
    }
    .stats-bar-pro {
        flex-wrap: wrap;
        gap: 15px;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .stat-number-pro {
        font-size: 1.4rem;
    }
    .filter-tabs-pro {
        gap: 10px;
    }
    .game-card-pro {
        padding: 25px;
    }
}
@media (max-width: 576px) {
    .games-grid-pro {
        grid-template-columns: 1fr;
    }
    .search-bar-pro {
        font-size: 1rem;
    }
    .group-title-pro {
        font-size: 1.6rem;
    }
    .game-title-pro {
        font-size: 1.4rem;
    }
    .game-stats-pro {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .game-stat-pro {
        padding: 5px 0;
        border-bottom: 1px dotted #eee;
    }
    .game-actions-pro {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
  /* tighter grid & card spacing */
  .games-grid-pro {
    grid-template-columns: 1fr;   /* single column */
    gap: 14px !important;
  }

  .game-card-pro {
    padding: 14px !important;
    border-radius: 12px !important;
    min-height: auto;
  }

  /* shrink header icon + title to fit */
  .game-icon-pro {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.4rem !important;
  }

  .game-title-pro {
    font-size: 1.25rem !important;
  }

  .game-description-pro {
    font-size: 0.92rem !important;
    max-height: 4.8rem;        /* roughly 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 12px;
  }

  /* Ensure stats stack cleanly */
  .game-stats-pro {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
    margin-bottom: 12px;
  }

  .game-stat-pro { 
    flex-basis: auto;
    text-align: left;
    padding: 6px 0;
    border-bottom: none;
  }

  /* IMPORTANT: Force action buttons on one row (side-by-side) */
  .game-actions-pro {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
  }

  /* Buttons share the row equally */
  .game-actions-pro .game-btn-pro {
    flex: 1 1 48%;
    padding: 10px 10px;
    font-size: 0.95rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  /* Slight visual difference to keep CTAs readable */
  .game-actions-pro .btn-details-pro { order: 1; }
  .game-actions-pro .btn-charts-pro { order: 2; }

  /* Keep rank badge within card bounds */
  .game-rank-pro {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  /* Make sure search bar and stats container fit */
  .search-container-pro { max-width: 100%; padding-right: 12px; padding-left: 12px; }
  .stats-bar-pro { margin: 16px 8px 30px; gap: 12px; padding: 8px; }

  /* Reduce overall font sizes slightly to avoid wrapping/overflow */
  .section-header-pro h1 { font-size: 1.9rem; }
  .group-title-pro { font-size: 1.4rem; }
}

/* Extra small devices (narrow phones) — further compression */
@media (max-width: 420px) {
  .game-actions-pro .game-btn-pro {
    font-size: 0.9rem;
    padding: 8px 8px;
  }
  .game-description-pro { max-height: 4.2rem; }
  .game-title-pro { font-size: 1.15rem; }
}

/* Full mobile fix: create space BEFORE the badge inside hero */
@media (max-width: 768px) {
    .kcc-hero {
        padding-top: 110px !important; /* Add enough vertical space */
        margin-top: 0 !important;      /* Remove negative margin causing overlap */
    }
}

@media (max-width: 480px) {
    .kcc-hero {
        padding-top: 120px !important; /* More space for small screens */
        margin-top: 0 !important;
    }
}

