/* ============================================================
   CSGO-SKINS inspired layout — Team Spirit / donk palette
   ============================================================ */

:root {
  --ts-red: #8b121b;
  --ts-red-bright: #cc2222;
  --ts-red-glow: rgba(139, 18, 27, 0.45);
  --bg-app: #0e1018;
  --bg-panel: #151823;
  --bg-card: #1a1f2e;
  --bg-card-hover: #222838;
  --border: rgba(255, 255, 255, 0.06);
  --text-muted: #8f97aa;
  --header-h: 64px;
}

body.csgo-layout {
  font-family: "Barlow Condensed", sans-serif;
  background: var(--bg-app);
  padding-top: var(--header-h);
}

body.csgo-layout .overlay {
  background:
    radial-gradient(circle at 80% 0%, rgba(139, 18, 27, 0.18), transparent 45%),
    radial-gradient(circle at 10% 100%, rgba(139, 18, 27, 0.08), transparent 40%),
    var(--bg-app);
}

.csgo-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ── Sticky header ───────────────────────────────────────── */

.csgo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: rgba(10, 12, 18, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.csgo-logo img {
  height: 36px;
  width: auto;
}

.csgo-nav {
  display: flex;
  gap: 32px;
  flex: 1;
  justify-content: center;
}

.csgo-nav a {
  color: #c8cdd8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.csgo-nav a:hover {
  color: var(--ts-red-bright);
}

.csgo-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.csgo-socials {
  display: flex;
  gap: 10px;
}

.csgo-socials a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #6b7288;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s;
}

.csgo-socials a:hover {
  color: var(--ts-red-bright);
  border-color: rgba(139, 18, 27, 0.4);
}

.csgo-signin {
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--ts-red), #6b0e15);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.25s;
  white-space: nowrap;
}

.csgo-signin:hover {
  background: var(--ts-red-bright);
  box-shadow: 0 6px 24px var(--ts-red-glow);
}

.csgo-signin.is-logged-in {
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-width: 120px;
}

/* ── Live wins bar (csgo-skins ticker) ───────────────────── */

.csgo-livebar {
  margin: 16px 0 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  overflow: hidden;
  min-height: 54px;
}

.csgo-livebar .live-track {
  gap: 10px;
  min-height: 52px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.csgo-livebar .live-track::-webkit-scrollbar {
  display: none;
}

.csgo-livebar .drop-item {
  width: auto;
  min-width: 200px;
  height: 52px;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  gap: 10px;
  animation: none !important;
  flex-shrink: 0;
}

.csgo-livebar .drop-item img.drop-skin {
  width: 56px;
  height: 32px;
}

.csgo-livebar .drop-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.csgo-livebar .drop-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.csgo-livebar .drop-time {
  font-size: 10px;
  color: var(--text-muted);
}

.csgo-livebar .drop-case-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.85;
  flex-shrink: 0;
}

.csgo-livebar .drop-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.csgo-livebar .drop-avatar {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}

.csgo-livebar .drop-username {
  font-size: 11px;
  font-weight: 600;
  color: #b8becf;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Event banner ────────────────────────────────────────── */

.csgo-event {
  position: relative;
  margin-bottom: 28px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(139, 18, 27, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, #1a1220 0%, #12141c 100%);
  border: 1px solid rgba(139, 18, 27, 0.25);
  min-height: 200px;
}

.csgo-event__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
}

.csgo-event__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ts-red-bright);
  margin-bottom: 8px;
}

.csgo-event h1 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.csgo-event__desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 420px;
}

.csgo-event__stats {
  text-align: center;
}

