/* ==========================================================================
   KHELV OFFICIAL (khelv-official.com) - Core Stylesheet
   Theme Matched to Khelv Official Badge & Competitor Analysis
   100/100 Lighthouse Performance & Fully Responsive PC/Mobile
   ========================================================================== */

:root {
  --p1: #3e44a9;
  --p2: #1c2063;
  --p3: #14122e;
  --acc: #629eff;
  --acc2: #1374ec;
  --gold: #f7c35c;
  --gold2: #feaa57;
  --red: #e92a23;
  --line: rgba(98, 158, 255, 0.35);
  --txt: #ffffff;
  --mut: #d4e8ff;
  --card1: rgba(28, 32, 99, 0.95);
  --card2: rgba(20, 18, 46, 0.95);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: linear-gradient(180deg, var(--p1) 0%, var(--p2) 38%, var(--p3) 100%) fixed;
  color: var(--txt);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
a:hover {
  color: #ffe29a;
}

/* Accessibility */
.screen-reader-text {
  position: absolute;
  top: -9999px;
  left: -9999px;
}
.skip-link:focus {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 99999;
  background: var(--gold);
  color: #000;
  padding: 10px 18px;
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
}

/* Container */
.kh-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.kh-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(28, 32, 99, 0.97), rgba(20, 18, 46, 0.97));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(10, 8, 30, 0.45);
}

.kh-hrow {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 70px;
}

.kh-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.kh-logo img {
  height: 48px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  border-radius: 10px;
}

.kh-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}
.kh-nav a {
  color: var(--mut);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  position: relative;
  padding: 8px 0;
}
.kh-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--acc), var(--gold));
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.kh-nav a:hover, .kh-nav a.active {
  color: #ffffff;
}
.kh-nav a:hover::after, .kh-nav a.active::after {
  transform: scaleX(1);
}

.kh-hbtn {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kh-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #2b0082, #16003c);
  border: 1px solid var(--line);
  transition: transform 0.2s ease;
  text-decoration: none;
}
.kh-ico:hover {
  transform: translateY(-2px);
  color: #fff;
}

.kh-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  min-height: 40px;
}
.kh-pill:hover {
  transform: translateY(-2px);
}
.kh-pill-login {
  color: #ffffff;
  border: 1.5px solid var(--acc);
  background: rgba(98, 158, 255, 0.12);
}
.kh-pill-login:hover {
  color: #ffffff;
  box-shadow: 0 0 18px rgba(98, 158, 255, 0.45);
}
.kh-pill-reg {
  color: #231500;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  box-shadow: 0 8px 18px rgba(247, 195, 92, 0.35);
}
.kh-pill-reg:hover {
  color: #231500;
  box-shadow: 0 10px 22px rgba(247, 195, 92, 0.55);
}

.kh-burger {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.kh-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Notice Bar with Marquee */
.kh-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 18px 10px;
  border-top: 1px solid rgba(98, 158, 255, 0.15);
}
.kh-npill {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: #231500;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.kh-nscroll {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.kh-nscroll div {
  display: inline-block;
  color: var(--mut);
  font-size: 13.5px;
  animation: khTick 32s linear infinite;
}
@keyframes khTick {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   Hero Section & Responsive Buttons
   ========================================================================== */
.kh-hero {
  max-width: 1100px;
  margin: 24px auto 28px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(10, 8, 30, 0.5);
  background: linear-gradient(180deg, var(--card1), var(--card2));
  text-align: center;
}

.kh-hero-img-wrap {
  padding: 26px 20px 10px;
  display: flex;
  justify-content: center;
}
.kh-hero-img-wrap img {
  width: 220px;
  height: 220px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  border: 2px solid var(--gold);
}
@media (min-width: 768px) {
  .kh-hero-img-wrap img {
    width: 250px;
    height: 250px;
  }
}

.kh-hero-body {
  padding: 10px 22px 30px;
}
.kh-hero h1 {
  font-size: 38px;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #ffffff 30%, #bcd6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.25;
}
@media (max-width: 600px) {
  .kh-hero h1 {
    font-size: 27px;
  }
}

.kh-offer {
  display: inline-block;
  margin: 6px auto 18px;
  padding: 6px 20px;
  border-radius: 999px;
  background: rgba(247, 195, 92, 0.14);
  border: 1px solid rgba(247, 195, 92, 0.5);
  color: #ffe3a3;
  font-weight: 700;
  font-size: 14.5px;
}

/* Responsive Button Layout: PC Row / Mobile Stack */
.kh-hero-btns {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin: 14px auto 20px;
  max-width: 820px;
}
.kh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  min-height: 50px;
  line-height: 1.2;
}
.kh-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.kh-btn:hover::after {
  left: 120%;
}
.kh-btn:hover {
  transform: translateY(-2px);
}

