:root {
  --cc-page-bg: #161616;
  --cc-page-bg-soft: #1d1d1f;
  --cc-card-bg: #202124;
  --cc-card-bg-soft: #2a2b2f;
  --cc-card-bg-hover: #2d2f34;
  --cc-surface-soft: #2a2c31;
  --cc-surface-soft-2: #34363c;
  --cc-text: #f5f5f5;
  --cc-text-main: #e7e7e7;
  --cc-text-muted: #b8b8bc;
  --cc-text-soft: #9b9ca3;
  --cc-border: rgba(255, 255, 255, 0.08);
  --cc-border-strong: rgba(255, 255, 255, 0.14);
  --cc-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 2px 8px rgba(0, 0, 0, 0.22);
  --cc-shadow-hover:
    0 22px 48px rgba(0, 0, 0, 0.42),
    0 8px 18px rgba(0, 0, 0, 0.26);
  --cc-primary: #aa0000;
  --cc-primary-hover: #8f0000;
  --cc-primary-soft: rgba(170, 0, 0, 0.12);
  --cc-primary-soft-border: rgba(170, 0, 0, 0.22);
  --cc-primary-shadow: rgba(170, 0, 0, 0.28);
  --cc-success: #9ee6b1;
  --cc-success-bg: rgba(34, 197, 94, 0.14);
  --cc-success-border: rgba(34, 197, 94, 0.22);
  --cc-radius: 16px;
  --cc-radius-sm: 10px;
  --cc-radius-pill: 999px;
  --cc-z: 999999;
  --cc-font: "Work Sans", Arial, sans-serif;
  --cc-focus-ring:
    0 0 0 3px rgba(170, 0, 0, 0.18),
    0 0 0 6px rgba(170, 0, 0, 0.08);
}

.cc-hidden {
  display: none !important;
}

.cc-lock-scroll {
  overflow: hidden;
}

/* =========================================================
   BANNER
   ========================================================= */

.cc-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: var(--cc-z);
  max-width: 72rem;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--cc-card-bg) 0%, var(--cc-card-bg-soft) 100%);
  color: var(--cc-text);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  padding: 1rem;
  font-family: var(--cc-font);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cc-banner__inner {
  display: grid;
  gap: 1rem;
}

.cc-banner__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--cc-text);
}

.cc-banner__text {
  margin: 0;
  color: var(--cc-text-muted);
  line-height: 1.6;
  font-size: 0.96rem;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.cc-btn {
  appearance: none;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-pill);
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
  text-decoration: none;
}

.cc-btn:hover {
  transform: translateY(-1px);
}

.cc-btn:focus-visible {
  outline: none;
  box-shadow: var(--cc-focus-ring);
}

.cc-btn--primary {
  background: linear-gradient(180deg, var(--cc-primary) 0%, #8e0000 100%);
  color: #ffffff;
  border-color: var(--cc-primary);
  box-shadow:
    0 12px 24px var(--cc-primary-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cc-btn--primary:hover {
  background: linear-gradient(180deg, #b40000 0%, var(--cc-primary-hover) 100%);
  border-color: var(--cc-primary-hover);
}

.cc-btn--secondary {
  background: linear-gradient(180deg, var(--cc-surface-soft) 0%, var(--cc-surface-soft-2) 100%);
  color: var(--cc-text-main);
  border-color: var(--cc-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.cc-btn--secondary:hover {
  background: linear-gradient(180deg, var(--cc-card-bg-hover) 0%, var(--cc-surface-soft-2) 100%);
  border-color: var(--cc-border-strong);
}

.cc-btn--ghost {
  background: transparent;
  color: var(--cc-text);
  border-color: var(--cc-border);
}

.cc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--cc-border-strong);
}

/* =========================================================
   MODAL
   ========================================================= */

.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: calc(var(--cc-z) + 1);
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cc-modal {
  width: min(860px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--cc-card-bg) 0%, var(--cc-card-bg-soft) 100%);
  color: var(--cc-text);
  border: 1px solid var(--cc-border-strong);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow-hover);
  font-family: var(--cc-font);
}

.cc-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--cc-border);
}

.cc-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cc-text);
}

.cc-modal__close {
  background: linear-gradient(180deg, var(--cc-surface-soft) 0%, var(--cc-surface-soft-2) 100%);
  color: var(--cc-text);
  border: 1px solid var(--cc-border);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  margin: 0;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.cc-modal__close:hover {
  transform: translateY(-1px);
  border-color: var(--cc-primary-soft-border);
  background: linear-gradient(180deg, var(--cc-card-bg-hover) 0%, var(--cc-surface-soft-2) 100%);
}

.cc-modal__close:focus-visible {
  outline: none;
  box-shadow: var(--cc-focus-ring);
}

.cc-modal__body {
  padding: 1.25rem;
}

.cc-modal__intro {
  margin: 0 0 1rem;
  color: var(--cc-text-muted);
  line-height: 1.65;
}

/* =========================================================
   CATEGORIES
   ========================================================= */

.cc-category {
  background: linear-gradient(180deg, var(--cc-surface-soft) 0%, var(--cc-surface-soft-2) 100%);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-sm);
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.cc-category + .cc-category {
  margin-top: 0.9rem;
}

.cc-category__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.cc-category__title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cc-text);
}

.cc-category__desc {
  margin: 0;
  color: var(--cc-text-muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

.cc-category__status {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.9rem;
}

.cc-status--always {
  color: var(--cc-success);
}

/* =========================================================
   SWITCH
   ========================================================= */

.cc-switch {
  position: relative;
  width: 56px;
  height: 32px;
  flex: 0 0 auto;
}

.cc-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-switch__slider {
  position: absolute;
  inset: 0;
  background: #4a4d52;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.cc-switch__slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.cc-switch input:checked + .cc-switch__slider {
  background: linear-gradient(180deg, var(--cc-primary) 0%, #8e0000 100%);
  border-color: var(--cc-primary-soft-border);
}

.cc-switch input:checked + .cc-switch__slider::before {
  transform: translateX(24px);
}

.cc-switch input:focus-visible + .cc-switch__slider {
  box-shadow: var(--cc-focus-ring);
}

.cc-switch input:disabled + .cc-switch__slider {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0.1) 100%);
  border-color: var(--cc-success-border);
  cursor: not-allowed;
}

/* =========================================================
   MODAL FOOTER
   ========================================================= */

.cc-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0 1.25rem 1.25rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {
  .cc-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.9rem;
  }

  .cc-banner__actions,
  .cc-modal__footer {
    flex-direction: column;
  }

  .cc-btn {
    width: 100%;
    text-align: center;
  }

  .cc-category__row {
    flex-direction: column;
    align-items: stretch;
  }
}