:root {
  --cc-page-bg: #0f1012;
  --cc-page-bg-soft: #16181b;
  --cc-card-bg: rgba(22, 24, 27, 0.96);
  --cc-card-bg-soft: rgba(28, 30, 34, 0.98);
  --cc-card-bg-hover: #23262b;
  --cc-surface-soft: #1a1d21;
  --cc-surface-soft-2: #22262b;

  --cc-text: #f4f4f2;
  --cc-text-main: #e8e8e5;
  --cc-text-muted: #b9bbb8;
  --cc-text-soft: #949793;

  --cc-border: rgba(255, 255, 255, 0.08);
  --cc-border-strong: rgba(255, 255, 255, 0.14);

  --cc-shadow:
    0 18px 40px rgba(0, 0, 0, 0.42),
    0 4px 16px rgba(0, 0, 0, 0.24);

  --cc-shadow-hover:
    0 26px 56px rgba(0, 0, 0, 0.48),
    0 8px 24px rgba(0, 0, 0, 0.28);

  --cc-primary: #9f1717;
  --cc-primary-hover: #b11b1b;
  --cc-primary-pressed: #861212;
  --cc-primary-soft: rgba(159, 23, 23, 0.12);
  --cc-primary-soft-border: rgba(159, 23, 23, 0.28);
  --cc-primary-shadow: rgba(159, 23, 23, 0.28);

  --cc-success: #8ee3ad;
  --cc-success-bg: rgba(34, 197, 94, 0.12);
  --cc-success-border: rgba(34, 197, 94, 0.18);

  --cc-radius: 18px;
  --cc-radius-md: 14px;
  --cc-radius-sm: 12px;
  --cc-radius-pill: 999px;

  --cc-z: 999999;
  --cc-font: "Work Sans", Arial, sans-serif;

  --cc-focus-ring:
    0 0 0 3px rgba(159, 23, 23, 0.18),
    0 0 0 6px rgba(159, 23, 23, 0.08);
}

#cc-root {
  font-family: var(--cc-font);
  color: var(--cc-text);
}

.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: 1100px;
  margin: 0 auto;
  color: var(--cc-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--cc-card-bg) 0%, var(--cc-card-bg-soft) 100%);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.cc-banner::before {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #5f0f0f 0%, var(--cc-primary) 38%, #d12a2a 100%);
}

.cc-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 1.5rem;
  align-items: end;
  padding: 1.2rem 1.25rem 1.25rem;
}

.cc-banner__title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cc-text);
}

.cc-banner__text {
  /* max-width: 68ch; */
  margin: 0;
  color: var(--cc-text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.7rem;
}

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

.cc-btn {
  appearance: none;
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  min-height: 44px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
  text-decoration: none;
}

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

.cc-btn:active {
  transform: translateY(0);
}

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

.cc-btn--primary {
  background: linear-gradient(180deg, var(--cc-primary-hover) 0%, var(--cc-primary) 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  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, #bc2121 0%, var(--cc-primary-hover) 100%);
}

.cc-btn--primary:active {
  background: var(--cc-primary-pressed);
}

.cc-btn--secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cc-text-main);
  border-color: var(--cc-border);
}

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

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

.cc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cc-text);
  border-color: rgba(255, 255, 255, 0.06);
}

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

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

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

.cc-modal {
  width: min(880px, 100%);
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--cc-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--cc-card-bg) 0%, var(--cc-card-bg-soft) 100%);
  border: 1px solid var(--cc-border-strong);
  border-radius: 22px;
  box-shadow: var(--cc-shadow-hover);
}

.cc-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--cc-border);
  background: rgba(255, 255, 255, 0.015);
}

.cc-modal__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cc-text);
}

.cc-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cc-text-main);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.cc-modal__close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cc-border-strong);
  color: var(--cc-text);
}

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

.cc-modal__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1.25rem;
}

.cc-modal__intro {
  margin: 0 0 1rem;
  max-width: 72ch;
  color: var(--cc-text-muted);
  line-height: 1.7;
  font-size: 0.96rem;
}

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

.cc-category {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-md);
  padding: 1rem 1rem;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

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

.cc-category:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}

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

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

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

.cc-category__status {
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cc-status--always {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border-radius: var(--cc-radius-pill);
  color: var(--cc-success);
  background: var(--cc-success-bg);
  border: 1px solid var(--cc-success-border);
}

/* =========================================================
   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;
  border-radius: 999px;
  background: #4a4d52;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

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

.cc-switch input:checked + .cc-switch__slider {
  background: linear-gradient(180deg, var(--cc-primary-hover) 0%, var(--cc-primary) 100%);
  border-color: var(--cc-primary-soft-border);
  box-shadow: 0 0 0 4px rgba(159, 23, 23, 0.08);
}

.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;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--cc-border);
  background: rgba(255, 255, 255, 0.015);
}

.cc-banner__meta {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--cc-text-soft);
}

.cc-modal__legal {
  margin: -0.2rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--cc-text-soft);
}

.cc-link {
  color: #d7d8dc;
  text-decoration: underline;
  text-decoration-color: rgba(170, 0, 0, 0.5);
  text-underline-offset: 0.18em;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease,
    opacity 0.2s ease;
}

.cc-link:hover {
  color: #ffffff;
  text-decoration-color: rgba(170, 0, 0, 0.9);
}

.cc-link:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: var(--cc-focus-ring);
}

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

@media (max-width: 820px) {
  .cc-banner__inner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .cc-banner__actions {
    justify-content: flex-start;
  }
}

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

  .cc-banner__inner {
    padding: 1rem;
    gap: 1rem;
  }

  .cc-banner__title {
    font-size: 1.05rem;
  }

  .cc-banner__text {
    font-size: 0.93rem;
  }

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

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

  .cc-modal {
    border-radius: 18px;
  }

  .cc-modal__header,
  .cc-modal__body,
  .cc-modal__footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cc-category {
    padding: 0.95rem;
  }

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

  .cc-switch {
    margin-top: 0.15rem;
  }
}