.kh-btn-main {
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  color: #231500;
  box-shadow: 0 10px 22px rgba(247, 195, 92, 0.35);
}
.kh-btn-main:hover {
  color: #231500;
  box-shadow: 0 14px 28px rgba(247, 195, 92, 0.55);
}

.kh-btn-alt {
  background: linear-gradient(135deg, var(--red), var(--acc2));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(19, 116, 236, 0.35);
}
.kh-btn-alt:hover {
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(19, 116, 236, 0.55);
}

.kh-btn-app {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.35);
}
.kh-btn-app:hover {
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.55);
}

/* Mobile responsive button adaptation */
@media (max-width: 680px) {
  .kh-hero-btns {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
  .kh-hero-btns .kh-btn {
    width: 100%;
    padding: 15px 22px;
    font-size: 15.5px;
    min-height: 50px;
  }
}

.kh-lead {
  max-width: 780px;
  margin: 14px auto 0;
  color: var(--mut);
  font-size: 15.5px;
  line-height: 1.7;
}

/* ==========================================================================
   Table of Specifications (.kh-table)
   ========================================================================== */
.kh-table-wrap {
  max-width: 1100px;
  margin: 24px auto;
  overflow-x: auto;
}
.kh-table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(180deg, var(--card1), var(--card2));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(10, 8, 30, 0.4);
}
.kh-table td {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(98, 158, 255, 0.16);
  font-size: 15px;
}
.kh-table tr:last-child td {
  border-bottom: none;
}
.kh-table td:first-child {
  width: 32%;
  font-weight: 700;
  color: #ffffff;
  background: rgba(98, 158, 255, 0.06);
  border-right: 1px solid rgba(98, 158, 255, 0.16);
}
.kh-table td:last-child {
  color: var(--mut);
}

/* ==========================================================================
   Feature Boxes (.kh-feat)
   ========================================================================== */
.kh-h {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin: 40px auto 14px;
  letter-spacing: 0.4px;
  text-align: center;
}
.kh-sub {
  text-align: center;
  color: var(--mut);
  max-width: 760px;
  margin: 0 auto 28px;
  font-size: 15.5px;
}

.kh-feat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 20px auto 40px;
}
@media (max-width: 920px) {
  .kh-feat {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .kh-feat {
    grid-template-columns: 1fr;
  }
}

.kh-feat-item {
  background: linear-gradient(180deg, var(--card1), var(--card2));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.kh-feat-item:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}
.kh-feat-ico {
  font-size: 32px;
  margin-bottom: 12px;
  display: inline-block;
}
.kh-feat-item h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}
.kh-feat-item p {
  color: var(--mut);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Content Blocks, Step Cards & Accordion FAQs
   ========================================================================== */
.kh-content-block {
  max-width: 1100px;
  margin: 28px auto;
  background: linear-gradient(180deg, var(--card1), var(--card2));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 14px 30px rgba(10, 8, 30, 0.4);
}
@media (max-width: 600px) {
  .kh-content-block {
    padding: 22px 18px;
  }
}
.kh-content-block h2 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}
.kh-content-block p {
  color: #eaf2ff;
  margin-bottom: 16px;
  font-size: 15.5px;
}
.kh-content-block ul, .kh-content-block ol {
  padding-left: 22px;
  margin-bottom: 18px;
  color: var(--mut);
}
.kh-content-block li {
  margin-bottom: 10px;
  line-height: 1.65;
}