.csgo-timer {
  font-family: "Oswald", sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 12px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.csgo-timer span {
  color: var(--ts-red-bright);
}

.csgo-cases-left {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.csgo-cases-left strong {
  display: block;
  font-size: 32px;
  color: #fff;
  font-family: "Oswald", sans-serif;
  letter-spacing: 1px;
}

.csgo-event__case {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.csgo-event__case img {
  width: 140px;
  height: auto;
  filter: drop-shadow(0 12px 30px rgba(139, 18, 27, 0.4));
  animation: caseFloat 4s ease-in-out infinite;
}

.csgo-event__donk {
  width: 120px !important;
  border-radius: 12px;
  border: 2px solid rgba(255, 49, 49, 0.35);
  animation: none !important;
}

.csgo-inventory {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #f0d060;
  cursor: pointer;
  transition: 0.2s;
}

.csgo-inventory:hover {
  border-color: rgba(255, 49, 49, 0.45);
  background: rgba(255, 49, 49, 0.12);
}

.csgo-inventory .wi {
  width: 20px;
  height: 20px;
}

.csgo-inventory__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff3131;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.csgo-inventory__timer {
  display: none;
}

.csgo-inventory.is-pending::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 2px solid rgba(240, 208, 96, 0.45);
  animation: bagPulse 2s ease-in-out infinite;
}

@keyframes bagPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.csgo-signin.is-disabled,
.login-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes caseFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── Section titles ──────────────────────────────────────── */

.csgo-section {
  margin-bottom: 36px;
}

.csgo-section-title {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--ts-red);
}

.csgo-section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: -10px 0 16px;
  padding-left: 15px;
}

/* ── Event help strip ────────────────────────────────────── */

.csgo-event-help {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  margin-bottom: 28px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.csgo-event-help__item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 220px;
}

.csgo-event-help__item img,
.csgo-event-help__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  background: rgba(139, 18, 27, 0.12);
  border-radius: 10px;
}

.csgo-event-help__item img {
  object-fit: contain;
}

.csgo-event-help__item h3 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.csgo-event-help__item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.csgo-event-help__cta {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--ts-red), #6b0e15);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: 0.25s;
}

.csgo-event-help__cta:hover {
  background: var(--ts-red-bright);
  box-shadow: 0 8px 24px var(--ts-red-glow);
}

/* ── Cases page title + section headers ──────────────────── */

.csgo-page-title {
  font-family: "Oswald", sans-serif;
  font-size: 32px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.csgo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.csgo-section-head .csgo-section-title {
  margin-bottom: 0;
}

.csgo-section-timer {
  font-family: "Oswald", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ts-red-bright);
  padding: 6px 14px;
  background: rgba(139, 18, 27, 0.15);
  border: 1px solid rgba(139, 18, 27, 0.3);
  border-radius: 6px;
}

.csgo-event-row-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 16px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(139, 18, 27, 0.25), transparent),
    var(--bg-card);
  border: 1px solid rgba(139, 18, 27, 0.2);
}

.csgo-event-row-banner__title {
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ts-red-bright);
}

.csgo-event-row-banner img {
  display: none;
}

.csgo-event-row-timer {
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

/* ── Limited offer cards ─────────────────────────────────── */

.csgo-limited-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.csgo-limited-card {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: 0.25s;
  background: var(--bg-panel);
}

.csgo-limited-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 18, 27, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.csgo-limited-card__banner {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.csgo-limited-card__price {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #f0c040;
  background: rgba(0, 0, 0, 0.5);
}

/* ── Gems cases ──────────────────────────────────────────── */

.csgo-gems-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.csgo-gem-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, rgba(139, 18, 27, 0.08), var(--bg-panel));
  border: 1px solid rgba(139, 18, 27, 0.2);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: 0.25s;
}

.csgo-gem-card:hover {
  transform: translateY(-5px);
  border-color: var(--ts-red-bright);
  box-shadow: 0 14px 36px var(--ts-red-glow);
}

.csgo-gem-card img {
  width: 100px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 8px 20px rgba(139, 18, 27, 0.3));
}

.csgo-gem-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.csgo-catalog-section {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.csgo-catalog-section:last-child {
  border-bottom: none;
}

/* ── Case cards row (csgo-skins style) ───────────────────── */

.csgo-case-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}

.csgo-case-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.csgo-case-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 18, 27, 0.45);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.csgo-case-tile--featured {
  border-color: rgba(139, 18, 27, 0.35);
  background: linear-gradient(180deg, rgba(139, 18, 27, 0.12), var(--bg-panel));
}

.csgo-case-tile__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--ts-red);
  color: #fff;
  text-transform: uppercase;
}

