html, body {
    background-color: #000000;
    color: #ffffff;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%; /* Prevent Safari from auto-sizing text */
    text-size-adjust: 100%;
}

/* Force Poppins on all MudBlazor components */
.mud-typography, .mud-input, .mud-button, .mud-chip,
.mud-nav-link, .mud-menu-item, .mud-breadcrumbs,
.mud-alert, .mud-card, .mud-paper, .mud-text-field,
.mud-table, .mud-list, .mud-dialog, .mud-tabs,
* {
    font-family: 'Poppins', sans-serif !important;
}

/* Override landing CSS global heading colors for dark theme */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 600;
    font-family: 'Poppins', sans-serif !important;
}

/* Scope landing-style body rules to landing page only */
.mud-layout h1,
.mud-layout h2,
.mud-layout h3,
.mud-layout h4,
.mud-layout h5,
.mud-layout h6 {
    color: inherit;
}

#blazor-error-ui {
    background: #800;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #fff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

/* Override MudBlazor dark theme specifics */
.mud-theme-dark {
    --mud-palette-background: #000000;
    --mud-palette-surface: rgba(18, 18, 18, 0.55);
}

/* Kill white backgrounds from bootstrap-landing & landing-style */
.page-showcase,
.page-showcase *,
section,
.section,
.bg-white,
.jumbotron,
.modal-content,
.dropdown-menu,
.card:not(.mud-card),
.list-group-item {
    background: transparent !important;
    background-color: transparent !important;
}

/* ===== Glassmorphism — semi-transparent panels with backdrop blur ===== */

