@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg: #0b0f14;
    --card: rgba(18, 25, 38, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --muted: #9aa7b6;
    --text: #e7eef7;
    --primary: #1a6cff;
    --secondary: #233248;
    --accent-green: #25c26e;
    --accent-blue: #00d2ff;
    --glass: rgba(255, 255, 255, 0.03);
    --font-main: 'Outfit', sans-serif;
    
    /* Semantic aliases for analysis components */
    --text-dim: var(--muted);
    --text-primary: var(--text);
    --accent-primary: var(--primary);
    --accent-secondary: var(--accent-blue);
    --sidebar-bg: var(--card);
}

body.light-theme {
    --bg: #f4f7fa;
    --card: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --muted: #64748b;
    --text: #1e293b;
    --primary: #1a6cff;
    --secondary: #e2e8f0;
    --accent-green: #10b981;
    --accent-blue: #0ea5e9;
    --glass: rgba(0, 0, 0, 0.02);
    --sidebar-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(26, 108, 255, 0.15) 0%, transparent 70%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 50%;
    background: radial-gradient(circle, rgba(37, 194, 110, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 0;
    position: relative;
}

.hero-badge {
    background: rgba(26, 108, 255, 0.1);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(26, 108, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #9aa7b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero h1 span {
    display: block;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 700px;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(26, 108, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(26, 108, 255, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--glass);
    color: white;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

/* Feature Grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 6rem;
    width: 100%;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: left;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 108, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(26, 108, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(26, 108, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--primary);
    border: 1px solid rgba(26, 108, 255, 0.2);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Application Shell */
.app-layout {
    background-color: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.sidebar-collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    min-height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    width: 100%;
    text-shadow: 0 0 15px rgba(26, 108, 255, 0.2);
}

.logo i {
    color: #3b82f6; /* Brighter blue */
    font-size: 1.5rem;
    min-width: 32px;
    text-align: center;
}

.logo-text span {
    color: var(--primary);
}

.sidebar-collapsed .logo-text {
    display: none;
}

.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-collapsed .sidebar-toggle {
    display: none;
}

.logo {
    cursor: pointer;
}

.sidebar-collapsed .logo {
    justify-content: center;
    width: 100%;
}

.sidebar-nav {
    flex: 1;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-collapsed .sidebar-nav a span {
    display: none;
}

.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    padding: 0.8rem;
}

.sidebar-nav li.active a,
.sidebar-nav a:hover {
    background: rgba(26, 108, 255, 0.1);
    color: var(--primary);
}

.sidebar-nav li.active a i {
    color: var(--primary);
}

.sidebar-nav a i {
    width: 20px;
    font-size: 1.1rem;
}




.sidebar-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.user-badge {
    background: var(--glass);
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.logout-btn {
    color: var(--muted);
    transition: color 0.3s;
}

.logout-btn:hover {
    color: var(--primary);
}

.sidebar-collapsed .user-badge {
    padding: 0.7rem;
    justify-content: center;
}

.user-badge i {
    font-size: 1.2rem;
    color: var(--primary);
}

.footer-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.sidebar-collapsed .footer-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.action-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.sidebar-collapsed .action-btn {
    width: 48px;
    height: 48px;
}

.action-btn i {
    font-size: 1.1rem;
}

#langLabel {
    font-size: 0.75rem;
    font-weight: 700;
}

/* Old control styles removed */

.back-link-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.back-link-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.back-icon {
    width: 24px;
    display: flex;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-collapsed .back-link-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    margin: 0 auto;
}

.sidebar-collapsed .back-text {
    display: none;
}

.sidebar-collapsed .back-link-btn .back-icon {
    width: 100%;
    color: var(--primary);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    padding: 2.5rem 2rem;
    background: radial-gradient(circle at 50% 50%, rgba(26, 108, 255, 0.03) 0%, transparent 100%);
    min-height: 100vh;
}

.content-wrapper h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #f8fafc;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.database-container {
    display: block;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .sidebar .logo span, 
    .sidebar-nav span,
    .sidebar-footer span {
        display: none;
    }
}

/* Dashboard Panels & Cards */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text);
}

.card-body {
    padding: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--card-border);
    margin-bottom: 1rem;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 16px;
    backdrop-filter: blur(20px);
}

.kpi-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.text-muted { color: var(--muted); }
.text-warning { color: #f5c542; }
.text-success { color: var(--accent-green); }
.text-danger { color: #ff5c6c; }
.text-for { color: var(--accent-green); }
.text-against { color: #ff5c6c; }

/* Form Elements */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--muted);
}

select, input[type="date"], input[type="number"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b0bec5%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
    padding-right: 30px;
}

select option {
    background: var(--card);
    color: var(--text);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-divider {
    height: 1px;
    background: var(--card-border);
    margin: 1.5rem 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

/* Utilities */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Analysis Results Styling */
.analysis-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.result-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.result-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.result-type {
    font-weight: 600;
    color: var(--text-dim);
    font-size: 0.9rem;
    width: 140px;
}

.result-values {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}

.v-pill, .res-pill {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.res-pill.highlighted {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-play {
    background: rgba(0, 255, 135, 0.15);
    color: #00ff87;
    border: 1px solid rgba(0, 255, 135, 0.3);
}

.badge-lean {
    background: rgba(255, 212, 0, 0.15);
    color: #ffd400;
    border: 1px solid rgba(255, 212, 0, 0.3);
}

.badge-skip {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.safety-box {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 12px;
}

.safety-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
}

.safety-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.safety-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #00ff87);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Animations */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.analysis-results .result-row {
    animation: fadeInSlide 0.4s ease-out forwards;
}

.result-row.mix-result {
    animation-delay: 0.1s;
}
/* Save Bet Button */
.btn-save-bet {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 0.5rem;
    display: block;
    width: 100%;
    transition: all 0.2s ease;
}
.btn-save-bet:hover {
    filter: brightness(1.2);
}
.btn-save-bet:disabled {
    background: var(--line);
    cursor: not-allowed;
    opacity: 0.7;
}
.btn-save-bet.btn-success {
    background: var(--good);
}

/* Faza 4: Charts */
.charts-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.chart-box h4 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}
@media (max-width: 900px) {
    .charts-wrapper {
        grid-template-columns: 1fr;
    }
}

/* New Components for Faza 1 Enhancements */

.referee-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.referee-stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.referee-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.referee-stat-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.history-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.history-table-wrapper {
    overflow-x: auto;
}

.history-table-wrapper h4 {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.compact-table th, .compact-table td {
    padding: 0.8rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compact-table th {
    color: var(--muted);
    font-weight: 600;
}

.text-for { color: var(--accent-green); font-weight: 600; }
.text-against { color: var(--bad); font-weight: 600; }

/* Expandable Details */
.details-toggle {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.expandable-details {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: none;
}

.expandable-details.active {
    display: block;
    animation: fadeInSlide 0.3s ease-out;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    font-size: 0.8rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.val-bad { color: #ff5c6c; }
.val-good { color: #25c26e; }

.safety-badge {
    background: #f5c542;
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

/* Split Results Table */
.strategy-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.strategy-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--primary);
}

.result-split-table {
    width: 100%;
    border-collapse: collapse;
}

.result-split-table th {
    text-align: left;
    padding: 0.8rem 1.2rem;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--card-border);
}

.result-split-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.res-sublabel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}

.mini-details-toggle {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0;
}

.mini-details-toggle:hover, .mini-details-toggle.active {
    color: var(--primary);
}

.res-highlight {
    font-size: 1.1rem;
}

.res-highlight small {
    display: block;
    font-size: 0.75rem;
}

.row-details {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.row-details.active {
    display: table-row;
}

.details-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0.8rem 1.2rem;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.btn-save-bet.mini {
    padding: 0.3rem 0.8rem;
    width: auto;
    margin-top: 0;
    font-size: 0.7rem;
}

.val-good { color: var(--accent-green); }
.val-bad { color: #ff5c6c; }

/* Referee Badge Styles */
.badge-over {
    background: rgba(37, 194, 110, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(37, 194, 110, 0.3);
}

.badge-under {
    background: rgba(255, 92, 108, 0.15);
    color: #ff5c6c;
    border: 1px solid rgba(255, 92, 108, 0.3);
}

.badge-neutral {
    background: rgba(154, 167, 182, 0.1);
    color: var(--muted);
    border: 1px solid rgba(154, 167, 182, 0.2);
}

.badge-play {
    background: rgba(37, 194, 110, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(37, 194, 110, 0.3);
}

/* DASHBOARD HEADER */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap-reverse;
    gap: 1rem;
}

.results-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 20px rgba(26, 108, 255, 0.3);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* PRINT STYLES */
@media print {
    .sidebar, .config-panel, .header-actions, .empty-state, .btn {
        display: none !important;
    }
    .app-container {
        display: block !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        color: #000 !important;
        background: #fff !important;
    }
    .results-header h1 {
        -webkit-text-fill-color: #000 !important;
        color: #000 !important;
    }
    .badge {
        border: 1px solid #000 !important;
        color: #000 !important;
    }
}
/* Theme & Lang Toggles */
.sidebar-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.control-btn {
    flex: 1;
    background: var(--glass);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

body.light-theme .control-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.control-btn i {
    font-size: 0.9rem;
    color: var(--primary);
}

/* Lang handling */
[lang="en"] .lang-pl { display: none !important; }
[lang="pl"] .lang-en { display: none !important; }

body.light-theme .hero h1 {
    background: linear-gradient(135deg, var(--text) 0%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .feature-card h3 {
    color: var(--text);
}

body.light-theme .btn-secondary {
    color: var(--text);
}

body:not(.light-theme) .theme-sun { display: none; }
body.light-theme .theme-moon { display: none; }

/* Light Theme Visibility Fixes */
body.light-theme .logo,
body.light-theme .user-badge span,
body.light-theme .card-header h3,
body.light-theme .kpi-value,
body.light-theme .form-group label,
body.light-theme select,
body.light-theme input,
body.light-theme .btn-secondary,
body.light-theme .back-link:hover {
    color: var(--text) !important;
}

body.light-theme .sidebar-nav li.active a,
body.light-theme .sidebar-nav a:hover {
    color: var(--primary) !important;
}

body.light-theme .btn-primary {
    color: #fff !important; /* Keep primary buttons white text on blue bg */
}

body.light-theme .badge-play {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

body.light-theme .badge-lean {
    background: rgba(245, 197, 66, 0.1);
    color: #d97706;
}

/* Additional Light Theme Refinements */
body.light-theme .sidebar-nav a {
    color: #475569 !important; /* Darker gray for inactive items */
}

body.light-theme .btn-secondary,
body.light-theme #btnExportCSV {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Final Header Polish */
body.light-theme .results-header h1 {
    color: var(--text) !important;
    background: none !important;
    -webkit-text-fill-color: var(--text) !important;
}

/* Mobile Configurations Panel (Collapsible) */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
    
    .config-panel {
        margin-bottom: 1rem;
    }
    
    .config-panel .card-header.config-header-mobile {
        padding: 1rem 1.5rem;
    }
    
    .config-panel.collapsed .card-body {
        display: none;
    }
    
    .config-panel.collapsed .toggle-icon {
        transform: rotate(180deg);
    }
    
    .sticky-action-bar {
        position: sticky;
        bottom: 0;
        background: var(--card);
        padding: 10px 0;
        margin-top: 15px;
        border-top: 1px solid var(--card-border);
        z-index: 100;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    }
    
    /* Aggressive Compact Layout Overrides */
    
    /* Main Content Spacing */
    .content-wrapper {
        padding: 0.75rem 0.5rem !important;
    }
    
    /* Headers & Buttons */
    .content-wrapper h1, .results-header h1 {
        font-size: 1.4rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .header-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .header-actions .btn {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
        gap: 0.4rem !important;
    }
    
    /* Cards */
    .card {
        margin-bottom: 0.75rem !important;
        border-radius: 12px !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
    }
    
    .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* forms */
    .form-group {
        margin-bottom: 0.8rem !important;
    }
    
    select, input[type="date"], input[type="number"] {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.85rem !important;
    }
    
    /* KPI Grid - Horizontal Swipe instead of wrapped grid */
    .kpi-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.75rem !important;
        padding-bottom: 0.5rem !important; /* Space for scrollbar */
        margin-bottom: 0.75rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .kpi-grid::-webkit-scrollbar { display: none; }
    
    .kpi-card {
        flex: 0 0 140px !important; /* Fixed width for swipe */
        padding: 0.75rem !important;
    }
    
    .kpi-value {
        font-size: 1.4rem !important;
    }
    
    .kpi-label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Result Rows */
    .analysis-results {
        gap: 0.6rem !important;
        padding: 0.5rem 0 !important;
    }
    
    .result-row {
        padding: 0.75rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .result-type {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
    }
    
    .result-values {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
    }
    
    .v-pill, .res-pill {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Charts */
    .chart-box h4 {
        margin-bottom: 0.5rem !important;
        font-size: 0.85rem !important;
    }
    .chart-box {
        margin-bottom: 1rem !important;
    }
    canvas {
        max-height: 220px !important;
    }
}