.csgo-case-tile img {
  width: 90px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 12px;
  transition: transform 0.3s;
}

.csgo-case-tile:hover img {
  transform: scale(1.08);
}

.csgo-case-tile h3 {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 8px;
}

.csgo-case-tile .price {
  font-size: 15px;
  font-weight: 800;
  color: #5dde8a;
}

.csgo-case-tile .price--free {
  color: #5dde8a;
}

.csgo-case-tile .price--paid {
  color: #f0c040;
}

/* ── Case opener block ───────────────────────────────────── */

.csgo-opener {
  margin-bottom: 40px;
  padding: 32px 24px 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
}

.csgo-opener .spin_header {
  width: 100%;
  background: none;
  border: none;
  min-height: auto;
}

.csgo-opener .spin {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.csgo-opener .top-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--ts-red-bright);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.csgo-opener #title {
  font-family: "Oswald", sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.csgo-opener .desc {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 24px;
}

.csgo-opener .spin_header {
  background: none !important;
  min-height: auto !important;
  padding: 0 !important;
}

.csgo-opener .spin {
  padding: 0 !important;
}

.csgo-opener .pointer {
  margin: 0 auto;
}

.csgo-opener .wheel-wrapper {
  margin: 0 auto;
}

.csgo-opener #spinBtn {
  margin-top: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ts-red), #6b0e15) !important;
  box-shadow: 0 10px 32px var(--ts-red-glow) !important;
}

.csgo-opener #spinBtn:hover {
  background: var(--ts-red-bright) !important;
}

/* ── Catalog / skin pool ─────────────────────────────────── */

.csgo-catalog .case-section {
  margin-top: 0;
}

.csgo-catalog .section-title {
  display: none;
}

.csgo-catalog .case-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.csgo-catalog .case-card {
  border-radius: 10px;
  min-height: 280px;
  padding: 16px;
}

.csgo-catalog .skin-image {
  height: 120px;
  margin-top: 16px;
}

.csgo-catalog .skin-name {
  font-size: 15px;
  margin-top: 12px;
}

/* ── Stats bar ───────────────────────────────────────────── */

.csgo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 32px 0;
}

.csgo-stat {
  background: var(--bg-panel);
  padding: 20px 16px;
  text-align: center;
}

.csgo-stat strong {
  display: block;
  font-family: "Oswald", sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.csgo-stat span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── FAQ compact ─────────────────────────────────────────── */

body.csgo-layout .faq_head {
  min-height: auto;
  background: transparent;
  padding: 20px 0 40px;
}

body.csgo-layout .faq h2 {
  font-size: clamp(36px, 6vw, 56px);
  margin-bottom: 40px;
}

body.csgo-layout .faq-question {
  font-size: clamp(18px, 3vw, 26px);
  height: auto;
  min-height: 64px;
  padding: 12px 0;
}

/* ── Footer ──────────────────────────────────────────────── */

body.csgo-layout .footer {
  margin-top: 0;
  border-top: 1px solid var(--border);
}

body.csgo-layout .footer-banner {
  background: linear-gradient(90deg, var(--ts-red), #6b0e15);
}

/* csgo-layout: always show content, don't wait for scroll-reveal */
body.csgo-layout [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

/* Case catalog images — never blow up */
body.csgo-layout .csgo-case-tile img,
body.csgo-layout .csgo-gem-card img,
body.csgo-layout .csgo-limited-card__banner,
body.csgo-layout .csgo-event-row-banner img {
  max-width: 100%;
}

/* ── Hide old layout blocks ──────────────────────────────── */

body.csgo-layout .hero,
body.csgo-layout .about-event,
body.csgo-layout .cases-counter,
body.csgo-layout .background,
body.csgo-layout .page > .bg,
body.csgo-layout .live-drop {
  display: none !important;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .csgo-nav {
    display: none;
  }

  .csgo-event__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .csgo-event__desc {
    margin: 0 auto;
  }

  .csgo-event__case {
    order: -1;
  }

  .csgo-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .csgo-header {
    padding: 0 14px;
  }

  .csgo-socials {
    display: none;
  }

  .csgo-case-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
