/*
 * Vida 2.0 — Cross-browser visual system
 * Black + electric blue contemporary skin.
 * Loaded last so Chrome, Edge, Firefox and Safari render the same design language.
 */

:root {
  --xl-accent: #168cff;
  --xl-accent-strong: #0077ff;
  --xl-accent-soft: rgba(22, 140, 255, .16);
  --xl-bg: #070b12;
  --xl-bg-2: #0a1019;
  --xl-panel: #0d1420;
  --xl-panel-2: #111b2a;
  --xl-panel-3: #162235;
  --xl-border: #1d2b3e;
  --xl-border-soft: rgba(255,255,255,.08);
  --xl-text: #f4f7fb;
  --xl-muted: #8fa0b5;
  --xl-sidebar: 295px;
  --vida-shadow: 0 16px 42px rgba(0,0,0,.28);
  --vida-focus: 0 0 0 3px rgba(22,140,255,.24);
  color-scheme: dark;
}

html {
  background: var(--xl-bg);
  color-scheme: dark;
  scrollbar-color: #36506e #090e16;
  scrollbar-width: thin;
}

html,
body,
body.xleche-app-body {
  min-height: 100%;
  background: var(--xl-bg) !important;
  color: var(--xl-text) !important;
}

body,
body.xleche-app-body {
  margin: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: rgba(22,140,255,.34);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #090e16; }
::-webkit-scrollbar-thumb { background: #304761; border: 2px solid #090e16; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3e5c7c; }

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

video,
iframe {
  background: #000;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--xl-accent);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
select,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--xl-accent) !important;
  outline-offset: 2px;
  box-shadow: var(--vida-focus);
}

/* ---------- Main application shell ---------- */
.xleche-site-shell,
#content,
#main,
#main-content,
.xleche-feed,
.xleche-listing-page,
.xleche-categories-page {
  background: var(--xl-bg) !important;
  color: var(--xl-text);
}

.xleche-site-shell {
  min-height: 100vh;
}

.xleche-feed {
  background-image: radial-gradient(circle at 78% -10%, rgba(22,140,255,.08), transparent 32%) !important;
}

/* ---------- Top bars / navigation ---------- */
.xleche-network-bar,
.network {
  background: #060a10 !important;
  border-bottom: 1px solid var(--xl-border) !important;
  color: #aebbc9 !important;
}

.xleche-network-bar a:hover,
.network a:hover {
  color: #fff !important;
}

.xleche-topbar,
.xleche-legacy-header,
.navbar-inverse,
.xleche-sticky-header {
  background: rgba(8,13,21,.96) !important;
  border-color: var(--xl-border) !important;
  color: var(--xl-text) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.xleche-sidebar {
  background: linear-gradient(180deg, #0c131e 0%, #090e16 100%) !important;
  border-right: 1px solid var(--xl-border) !important;
  box-shadow: 10px 0 30px rgba(0,0,0,.13);
  scrollbar-color: #344c68 transparent;
}

.xleche-menu-group {
  border-bottom-color: var(--xl-border) !important;
}

.xleche-menu-group h2 {
  color: #c7d3df !important;
}

.xleche-sidebar-nav a,
.xleche-nav-dropdown,
.navbar-inverse .navbar-nav > li > a {
  color: #dce5ee !important;
  border-color: rgba(255,255,255,.035) !important;
}

.xleche-sidebar-nav a:hover,
.xleche-sidebar-nav a:focus,
.xleche-nav-dropdown:hover,
.xleche-nav-dropdown:focus,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
  background: rgba(22,140,255,.11) !important;
  color: #fff !important;
}

.xleche-sidebar-nav a:hover .xleche-nav-icon,
.xleche-nav-dropdown:hover .xleche-nav-icon,
.xleche-sidebar-nav a:focus .xleche-nav-icon,
.xleche-nav-dropdown:focus .xleche-nav-icon {
  color: var(--xl-accent) !important;
}

.xleche-new-badge,
.xleche-beta {
  background: var(--xl-accent) !important;
  color: #fff !important;
}

.xleche-site-logo strong span {
  background: linear-gradient(135deg, #21a2ff, #006dff) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(22,140,255,.28);
}

/* Legacy logo pills/text if present. */
.navbar-brand,
.navbar-inverse .navbar-brand {
  color: #fff !important;
}

/* ---------- Search ---------- */
.xleche-top-search input,
.xleche-search-form-modern .xleche-search-field,
.xleche-desktop-search-form input,
.xleche-mobile-search-form input,
.navbar-form .form-control {
  background: #0d1521 !important;
  color: #eef5fc !important;
  border-color: #24344a !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.xleche-top-search input::placeholder,
.xleche-search-field::placeholder,
.form-control::placeholder,
textarea::placeholder {
  color: #71839a !important;
  opacity: 1;
}

.xleche-top-search input:focus,
.xleche-search-form-modern .xleche-search-field:focus,
.form-control:focus {
  border-color: var(--xl-accent) !important;
  box-shadow: 0 0 0 3px rgba(22,140,255,.13) !important;
}

.xleche-top-search button,
.xleche-search-submit,
.xleche-search-form-modern .xleche-search-submit {
  background: linear-gradient(135deg, #1596ff, #006dff) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0,109,255,.18);
}

.xleche-top-search button:hover,
.xleche-search-submit:hover {
  filter: brightness(1.08);
}

.xleche-search-clear {
  color: #8da1b5 !important;
}

.xleche-mobile-tabs,
.xleche-mobile-search-panel {
  background: #0a1019 !important;
  border-color: var(--xl-border) !important;
}

/* ---------- Headings / accents ---------- */
.xleche-section-heading h2,
.xleche-listing-header h1,
.xleche-categories-hero h1,
.sectionTitle,
.page-title,
.entry-title,
.post-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--xl-text);
}

.xleche-listing-accent,
.xleche-category-accent,
.xleche-categories-kicker,
.xleche-single-info::before,
.xleche-related-section .sectionTitle::before {
  background: linear-gradient(180deg, #27a8ff, #006dff) !important;
  box-shadow: 0 0 22px rgba(22,140,255,.23) !important;
}

.xleche-listing-kicker {
  color: #53b5ff !important;
}

/* ---------- Modern video cards ---------- */
.xleche-video-card {
  color: var(--xl-text);
}

.xleche-card-media {
  background: #030609 !important;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 9px;
  box-shadow: 0 7px 22px rgba(0,0,0,.18);
}

.xleche-card-image {
  border-radius: 8px;
}

.xleche-card-title,
.xleche-card-title a {
  color: #f0f5fb !important;
}

.xleche-card-title a:hover {
  color: #42adff !important;
}

.xleche-card-meta {
  color: var(--xl-muted) !important;
}

.xleche-card-source {
  color: #b9c7d5 !important;
}

.xleche-card-hd,
.xleche-card-duration,
#hd,
#duration {
  background: rgba(4,9,15,.9) !important;
  color: #eaf4ff !important;
  border: 1px solid rgba(86,174,255,.18);
}

/* ---------- Empty states ---------- */
.xleche-empty,
.xleche-no-results,
.empty-content,
.empty-results,
.empty-header,
.no-results,
.not-found {
  background: linear-gradient(145deg, #0d1520, #0a1018) !important;
  color: #dce7f2 !important;
  border-color: var(--xl-border) !important;
}

.xleche-no-results-icon {
  background: var(--xl-accent-soft) !important;
  color: #54b6ff !important;
}

/* ---------- Categories ---------- */
.xleche-category-card-link {
  background: #0d1520 !important;
  border-color: #1d2c40 !important;
  box-shadow: 0 9px 26px rgba(0,0,0,.2) !important;
}

.xleche-category-card-link:hover,
.xleche-category-card-link:focus-visible {
  border-color: rgba(22,140,255,.72) !important;
  box-shadow: 0 13px 34px rgba(0,0,0,.34), 0 0 0 1px rgba(22,140,255,.1) !important;
}

.xleche-category-placeholder {
  background: linear-gradient(145deg, #142035, #090f18) !important;
  color: #3f5f82 !important;
}

.xleche-category-arrow {
  background: rgba(8,14,23,.78) !important;
  border-color: rgba(255,255,255,.14) !important;
}

.xleche-category-card-link:hover .xleche-category-arrow,
.xleche-category-card-link:focus-visible .xleche-category-arrow {
  background: var(--xl-accent) !important;
  color: #fff !important;
}

/* ---------- Listings / pagination ---------- */
.xleche-listing-header,
.xleche-search-suggestions .xleche-section-heading,
.xleche-related-section {
  border-color: var(--xl-border) !important;
}

.xleche-listing-description,
.xleche-no-results p {
  color: var(--xl-muted) !important;
}

.xleche-pagination .page-numbers,
.xleche-classic-pagination .pagination a,
.xleche-classic-pagination .pagination span,
.pagination > li > a,
.pagination > li > span,
.page-numbers {
  background: #0f1825 !important;
  border-color: #23344a !important;
  color: #cad7e4 !important;
  border-radius: 7px !important;
}

.xleche-pagination .current,
.xleche-pagination a:hover,
.xleche-classic-pagination .pagination .current,
.xleche-ranked-pagination .page-numbers.current,
.pagination > .active > a,
.pagination > .active > span,
.page-numbers.current {
  background: linear-gradient(135deg, #168cff, #006dff) !important;
  border-color: #168cff !important;
  color: #fff !important;
}

.xleche-classic-pagination .pagination a:hover,
.xleche-ranked-pagination a.page-numbers:hover,
.pagination > li > a:hover {
  background: #14243a !important;
  border-color: #2b6fae !important;
  color: #fff !important;
}

/* ---------- Single video / article ---------- */
.xleche-single-player,
.xleche-single-player .body-content {
  background: #020407 !important;
  border-color: #1b2a3c !important;
}

.xleche-single-info,
body.single-post .xleche-single-info,
#report .wrapper-report,
.comment-content {
  background: linear-gradient(145deg, #0e1723, #0b121c) !important;
  border-color: #213147 !important;
  color: #dbe6f1 !important;
}

.xleche-single-title {
  color: #f7fbff !important;
}

.xleche-single-details li,
.xleche-single-meta-row {
  color: #aab9c8 !important;
}

.xleche-single-meta-row,
body.single-post .xleche-single-meta-row {
  background: #111b28 !important;
  border-color: #22354c !important;
}

.xleche-single-tax-row a,
body.single-post .xleche-single-tax-row a {
  background: #111d2b !important;
  border-color: #263b54 !important;
  color: #e8f1fa !important;
}

.xleche-single-tax-row a:hover,
body.single-post .xleche-single-tax-row a:hover {
  background: #142b45 !important;
  border-color: var(--xl-accent) !important;
  color: #fff !important;
}

#report .form-control {
  background: #08101a !important;
  border-color: #26384f !important;
  color: #eef5fc !important;
}

/* ---------- Legacy WP pages: pages, author, archives, contact, 404 ---------- */
.container,
.container-fluid {
  color: inherit;
}

#main-content > .container,
body.page #main-content > .container,
body.author #main-content > .container,
body.archive #main-content > .container,
body.error404 #main-content > .container,
body.search #main-content > .container {
  background: transparent;
}

article,
.post,
.page,
.item-wrap,
.entry-content,
.entry-summary,
.post_content,
.post-content,
.body-content,
.xleche-contact-page {
  color: #d9e4ef;
}

.page-header,
.entry-header {
  border-color: var(--xl-border) !important;
}

.page-header,
.entry-content,
.entry-summary,
.post_content,
.xleche-contact-page,
.commentlist > li,
.comment-respond {
  background-color: transparent !important;
}

.item-wrap,
.item-content {
  background: #0d1520 !important;
  border-color: #1e2e42 !important;
  color: #dce6f0 !important;
}

.entry-meta,
.post-data,
.visitas,
.cat-links,
.tag-links {
  color: var(--xl-muted) !important;
}

/* ---------- Forms ---------- */
.form-control,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  background: #0b131e !important;
  color: #edf5fd !important;
  border: 1px solid #24374e !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

select {
  color-scheme: dark;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--xl-accent) !important;
  box-shadow: 0 0 0 3px rgba(22,140,255,.13) !important;
}

/* Buttons: preserve danger semantics globally; modernize normal actions. */
.btn,
button:not(.xleche-menu-toggle):not(.xleche-nav-dropdown):not(.xleche-search-clear) {
  border-radius: 8px;
}

.btn-primary,
#xleche-contact-form .btn-danger,
input[type="submit"].submit,
.comment-form input[type="submit"] {
  background: linear-gradient(135deg, #168cff, #006dff) !important;
  border-color: #168cff !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(0,109,255,.16);
}

.btn-primary:hover,
#xleche-contact-form .btn-danger:hover,
.comment-form input[type="submit"]:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.btn-default {
  background: #121d2a !important;
  border-color: #263a51 !important;
  color: #e1ebf5 !important;
}

.btn-default:hover,
.btn-default:focus {
  background: #17263a !important;
  border-color: #315777 !important;
  color: #fff !important;
}

/* ---------- Tables / wells / panels / modals ---------- */
.table,
table {
  color: #dbe6f1;
  background: transparent;
}

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
  border-color: var(--xl-border) !important;
}

.table-striped > tbody > tr:nth-of-type(odd),
.table-hover > tbody > tr:hover {
  background: rgba(22,140,255,.055) !important;
}

.panel,
.well,
.modal-content,
.list-group-item {
  background: #0f1722 !important;
  border-color: #223247 !important;
  color: #dbe6f1 !important;
}

.panel-heading,
.panel-footer,
.modal-header,
.modal-footer {
  background: #111b28 !important;
  border-color: #223247 !important;
  color: #eff6fd !important;
}

/* ---------- Footer ---------- */
.xleche-app-footer,
footer,
#colophon {
  background: #070b12 !important;
  border-color: var(--xl-border) !important;
  color: #7f91a5 !important;
}

/* ---------- Browser consistency for range controls ---------- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  accent-color: var(--xl-accent);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: #334155;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,140,255,.18);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #334155;
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--xl-accent);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,140,255,.18);
}

/* ---------- Responsive consistency ---------- */
@media (max-width: 820px) {
  :root { --xl-sidebar: 295px; }

  .xleche-sidebar {
    background: #09111b !important;
  }

  .xleche-topbar {
    background: rgba(7,11,18,.98) !important;
    border-bottom-color: var(--xl-accent) !important;
  }

  .xleche-feed,
  .xleche-listing-page,
  .xleche-categories-page {
    background: var(--xl-bg) !important;
  }
}

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

/* Printing must remain readable instead of forcing the dark UI. */
@media print {
  html,
  body,
  body.xleche-app-body,
  #content,
  #main,
  #main-content {
    background: #fff !important;
    color: #000 !important;
  }
}
