/* Avcibet Premium Theme — red / black / ivory */
:root {
  --av-red: #e0002b;
  --av-red-deep: #a30020;
  --av-red-soft: rgba(224, 0, 43, 0.16);
  --av-black: #0b0b0c;
  --av-black-soft: #141214;
  --av-ivory: #fffdfc;
  --av-cream: #f5ede8;
  --av-muted: #aaa2a4;
  --av-line: rgba(255, 253, 252, 0.1);
  --av-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }

body.av-premium {
  background:
    radial-gradient(circle at 12% 4%, rgba(200, 16, 46, 0.13), transparent 27rem),
    radial-gradient(circle at 88% 36%, rgba(143, 11, 32, 0.08), transparent 25rem),
    linear-gradient(180deg, #0b0b0c 0%, #100d0e 48%, #0b0b0c 100%) !important;
  color: var(--av-ivory);
  font-family: "Poppins", Inter, system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body.av-premium::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

/* Header */
body.av-premium header {
  background: rgba(11, 11, 12, 0.86) !important;
  border-color: var(--av-line) !important;
  box-shadow: 0 10px 35px rgba(0,0,0,.22);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

body.av-premium header img { filter: drop-shadow(0 5px 13px rgba(200,16,46,.22)); }
body.av-premium header nav a { color: var(--av-ivory) !important; border-radius: 999px !important; }
body.av-premium header nav a:hover,
body.av-premium header nav a[aria-current="page"] {
  color: #fff !important;
  background: rgba(200,16,46,.14) !important;
  border-color: rgba(200,16,46,.28) !important;
}

/* Cards, form controls and media */
body.av-premium main section,
body.av-premium main [class*="rounded-xl"],
body.av-premium main [class*="rounded-2xl"] { border-color: var(--av-line); }
body.av-premium input,
body.av-premium select,
body.av-premium textarea {
  border-color: rgba(11,11,12,.15) !important;
  border-radius: 12px !important;
}
body.av-premium img { image-rendering: auto; }

/* Quick actions: deliberately compact on desktop */
[data-av-quick-actions] {
  background: rgba(11,11,12,.52) !important;
  border-color: var(--av-line) !important;
  backdrop-filter: blur(14px);
}
[data-av-quick-actions] > div {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
[data-av-quick-actions] [data-av-action] {
  border: 1px solid rgba(255,255,255,.09) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.2) !important;
}
[data-av-action="deposit"] { background: linear-gradient(135deg, #f0143e, #c40026) !important; }
[data-av-action="bonus"] {
  color: #fff !important;
  background: linear-gradient(135deg, #bf0025 0%, #7e071a 72%, #190b0e 100%) !important;
  border-color: rgba(255,73,104,.3) !important;
  box-shadow: 0 8px 22px rgba(224,0,43,.2) !important;
}

@media (min-width: 768px) {
  [data-av-quick-actions] > div { max-width: 560px !important; }
  [data-av-quick-actions] [data-av-action] {
    height: 38px !important;
    font-size: 12px !important;
    letter-spacing: .055em !important;
    box-shadow: 0 6px 16px rgba(0,0,0,.18) !important;
  }
  [data-av-quick-actions] [data-av-action] > span:first-child {
    width: 24px !important;
    height: 24px !important;
  }
}

/* Live support launcher and window */
[data-av-support-launcher] { bottom: 24px !important; right: 24px !important; }
[data-av-support-launcher] > button {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  padding: 0 !important;
  overflow: visible !important;
  border-radius: 9999px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #f0143e, #b60023) !important;
  box-shadow: 0 12px 32px rgba(224,0,43,.38) !important;
  border: 1px solid rgba(255,255,255,.2);
}
[data-av-support-launcher] > button > svg {
  width: 23px !important;
  height: 23px !important;
  color: #fff !important;
}
[data-av-support-panel]:not([data-av-support-launcher]) {
  background: #fffaf7 !important;
  border-color: rgba(11,11,12,.12) !important;
  box-shadow: 0 28px 85px rgba(0,0,0,.38) !important;
}
[data-av-support-panel]:not([data-av-support-launcher]) > div:first-child {
  background: linear-gradient(135deg, #f0143e, #9f001f) !important;
}
[data-av-support-panel]:not([data-av-support-launcher]) button[class*="bg-green"] {
  background: linear-gradient(135deg, #c8102e, #9d0c25) !important;
}
[data-av-support-panel]:not([data-av-support-launcher]) input:focus {
  border-color: var(--av-red) !important;
  box-shadow: 0 0 0 3px rgba(200,16,46,.12) !important;
}
[data-av-support-panel]:not([data-av-support-launcher]) > div:last-child {
  background: #fffaf7 !important;
}
[data-av-support-panel]:not([data-av-support-launcher]) h4 { color: #171214 !important; }
[data-av-support-panel]:not([data-av-support-launcher]) input {
  color: #171214 !important;
  background: #fff !important;
  border-color: #dfd3d0 !important;
}

/* Footer */
body.av-premium footer {
  position: relative;
  background: linear-gradient(180deg, #100e0f, #070707) !important;
  border-top: 1px solid var(--av-line);
}
body.av-premium footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(780px, 78vw); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--av-red), transparent);
  box-shadow: 0 0 24px rgba(200,16,46,.42);
}
body.av-premium footer h4 { color: var(--av-ivory) !important; }
body.av-premium footer a { color: var(--av-muted) !important; }
body.av-premium footer a:hover { color: var(--av-ivory) !important; transform: translateX(2px); }

/* Nine promotional game/banner cards: 9 across desktop, 3 x 3 mobile */
[data-av-nine-grid] {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
[data-av-nine-grid] > div {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
[data-av-nine-grid] > div > div,
[data-av-nine-grid] > div > div > div {
  min-height: 0 !important;
  height: auto !important;
}
[data-av-nine-grid] img[alt="Banner"] {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4;
  object-fit: cover !important;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Login / registration Radix dialog */
body.av-premium [role="dialog"][class*="max-w-[440px]"] {
  width: min(440px, calc(100vw - 20px)) !important;
  max-width: 440px !important;
  min-width: 0 !important;
}
body.av-premium [role="dialog"][class*="max-w-[440px]"][data-state="open"] {
  animation: av-auth-fade .14s ease-out both !important;
}
[data-av-auth-dialog] {
  color: var(--av-ivory) !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(224,0,43,.16), transparent 16rem),
    linear-gradient(155deg, #171214 0%, #0c0b0c 72%) !important;
  border: 1px solid rgba(255,255,255,.11) !important;
  border-radius: 22px !important;
  box-shadow: 0 32px 90px rgba(0,0,0,.58), 0 0 0 1px rgba(224,0,43,.08) !important;
}
@keyframes av-auth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Six primary category banners — aligned 3 x 2 on desktop */
[data-av-hero] {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--av-hero-ratio, 16 / 5);
  max-height: none !important;
}
[data-av-hero] img[alt="Slide"] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
}
[data-av-category-shell] {
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
[data-av-category-shell] > .flex {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
[data-av-category-shell] > .flex > a:only-child,
[data-av-category-shell] > .flex > div:only-child {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}
[data-av-category-grid] {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 18px 0 0 !important;
  padding-inline: 0 !important;
  box-sizing: border-box !important;
  justify-content: stretch !important;
}
[data-av-category-grid] > a,
[data-av-category-grid] > div {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
[data-av-category-grid] img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 7;
  object-fit: cover !important;
}
@media (min-width: 768px) {
  [data-av-category-grid] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

/* Provider trust strip and Telegram promo */
.av-community-area {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 14px;
  margin: 22px 0 10px;
}
.av-provider-strip,
.av-telegram-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: 0 16px 38px rgba(0,0,0,.22);
}
.av-provider-strip { padding: 18px; }
.av-community-eyebrow {
  color: #ff3157;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.av-provider-strip h3,
.av-telegram-card h3 { margin: 4px 0 12px; color: #fff; font-size: 17px; font-weight: 750; }
.av-provider-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.av-sponsor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 94px;
  padding: 9px 6px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  background: rgba(11,11,12,.5);
}
.av-sponsor-item img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.28));
}
.av-sponsor-item span {
  color: #d9d2d4;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}
.av-telegram-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: radial-gradient(circle at 100% 0%, rgba(224,0,43,.2), transparent 13rem), linear-gradient(145deg, #171214, #0c0b0c);
}
.av-telegram-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex: 0 0 52px;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(145deg, #f0143e, #a90021);
  box-shadow: 0 12px 28px rgba(224,0,43,.28);
}
.av-telegram-icon svg { width: 25px; height: 25px; }
.av-telegram-card h3 { margin-bottom: 3px; }
.av-telegram-card p { margin: 0 0 10px; color: #aaa2a4; font-size: 11px; line-height: 1.5; }
.av-telegram-card a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
  border-radius: 999px;
  background: var(--av-red);
}
@media (max-width: 767px) {
  .av-community-area { grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
  .av-provider-strip, .av-telegram-card { border-radius: 16px; }
  .av-provider-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-sponsor-item { min-height: 86px; }
}
[data-av-auth-dialog] > div > div:first-child {
  background: rgba(11,11,12,.9) !important;
  border-color: rgba(255,255,255,.09) !important;
  backdrop-filter: blur(18px) !important;
}
[data-av-auth-dialog] h2 {
  color: #fff !important;
  letter-spacing: -.015em !important;
}
[data-av-auth-dialog] input:not([type="checkbox"]) {
  color: #fff !important;
  caret-color: var(--av-red) !important;
  background: rgba(255,253,252,.055) !important;
  border: 1px solid rgba(255,255,255,.11) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
}
[data-av-auth-dialog] input:not([type="checkbox"])::placeholder { color: rgba(255,253,252,.42) !important; }
[data-av-auth-dialog] input:not([type="checkbox"]):focus {
  border-color: rgba(224,0,43,.8) !important;
  box-shadow: 0 0 0 3px rgba(224,0,43,.15) !important;
  outline: none !important;
}
[data-av-auth-dialog] input[type="checkbox"] { accent-color: var(--av-red); }
[data-av-auth-dialog] form button[type="submit"],
[data-av-auth-dialog] > div > div:first-child button:first-of-type {
  color: #fff !important;
  background: linear-gradient(135deg, #f0143e, #bd0025) !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 26px rgba(224,0,43,.28) !important;
}
[data-av-auth-dialog] form button[type="submit"]:hover { filter: brightness(1.09); transform: translateY(-1px); }
[data-av-auth-dialog] form button[type="button"],
[data-av-auth-dialog] button:has(.lucide-message-circle) { color: #ff3157 !important; }
[data-av-auth-dialog] form + div,
[data-av-auth-dialog] form ~ div { border-color: rgba(224,0,43,.16) !important; }
[data-av-auth-dialog] .lucide-sparkles { color: #ff3157 !important; }
@media (max-width: 639px) {
  [data-av-auth-dialog] {
    width: calc(100% - 20px) !important;
    max-height: calc(100dvh - 18px) !important;
    border-radius: 20px !important;
  }
}
@media (min-width: 768px) {
  [data-av-nine-grid] {
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }
}

/* Hide the betting suggestion widget */
button[title="Bahis Öner"], [data-av-bet-suggestion] { display: none !important; }

/* Mobile bottom navigation */
.av-mobile-nav { display: none; }
@media (max-width: 767px) {
  body.av-premium { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  .av-mobile-nav {
    position: fixed;
    z-index: 58;
    left: 10px; right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 62px;
    padding: 6px;
    border: 1px solid transparent;
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(17,15,16,.98), rgba(5,5,6,.99)) padding-box,
      linear-gradient(110deg, #560011, #a90021 35%, #ff1747 50%, #9b001e 68%, #560011) border-box;
    background-size: 100% 100%, 220% 100%;
    background-position: 0 0, 100% 0;
    box-shadow: 0 16px 45px rgba(0,0,0,.48), 0 0 13px rgba(224,0,43,.18);
    backdrop-filter: blur(20px) saturate(140%);
    isolation: isolate;
    animation: av-nav-contour 12s linear infinite;
  }
  .av-mobile-nav::before {
    display: none !important;
  }
  .av-mobile-nav::after {
    display: none !important;
  }
  .av-mobile-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    color: #a9a2a4;
    font-size: 9px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    transition: color .2s, background .2s, transform .2s;
  }
  .av-mobile-nav a img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .72;
    transition: filter .2s, opacity .2s, transform .2s;
  }
  .av-mobile-nav a.is-active { color: #fff; background: var(--av-red-soft); }
  .av-mobile-nav a.is-active img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(13%) sepia(98%) saturate(6388%) hue-rotate(345deg) brightness(99%) contrast(111%);
    transform: translateY(-1px);
  }
  .av-mobile-nav a.is-active::before {
    content: "";
    position: absolute;
    top: 2px; width: 18px; height: 2px;
    border-radius: 9px;
    background: var(--av-red);
    box-shadow: 0 0 12px rgba(200,16,46,.9);
  }
  body.av-hide-mobile-nav .av-mobile-nav,
  body.av-support-open .av-mobile-nav,
  body.av-auth-open .av-mobile-nav { display: none !important; }
  body.av-hide-mobile-nav,
  body.av-support-open,
  body.av-auth-open { padding-bottom: 0 !important; }
  [data-av-support-launcher] { right: 16px !important; bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  [data-av-support-panel] { z-index: 70 !important; }
  [data-av-quick-actions] [data-av-action] { height: 42px !important; font-size: 12px !important; }
}

@keyframes av-nav-contour {
  from { background-position: 0 0, 100% 0; }
  to { background-position: 0 0, -100% 0; }
}

/* Preloader */
.av-preloader {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  background: #09090a;
  transition: opacity .45s ease, visibility .45s ease;
}
.av-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.av-preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.av-preloader__mark {
  width: min(230px, 58vw); height: 82px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 18px;
  background: transparent;
  filter: drop-shadow(0 18px 25px rgba(224,0,43,.25));
  animation: av-float 1.45s ease-in-out infinite;
}
.av-preloader__mark img {
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0;
  transition: opacity .22s ease;
}
.av-preloader__mark img.is-ready { opacity: 1; }
.av-preloader__bar { width: 126px; height: 3px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.09); }
.av-preloader__bar::after {
  content: ""; display: block; width: 50%; height: 100%;
  border-radius: inherit; background: linear-gradient(90deg, transparent, #ff1747, transparent);
  animation: av-load 1.05s ease-in-out infinite;
}
.av-preloader__text { color: #c8c1c3; font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
@keyframes av-load { from { transform: translateX(-110%); } to { transform: translateX(210%); } }
@keyframes av-float { 50% { transform: translateY(-5px); box-shadow: 0 24px 58px rgba(200,16,46,.4); } }

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