/* Custom Variables */
:root {
  --background: #030405;
  --foreground: #ffffff;
  --primary: #d7dee8;
  --primary-rgb: 215, 222, 232;
  --ice: #7dd3fc;
  --ice-rgb: 125, 211, 252;
  --steel: #7f8a99;
  --panel: #090b0f;
  --panel-soft: #10141a;
  --line: rgba(215, 222, 232, 0.14);
  --metal-1: #f8fafc;
  --metal-2: #a7b0bf;
  --metal-3: #4b5563;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(var(--ice-rgb), 0.13), transparent 28rem),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.08), transparent 24rem),
    linear-gradient(135deg, #030405 0%, #070a0f 42%, #020203 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
  opacity: 0.18;
}

[data-i18n="hero.title"] {
  white-space: pre-line;
}

.dk-theme .text-primary {
  color: var(--primary) !important;
}

.dk-theme .bg-primary {
  background: linear-gradient(135deg, var(--metal-1) 0%, var(--metal-2) 48%, var(--metal-3) 100%) !important;
}

.dk-theme .border-primary {
  border-color: rgba(var(--primary-rgb), 0.72) !important;
}

.dk-theme .ring-primary\/30 {
  --tw-ring-color: rgba(var(--primary-rgb), 0.3) !important;
}

.dk-theme a.bg-primary,
.dk-theme button.bg-primary,
.dk-theme .bg-primary.text-white,
.dk-theme .group-hover\:bg-primary:hover {
  color: #050608 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,0.75);
}

/* ===== Announcement ticker ===== */
:root {
  --dk-ticker-h: 34px;
  --dk-ticker-speed: 38s;
  --dk-nav-h: 64px;
}

body.dk-theme {
  padding-top: var(--dk-ticker-h);
}

.dk-ticker {
  position: fixed;
  top: var(--dk-nav-h);
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--dk-ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
  color: #050608;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.dk-ticker-track {
  display: flex;
  width: max-content;
  animation: dk-ticker-scroll var(--dk-ticker-speed) linear infinite;
  will-change: transform;
}

.dk-ticker:hover .dk-ticker-track,
.dk-ticker:focus-within .dk-ticker-track {
  animation-play-state: paused;
}

.dk-ticker-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.dk-ticker-item,
.dk-ticker-sep {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dk-ticker-item {
  padding: 0 18px;
}

.dk-ticker-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #050608;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.dk-ticker-link:hover,
.dk-ticker-link:focus-visible,
.dk-theme .dk-ticker-link:hover {
  color: #050608;
  text-decoration: none;
  transform: none !important;
}

.dk-ticker-url {
  color: #5865f2;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0.02em;
}

.dk-ticker-sep {
  color: rgba(5, 6, 8, 0.35);
}

@keyframes dk-ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .dk-ticker-track {
    animation: none;
  }
}

@media (max-width: 640px) {
  :root {
    --dk-ticker-h: 30px;
    --dk-ticker-speed: 24s;
  }

  .dk-ticker-item,
  .dk-ticker-sep {
    font-size: 11px;
  }

  .dk-ticker-item {
    padding: 0 12px;
  }
}

.site-nav {
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.92), rgba(3, 4, 5, 0.78)) !important;
  border-color: var(--line) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.brand-logo img,
.site-footer img[alt="DK Scripts"] {
  filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.32));
}

.brand-logo:hover img {
  animation: logo-glint 1.8s ease both;
}

.nav-category-item {
  position: relative;
  padding: 8px 0;
}

.nav-category-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 2px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 800;
  transition: color .22s ease;
}

.nav-category-link:hover,
.nav-category-link.active {
  color: #fff;
}

.nav-category-link[data-nav-submenu-trigger] {
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.nav-category-link[data-nav-submenu-trigger]:hover,
.nav-category-link[data-nav-submenu-trigger].active,
.nav-category-item.open .nav-category-link[data-nav-submenu-trigger] {
  border-color: rgba(var(--primary-rgb), .36);
  background: rgba(255,255,255,.055);
}

.nav-subcategory-menu {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 60;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 7px;
  border: 1px solid rgba(var(--primary-rgb), .18);
  border-radius: 10px;
  background: rgba(8, 10, 13, .98);
  box-shadow: 0 18px 44px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity .18s ease, transform .18s ease;
}

.nav-category-item:hover .nav-subcategory-menu,
.nav-category-item:focus-within .nav-subcategory-menu,
.nav-category-item.open .nav-subcategory-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-subcategory-menu a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: #d7dee8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.055);
}

.nav-subcategory-menu a:hover,
.nav-subcategory-menu a.active {
  color: #050608;
  background: linear-gradient(135deg, var(--metal-1), var(--metal-2));
}

.language-switch {
  position: relative;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 86px;
  padding: 6px;
  border: 1px solid rgba(var(--primary-rgb), .18);
  border-radius: 10px;
  background: rgba(8, 10, 13, .98);
  box-shadow: 0 18px 44px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
}

.language-menu button,
.language-chip {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: #8b95a3;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.language-menu button:hover,
.language-menu button.active,
.language-chip.active {
  color: #050608;
  background: linear-gradient(135deg, var(--metal-1), var(--metal-2));
}

.language-switch.mobile {
  justify-content: space-between;
}

.language-switch.mobile .language-chip {
  width: auto;
  min-width: 44px;
  text-align: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.mobile-menu-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--primary-rgb), .2);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
}