.kh-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
  list-style: none;
  padding: 0;
}
@media (max-width: 900px) {
  .kh-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .kh-steps {
    grid-template-columns: 1fr;
  }
}
.kh-step-box {
  background: rgba(98, 158, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.kh-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  color: #231500;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 10px;
}
.kh-step-box h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 6px;
}
.kh-step-box p {
  color: var(--mut);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
}

/* Accordion FAQ */
.kh-faq {
  max-width: 1100px;
  margin: 20px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kh-faq-item {
  background: linear-gradient(180deg, var(--card1), var(--card2));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.kh-faq-item.active {
  border-color: var(--gold);
}
.kh-faq-q {
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 16.5px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
}
.kh-faq-icon {
  font-size: 20px;
  color: var(--gold);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 12px;
}
.kh-faq-item.active .kh-faq-icon {
  transform: rotate(45deg);
}
.kh-faq-a {
  display: none;
  padding: 0 22px 20px;
  color: var(--mut);
  font-size: 15px;
  line-height: 1.7;
  border-top: 1px solid rgba(98, 158, 255, 0.12);
}
.kh-faq-item.active .kh-faq-a {
  display: block;
}

/* ==========================================================================
   Footer & Floating Elements
   ========================================================================== */
.kh-footer {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.98), #09071c);
  border-top: 1px solid var(--line);
  padding: 40px 18px 30px;
  text-align: center;
}
.kh-flinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-bottom: 16px;
}
.kh-flinks a {
  color: var(--mut);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}
.kh-flinks a:hover {
  color: var(--gold);
}
.kh-copy {
  color: #aab8e0;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.kh-disc {
  max-width: 800px;
  margin: 14px auto 0;
  font-size: 12.5px;
  color: #8c9ac2;
  line-height: 1.6;
}

/* Floating Telegram & Toast */
.kh-tg {
  position: fixed;
  right: 18px;
  bottom: 74px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #38a4ff, #1374ec);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(19, 116, 236, 0.5);
  z-index: 70;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s;
}
@media (min-width: 960px) {
  .kh-tg {
    bottom: 22px;
  }
}
.kh-tg:hover {
  transform: scale(1.08);
  color: #fff;
}

/* Sticky Bottom Mobile Bar */
.kh-mbar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  padding-bottom: var(--safe-bottom);
  background: rgba(14, 12, 34, 0.98);
  border-top: 1px solid var(--line);
  z-index: 68;
  justify-content: space-around;
  align-items: center;
}
@media (min-width: 960px) {
  .kh-mbar {
    display: none;
  }
}
.kh-mitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--mut);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  gap: 2px;
  cursor: pointer;
  background: none;
  border: none;
  min-height: 48px;
  min-width: 48px;
  justify-content: center;
}
.kh-mitem.active, .kh-mitem:hover {
  color: var(--gold);
}
.kh-micon {
  font-size: 18px;
  line-height: 1;
}

/* Toast */
.kh-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(20, 18, 46, 0.96);
  border: 1px solid var(--gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.kh-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 960px) {
  .kh-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 18px 14px;
    background: var(--p3);
    border-bottom: 1px solid var(--line);
  }
  .kh-open .kh-nav {
    display: flex;
  }
  .kh-nav a {
    padding: 10px 0;
    width: 100%;
  }
  .kh-burger {
    display: block;
  }
  .kh-hbtn {
    margin-left: auto;
  }
}
@media (max-width: 600px) {
  .kh-hrow {
    gap: 8px;
    min-height: 62px;
  }
  .kh-logo img {
    height: 40px;
  }
  .kh-ico {
    display: none;
  }
  .kh-pill {
    padding: 6px 14px;
    font-size: 13px;
  }
  .kh-nav {
    top: 62px;
  }
}
