/* ============ RESET ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============ CSS VARIABLES ============ */
:root {
  --bg-dark: #05080F;
  --bg-darker: #020308;
  --card-bg: rgba(15, 20, 35, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-active: #4A9EFF;
  --text-primary: #FFFFFF;
  --text-secondary: #8A94A6;
  --text-muted: #5A6478;
  --accent-blue: #A8CFFF;
  --accent-green: #4ADE80;
  --button-bg: #B8D4FF;
  --button-text: #0A0F1C;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Google Sans Flex', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: #020308;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body, button, input, textarea, select, h1, h2, h3, h4, h5, h6, p, span, a, li, div {
  font-family: 'Google Sans Flex', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

a { color: inherit; text-decoration: none; }

/* ============ CMS DYNAMIC PAGE ============ */
.cms-page { flex: 1; min-height: 60vh; }
.cms-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; gap: 16px; color: var(--text-secondary); }
.cms-spinner { width: 40px; height: 40px; border: 3px solid var(--card-border); border-top-color: var(--accent-blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cms-error { text-align: center; padding: 120px 24px; }
.cms-error h1 { font-size: 2rem; margin-bottom: 12px; }
.cms-error p { color: var(--text-secondary); margin-bottom: 24px; }
.cms-error a { color: var(--accent-blue); text-decoration: underline; }
.cms-empty { text-align: center; padding: 80px 24px; color: var(--text-secondary); }

/* ============ COOKIE CONSENT ============ */
.cc {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  pointer-events: none;
}
.cc-banner,
.cc-dialog { pointer-events: auto; }

.cc-banner {
  width: 521px;
  max-width: calc(100vw - 48px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(64px);
  -webkit-backdrop-filter: blur(64px);
  color: rgba(255, 255, 255, 0.85);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cc-banner[hidden] { display: none; }

.cc-banner__text {
  margin: 0;
  font-size: 18px;
  line-height: 1.44;
  letter-spacing: -0.02em;
}
.cc-banner__text a {
  color: #81C8FA;
  text-decoration: none;
  transition: color 0.2s;
}
.cc-banner__text a:hover { color: #a8dbff; }

.cc-banner__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.57;
  letter-spacing: -0.01em;
  text-align: center;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.cc-btn--primary {
  height: 40px;
  padding: 0 20px;
  background: #81C8FA;
  color: #020711;
  border: none;
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05);
}
.cc-btn--primary:hover { background: #9ad4ff; }
.cc-btn--secondary {
  height: 40px;
  padding: 0 20px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05);
}
.cc-btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}
.cc-btn--link {
  height: auto;
  padding: 0;
  background: transparent;
  color: #81C8FA;
  border: none;
}
.cc-btn--link:hover { color: #a8dbff; }

.cc-dialog {
  width: min(520px, calc(100vw - 48px));
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(64px);
  -webkit-backdrop-filter: blur(64px);
  color: rgba(255, 255, 255, 0.85);
  padding: 0;
}
.cc-dialog::backdrop { background: rgba(2, 7, 17, 0.6); }

.cc-dialog__content {
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cc-dialog__content h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}
.cc-dialog__content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.cc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  cursor: pointer;
}
.cc-toggle input[type="checkbox"] {
  width: 36px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.cc-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cc-toggle input[type="checkbox"]:checked { background: #81C8FA; }
.cc-toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }
.cc-toggle input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }

.cc-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .cc { right: 12px; bottom: 12px; left: 12px; }
  .cc-banner { width: auto; max-width: none; padding: 20px; gap: 20px; }
  .cc-banner__text { font-size: 16px; }
  .cc-banner__actions { flex-wrap: wrap; }
}
