.ccs-overlay {
  --font-display: "Outfit", system-ui, -apple-system, sans-serif;
  --font-sans: "Outfit", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --easing-brand: cubic-bezier(0.16, 1, 0.3, 1);
  --ccs-green: #63ea71;
  --ccs-green-dark: #27b079;
  --ccs-green-deep: #08493c;

  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  box-sizing: border-box;
  overflow: auto;
  font-family: var(--font-sans);

  background:
    radial-gradient(90% 70% at 50% 0%, rgba(99, 234, 113, 0.1), transparent 60%),
    linear-gradient(160deg, rgba(15, 23, 38, 0.62), rgba(10, 15, 26, 0.72));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  opacity: 0;
  transition: opacity 0.22s var(--easing-brand);
}
.ccs-overlay.is-open {
  opacity: 1;
}

.ccs-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(120% 80% at 50% 40%, #000 30%, transparent 75%);
}

.ccs-modal {
  position: relative;
  width: 540px;
  max-width: calc(100vw - 40px);
  margin: auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 40px 90px -24px rgba(0, 0, 0, 0.55),
    0 12px 30px rgba(0, 0, 0, 0.22);
  padding: 28px 32px 30px;
  box-sizing: border-box;
  transform: translateY(10px) scale(0.985);
  transition: transform 0.26s var(--easing-brand);
}
.ccs-overlay.is-open .ccs-modal {
  transform: translateY(0) scale(1);
}

.ccs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  color: #5a606b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--easing-brand);
}
.ccs-close svg {
  width: 18px;
  height: 18px;
}
.ccs-close:hover {
  background: var(--ccs-green);
  color: var(--ccs-green-deep);
  border-color: var(--ccs-green);
  transform: rotate(90deg);
}

.ccs-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.04em;
  color: #0a0d12;
  margin: 4px 0 20px;
}

.ccs-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ccs-preview {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.ccs-stage {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.ccs-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ccs-card-wrap {
  position: relative;
}
.ccs-card-scale {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
}

.ccs-actions {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.ccs-urlbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 13px;
  transition: border-color 0.2s;
}
.ccs-urlbar:focus-within {
  border-color: var(--ccs-green);
}
.ccs-url {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #3a4049;
  padding: 8px 0;
  text-overflow: ellipsis;
}
.ccs-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ccs-green-deep);
  background: var(--ccs-green);
  border: 0;
  border-radius: 9px;
  padding: 9px 15px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.ccs-copy svg {
  width: 15px;
  height: 15px;
}
.ccs-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(99, 234, 113, 0.8);
}
.ccs-copy.ok {
  background: #d6f8db;
}

.ccs-socials {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ccs-tile {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  cursor: pointer;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: #4a505c;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.2s var(--easing-brand);
}
.ccs-ic {
  color: #5a606b;
  display: inline-flex;
  transition: color 0.2s, transform 0.2s;
}
.ccs-ic svg {
  width: 21px;
  height: 21px;
}
.ccs-tile:hover {
  border-color: var(--ccs-green);
  color: var(--ccs-green-dark);
  background: rgba(99, 234, 113, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(99, 234, 113, 0.7);
}
.ccs-tile:hover .ccs-ic {
  color: var(--ccs-green-dark);
  transform: scale(1.08);
}

.ccs-dl-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s, background 0.2s, filter 0.2s;
}
.ccs-dl-icon svg,
.ccs-dl-icon i {
  width: 16px;
  height: 16px;
}
.ccs-dl-icon:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.82);
}
.ccs-dl-icon:active {
  transform: scale(0.96);
}
.ccs-dl-icon.busy {
  filter: saturate(0.6);
  pointer-events: none;
}

@media (max-width: 560px) {
  .ccs-overlay {
    padding: 12px;
  }
  .ccs-modal {
    padding: 22px 16px 24px;
  }
  .ccs-preview {
    flex-direction: column;
  }
  .ccs-stage {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
  }
  .ccs-socials {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ccs-tile {
    flex: 1 1 28%;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    font-size: 12px;
  }
}