.mobile-menu-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: 64px;
  z-index: 95;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  border-bottom: 1px solid rgba(var(--primary-rgb), .14);
  background:
    linear-gradient(180deg, rgba(9, 12, 16, .98), rgba(3, 4, 6, .98));
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
}

.mobile-menu-link,
.mobile-submenu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: #d7dee8;
  font-size: 14px;
  font-weight: 900;
  padding: 0 14px;
}

.mobile-menu-link.active,
.mobile-menu-link:hover,
.mobile-submenu-link.active,
.mobile-submenu-link:hover {
  color: #050608;
  background: linear-gradient(135deg, var(--metal-1), var(--metal-2));
}

.mobile-submenu-list {
  display: grid;
  gap: 8px;
  margin: -2px 0 6px 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(var(--primary-rgb), .22);
}

.mobile-submenu-link {
  min-height: 44px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

#desktop-session-container,
.session-login-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.music-hud {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 238px;
  flex: 0 0 auto;
  height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(8, 10, 13, .9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
  backdrop-filter: blur(10px);
}

.music-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  color: #d7dee8;
  background: rgba(255,255,255,.045);
}

.music-btn:hover {
  color: #050608;
  background: linear-gradient(135deg, var(--metal-1), var(--metal-2));
}

.music-play {
  color: #050608;
  background: linear-gradient(135deg, var(--metal-1), var(--metal-2));
}

.music-meta {
  min-width: 66px;
  max-width: 74px;
  display: grid;
  line-height: 1.05;
}

.music-meta span {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-meta small {
  margin-top: 3px;
  color: #7f8a99;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 62px;
  color: #7f8a99;
}

.music-volume input {
  width: 48px;
  height: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}

@media (max-width: 640px) {
  .site-nav {
    z-index: 90;
  }

  #desktop-session-container {
    display: none;
  }

  .site-nav .brand-logo .w-14 {
    width: 48px;
    height: 48px;
  }

  .site-nav .flex.items-center.justify-between.h-16 {
    gap: 10px;
  }

  .music-hud {
    top: auto !important;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    z-index: 60;
    max-width: 360px;
    margin: 0 auto;
    min-width: 0;
    justify-content: center;
  }

  .music-meta {
    min-width: 74px;
    max-width: 96px;
  }

  .music-volume {
    min-width: 58px;
  }

  .music-volume input {
    width: 44px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #030405;
}

::-webkit-scrollbar-thumb {
  background: #1a2029;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 7s cubic-bezier(.45,0,.25,1) infinite;
}

@keyframes logo-glint {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 10px rgba(var(--primary-rgb), 0.28)); }
  45% { transform: scale(1.07) rotate(-2deg); filter: drop-shadow(0 0 18px rgba(var(--primary-rgb), 0.65)) drop-shadow(0 0 32px rgba(var(--ice-rgb), 0.22)); }
  100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 12px rgba(var(--primary-rgb), 0.38)); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

main > section:first-child {
  animation: fade-up .55s ease both;
}

.product-card {
  transition: transform .35s ease, filter .35s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.hero-product::before,
.home-script-card::before,
.feature-card::before {
  display: none;
}

.hero-product:hover::before,
.home-script-card:hover::before,
.feature-card:hover::before {
  transform: none;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.015)),
    rgba(9, 11, 15, .74);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.trust-pill p {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.trust-pill span {
  color: #7f8a99;
  font-size: 11px;
  font-weight: 600;
}

.catalog-search {
  height: 40px;
}

.catalog-search-icon,
.catalog-search svg {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  z-index: 2;
  color: #657080;
  pointer-events: none;
  transform: translateY(-50%) !important;
}

.catalog-search input {
  height: 40px;
  line-height: 40px;
}

.feature-card,
.home-script-card {
  position: relative;
  overflow: hidden;
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(var(--primary-rgb), .1), transparent 18rem),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    var(--panel);
  box-shadow: 0 10px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.feature-card {
  min-height: 260px;
  padding: 28px;
}

.feature-card:hover,
.home-script-card:hover {
  transform: translateY(-7px);
  border-color: rgba(var(--primary-rgb), .42);
  box-shadow: 0 14px 38px rgba(0,0,0,.28);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .09);
  border: 1px solid rgba(var(--primary-rgb), .16);
  margin-bottom: 24px;
}

.feature-card h3 {
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  margin: 0 0 12px;
}

.feature-card p {
  color: #8b95a3;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.product-card > a {
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), .08), transparent 14rem),
    var(--panel) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.product-card > a:hover {
  border-color: rgba(var(--primary-rgb), .35) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
}

/* Glassmorphism utility */
.glass {
  background: rgba(9, 11, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}

.dk-theme .bg-\[\#0a0a0a\],
.dk-theme .bg-\[\#050505\],
.dk-theme .bg-\[\#070707\],
.dk-theme .bg-\[\#111\] {
  background-color: var(--panel) !important;
}

.dk-theme .border-white\/5,
.dk-theme .border-white\/10 {
  border-color: var(--line) !important;
}

.dk-theme input,
.dk-theme textarea {
  background: rgba(8, 10, 13, 0.92) !important;
}

.dk-theme .rounded-2xl,
.dk-theme .rounded-3xl {
  border-radius: 14px !important;
}

.dk-theme a,
.dk-theme button {
  transition-duration: .28s !important;
}

.dk-theme a:hover,
.dk-theme button:hover {
  transform: translateY(-1px);
}

.site-footer {
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.98), rgba(2, 3, 4, 1)) !important;
  border-color: var(--line) !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Marquee / Infinite Slider animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 60s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

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