:root {
  --cb-z-index: 10001; /* Above almost everything */
  --cb-bg: rgba(11, 13, 18, 0.85);
  --cb-border: rgba(255, 255, 255, 0.08);
  --cb-text: #ffffff;
  --cb-muted: #c7cfdb;
  --cb-accent: #068FFF;
  --cb-radius: 18px;
  --cb-font: Montserrat, system-ui, -apple-system, sans-serif;
}

#sylen-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1000px;
  background: var(--cb-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: var(--cb-z-index);
  font-family: var(--cb-font);
  color: var(--cb-text);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translate(-50%, 20px);
}

#sylen-cookie-banner.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.cb-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.cb-icon {
  font-size: 24px;
  background: linear-gradient(135deg, #4E4FEB, #FF91E4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cb-content {
  flex: 1;
}

.cb-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.cb-text {
  font-size: 14px;
  color: var(--cb-muted);
  line-height: 1.5;
  margin: 0;
}

.cb-text a {
  color: var(--cb-text);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
}

.cb-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  #sylen-cookie-banner {
    flex-direction: row;
    align-items: center;
  }
  .cb-actions {
    flex-shrink: 0;
    flex-direction: row;
  }
}

.cb-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .cb-btn {
    flex: initial;
  }
}

.cb-btn-primary {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.cb-btn-primary:hover {
  background: #e6e6e6;
  transform: translateY(-1px);
}

.cb-btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--cb-border);
}

.cb-btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}

.cb-btn-link {
  background: transparent;
  color: var(--cb-muted);
  border: 1px solid transparent;
  text-decoration: underline;
}

.cb-btn-link:hover {
  color: #fff;
}

/* Modal Preferences */
#sylen-cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: calc(var(--cb-z-index) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  padding: 20px;
}

#sylen-cookie-modal.visible {
  opacity: 1;
  visibility: visible;
}

.cb-modal-content {
  background: #0f1117; /* Matches --card */
  border: 1px solid var(--cb-border);
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  font-family: var(--cb-font);
  color: var(--cb-text);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#sylen-cookie-modal.visible .cb-modal-content {
  transform: scale(1);
}

.cb-modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--cb-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cb-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.cb-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--cb-muted);
  cursor: pointer;
  padding: 4px;
}

.cb-close-btn:hover {
  color: #fff;
}

.cb-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.cb-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cb-section:last-child {
  border-bottom: none;
}

.cb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cb-label {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-desc {
  font-size: 13px;
  color: var(--cb-muted);
  line-height: 1.4;
  margin: 0;
}

/* Toggle Switch */
.cb-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.cb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
}

.cb-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .cb-slider {
  background-color: var(--cb-accent);
}

input:disabled + .cb-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

input:checked + .cb-slider:before {
  transform: translateX(20px);
}

.cb-modal-footer {
  padding: 24px;
  border-top: 1px solid var(--cb-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0,0,0,0.2);
}

.cb-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: var(--cb-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
