/* === Farb-Variablen (Dark Mode default) === */
:root {
  --cc-bg: #0d1b2a;
  --cc-bg-alt: #11243a;
  --cc-accent: #2e5aac;
  --cc-accent-2: #5aa0ff;
  --cc-text: #e6ecf5;
  --cc-muted: #8ca3bc;
  --cc-border: #23364f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body.cc-body {
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, var(--cc-bg) 0%, #0f2135 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--cc-text);
  line-height: 1.5;
}

/* === Header === */
.cc-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--cc-bg);
  border-bottom: 1px solid var(--cc-border);
  z-index: 100;
}
.cc-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cc-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff; /* always white */
  font-weight: 700;
}
.cc-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-nav a,
.cc-nav .cc-btn {
  color: #fff; /* header links always white */
}

/* === Footer === */
.cc-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--cc-bg);
  border-top: 1px solid var(--cc-border);
}
.cc-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--cc-muted); /* gray depending on mode */
}
.cc-footer a {
  color: #fff; /* links always white */
  text-decoration: none;
}

/* === Buttons === */
.cc-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--cc-border);
  background: var(--cc-bg-alt);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cc-btn:hover { opacity: 0.9; }
.cc-btn:focus { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

/* Login button always blue */
.cc-btn-primary {
  background: linear-gradient(145deg, var(--cc-accent), var(--cc-accent-2));
  border: none;
  color: #fff;
}
.cc-btn-full { display: block; width: 100%; text-align: center; }

/* === Forms === */
.cc-form { display: grid; gap: 14px; margin-top: 16px; }
.cc-field { display: grid; gap: 6px; }
.cc-label { font-size: 14px; color: var(--cc-muted); }
.cc-input {
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--cc-border);
  background: var(--cc-bg-alt);
  color: var(--cc-text);
  transition: border 0.2s ease;
}
.cc-input:focus {
  border: 1px solid var(--cc-accent-2);
  outline: none;
}
.cc-input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

/* === Typography === */
h1, h2, h3 { font-weight: 800; margin-bottom: 10px; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin-bottom: 12px; }

/* === Login specific === */
.login {
  max-width: 420px;
  margin: 0 auto;
  padding: 60px 20px 100px;
}
.login h1 {
  margin-bottom: 20px;
  text-align: center;
}
.login .cc-form {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  width: 100%;
}
.login .cc-btn,
.login .cc-btn-primary {
  width: 100%;
  display: block;
  margin-top: 10px;
}
.login .login-hint {
  font-size: 14px;
  text-align: center;
  color: var(--cc-muted);
}
.login .login-hint a {
  color: var(--cc-accent-2);
  text-decoration: underline;
}

/* === Light Mode Overrides (header/footer always dark, links white) === */
@media (prefers-color-scheme: light) {
  :root {
    --cc-text: #1a1a1a;
    --cc-muted: #555;
    --cc-border: #d0d7e2;
  }

  body.cc-body {
    background: linear-gradient(180deg, #f7f9fc 0%, #e9eef5 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--cc-text);
  }

  .cc-input {
    background: #fff;
    color: var(--cc-text);
    border: 1px solid var(--cc-border);
  }

  .cc-btn {
    background: #fff;
    color: var(--cc-text);
    border: 1px solid var(--cc-border);
  }

  /* Login button stays blue */
  .cc-btn-primary {
    background: linear-gradient(145deg, var(--cc-accent), var(--cc-accent-2));
    color: #fff;
  }

  /* Header/Footer texts and links always white */
  .cc-brand,
  .cc-nav a,
  .cc-footer a {
    color: #fff !important;
  }
}