.mud-paper {
    background: rgba(18, 18, 18, 0.55) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.mud-paper:hover {
    background: rgba(18, 18, 18, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

.mud-card {
    background: rgba(18, 18, 18, 0.5) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.mud-card:hover {
    background: rgba(18, 18, 18, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

.mud-alert {
    background: rgba(18, 18, 18, 0.45) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* MudBlazor main content — transparent so particles show through panels */
.mud-main-content {
    background: transparent !important;
}

/* Drawer — frosted glass */
.mud-drawer {
    background: rgba(12, 12, 12, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

footer a {
    color: var(--mud-palette-text-secondary) !important;
}

footer a:hover {
    color: var(--mud-palette-primary) !important;
}

.footer-legal-links {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.45) !important;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: var(--mud-palette-primary) !important;
}

.footer-separator {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.2);
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Ensure landing page styles don't bleed into MudBlazor pages */
.mud-layout a {
    text-decoration: none;
}

/* Landing page title override - use the logo-text style from 1x2.tv */
.header-area .logo-text {
    font-size: 110px;
    color: #ff3952;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
}

.hero-subtitle {
    color: #ffffff;
    font-size: 50px;
    font-weight: 700;
}

/* Hero landing section */
.hero-landing {
    height: 100vh;               /* fallback for older browsers */
    height: 100dvh;              /* dynamic viewport height — fixes Safari address bar */
    width: 100%;
    margin-top: -64px;
    padding-top: 90px;
    overflow: hidden;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* Brokerage affiliate links above hero title */
.brokerage-links {
    position: absolute;
    top: 70px;
    width: 100%;
    z-index: 5;
}

.brokerage-links a {
    color: grey;
    text-decoration: underline;
    font-size: smaller;
}

/* Mobile responsive hero text */
@media (max-width: 768px) {
    .header-area .logo-text {
        font-size: 48px !important;
    }
    .hero-subtitle {
        font-size: 24px !important;
        line-height: 36px !important;
    }
    .header-area {
        padding: 100px 0 80px 0 !important;
    }
    .brokerage-links {
        font-size: 11px;
        top: 66px;
    }
    .hero-landing {
        padding-top: 120px !important;
    }
}

@media (max-width: 480px) {
    .header-area .logo-text {
        font-size: 36px !important;
    }
    .hero-subtitle {
        font-size: 20px !important;
        line-height: 30px !important;
    }
    .header-area {
        padding: 80px 0 60px 0 !important;
    }
    .brokerage-links {
        font-size: 10px;
        top: 64px;
        line-height: 1.4;
    }
    .hero-landing {
        padding-top: 130px !important;
    }
}

/* Link styles matching 1x2.tv */
a {
    transition: color 0.2s ease;
}

.mud-layout a:hover {
    opacity: 0.85;
}

/* Global particles background - fixed behind everything */
#particles-js {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

#particles-js canvas {
    pointer-events: none !important;
}

/* Z-index stack for layout — transparent so particles show behind panels */
.mud-layout {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Override any MudBlazor internal container backgrounds */
.mud-layout-page {
    background: transparent !important;
}

/* Hero section on landing page — transparent so particles show through */
.header-area {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: transparent !important;
}

/* Landing overlay — lighter so animation is more visible */
.header-area:after {
    background: rgba(0, 0, 0, 0.35) !important;
    opacity: 1 !important;
}

.mud-appbar {
    z-index: 1100 !important;
}

.mud-drawer {
    z-index: 1200 !important;
}

.mud-overlay {
    z-index: 1150 !important;
}

.mud-popover-provider {
    z-index: 1300 !important;
}

.mud-popover {
    z-index: 1300 !important;
}

.mud-picker, .mud-picker-container {
    z-index: 1300 !important;
}

/* Ensure MudDatePicker popup is fully visible with solid background */
.mud-popover-open {
    z-index: 1400 !important;
}

.mud-popover.mud-paper {
    background: rgba(30, 30, 30, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.mud-picker-calendar-header,
.mud-picker-calendar-header-switch,
.mud-picker-calendar-content,
.mud-picker-calendar-transition,
.mud-picker .mud-picker-datepicker-toolbar,
.mud-picker .mud-toolbar {
    background: transparent !important;
}

.mud-picker-calendar .mud-button-root {
    color: #ffffff;
}

.mud-picker-calendar .mud-button-root:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.mud-picker-nav-button-prev,
.mud-picker-nav-button-next {
    color: #ffffff !important;
}

.mud-picker-calendar-day.mud-selected {
    background-color: var(--mud-palette-primary) !important;
}

/* Make date picker popup wider and taller so all days fit */
.mud-picker .mud-popover,
.mud-picker-inline-paper,
.mud-picker-inline-paper .mud-paper,
.mud-popover.mud-popover-open.overflow-y-auto {
    min-width: 320px !important;
    width: 320px !important;
}

.mud-picker-calendar-transition {
    min-height: 280px !important;
}

.mud-picker-calendar .mud-day {
    width: 40px !important;
    height: 42px !important;
}

/* Store badges — uniform visual height using flex alignment */
.store-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.store-badge {
    height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
    vertical-align: middle;
}

/* Google Play badge — white border to match App Store look */
.store-badge-gplay {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

/* Hero section badges — slightly larger */
.header-area .store-badge {
    height: 44px !important;
}

/* ===== Championship cards on landing page ===== */

.champ-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

@media (max-width: 960px) {
    .champ-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .champ-grid {
        grid-template-columns: 1fr;
    }
}

.champ-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(18, 18, 18, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none !important;
    color: #ffffff;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    overflow: hidden;
}

.champ-card:hover {
    background: rgba(30, 30, 30, 0.75);
    border-color: rgba(100, 200, 100, 0.35);
    transform: translateY(-2px);
}

.champ-card-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.champ-card-flag img {
    width: 28px;
    height: auto;
    object-fit: contain;
}

.champ-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(10, 122, 19, 0.5) 0%, rgba(6, 74, 11, 0.5) 100%);
    border: 1px solid rgba(100, 200, 100, 0.15);
}

.champ-card-icon svg {
    width: 22px;
    height: 22px;
    fill: rgba(100, 200, 100, 0.9);
}

.champ-card-body {
    flex: 1;
    min-width: 0;
}

.champ-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.champ-card-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

.champ-card-arrow {
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.champ-card:hover .champ-card-arrow {
    color: rgba(100, 200, 100, 0.7);
    transform: translateX(3px);
}

/* ===== Responsive video embed (16:9) ===== */

.video-section {
    margin: 32px 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    background: rgba(18, 18, 18, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== Team badge — logo/flag in a stylish white circle ===== */

.team-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.team-badge img {
    object-fit: contain;
    display: block;
}

/* Small badge — MatchCard rows */
.team-badge-sm {
    width: 34px;
    height: 34px;
}

.team-badge-sm img {
    width: 22px;
    height: 22px;
}

/* Medium badge — Team page header */
.team-badge-md {
    width: 72px;
    height: 72px;
}

.team-badge-md img {
    width: 50px;
    height: 50px;
}

/* Large badge — MatchDetail hero */
.team-badge-lg {
    width: 96px;
    height: 96px;
}

.team-badge-lg img {
    width: 68px;
    height: 68px;
}

/* ===== Match CTA button (replaces dash between teams) ===== */

.match-cta-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 0;
    margin-top: 7px;
    border-radius: 50%;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    animation: cta-pulse 2.5s ease-in-out infinite;
    position: relative;
}

.match-cta-btn:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
    box-shadow: 0 0 18px rgba(29, 185, 84, 0.45);
    border-radius: 50%;
}

.match-cta-btn:active {
    transform: scale(0.92);
}

.match-cta-time {
    font-size: 0.7rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1;
}

.match-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.match-cta-icon svg {
    transition: transform 0.3s ease;
    border-radius: 50%;
    vertical-align: middle;
    display: block;
}

.match-cta-btn:hover .match-cta-icon svg {
    transform: scale(1.05);
}

@keyframes cta-pulse {
    0%, 100% {
        box-shadow: 0 0 4px rgba(29, 185, 84, 0.15);
    }
    50% {
        box-shadow: 0 0 12px rgba(29, 185, 84, 0.3);
    }
}

/* ===== Download App Dialog ===== */

.download-dialog .mud-dialog {
    background: rgba(18, 18, 18, 0.92) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px !important;
}

.download-dialog .mud-dialog-title {
    padding-bottom: 0;
}

.download-dialog .mud-dialog-content {
    padding-top: 8px;
}

.download-dialog .mud-dialog-actions {
    padding: 4px 16px 8px;
    justify-content: center;
}

.download-dialog-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
}

/* ===== Football news cards on landing page ===== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* News page: wider grid for dedicated page */
.news-grid.news-grid-full {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 960px) {
    .news-grid.news-grid-full {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid.news-grid-full {
        grid-template-columns: 1fr;
    }
}

.news-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(18, 18, 18, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none !important;
    color: #ffffff;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    overflow: hidden;
}

.news-card:hover {
    background: rgba(30, 30, 30, 0.75);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.news-card-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.news-card-source svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.news-card-dot {
    opacity: 0.4;
}

.news-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: rgba(147, 197, 253, 1);
}

/* ===== Share Buttons ===== */
.share-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-end;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    background: rgba(18,18,18,0.55);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.share-btn:hover {
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.3);
}

.share-telegram:hover { color: #26A5E4; border-color: #26A5E4; }
.share-whatsapp:hover { color: #25D366; border-color: #25D366; }
.share-x:hover { color: #ffffff; border-color: #ffffff; }
.share-copy:hover { color: #4CAF50; border-color: #4CAF50; }

/* ===== App Install Popup ===== */
/* JS portals this to <body> directly — no stacking context issues */
.app-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s ease;
    /* Safari: no transforms, no backdrop-filter, no will-change on fixed overlays */
}

.app-popup {
    background: linear-gradient(145deg, #1a1a2e 0%, #0a0a15 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    position: relative;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.app-popup-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: rgba(255,255,255,0.4);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.app-popup-close:hover { color: #fff; }

.app-popup-icon { margin-bottom: 16px; }

.app-popup-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.app-popup-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 20px;
}

.app-popup-dismiss {
    margin-top: 16px;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
    cursor: pointer;
}

.app-popup-dismiss:hover { color: rgba(255,255,255,0.5); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* AppBar download buttons — compact */
.appbar-badges .store-badge {
    height: 28px !important;
}

/* ===== Accessibility: prefers-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;
    }
    .match-cta-btn {
        animation: none;
    }
    .champ-card:hover,
    .news-card:hover {
        transform: none;
    }
}

/* ===== Focus visible for keyboard navigation ===== */
.match-card-wrapper:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

