/* ============================================
   CARSAR.DE — Auto-Konfigurator
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-dark: #07060b;
  --bg-card: #110f1a;
  --bg-card-hover: #1a1726;
  --bg-input: #0d0b14;
  --gold: #d4a843;
  --gold-light: #f0d060;
  --gold-dim: #8a7230;
  --text: #e8e2d6;
  --text-muted: #9a9490;
  --text-dim: #5e5955;
  --accent: #6b3fa0;
  --accent-light: #9b6fd0;
  --danger: #c0392b;
  --success: #27ae60;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --shadow-gold: 0 0 30px rgba(212,168,67,.12);
  --max-width: 1100px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- Background Pattern --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(107,63,160,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212,168,67,.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,6,11,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212,168,67,.1);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 40px;
  width: auto;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 5rem 0 3rem;
}
.hero-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212,168,67,.08);
  border: 1px solid rgba(212,168,67,.2);
  padding: .4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* --- Tool Section --- */
.tool {
  padding: 2rem 0 4rem;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid rgba(212,168,67,.1);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}
.control-group { flex: 1; min-width: 200px; }
.control-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.shift-display {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.shift-value {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 2.5rem;
  text-align: center;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  background: rgba(212,168,67,.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212,168,67,.4);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--gold);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
.mode-toggle button {
  flex: 1;
  padding: .65rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.mode-toggle button.active {
  background: rgba(212,168,67,.15);
  color: var(--gold);
}
.mode-toggle button:hover:not(.active) { color: var(--text); }

/* Text Areas */
.tool-io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.io-box { position: relative; }
.io-box label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.io-box textarea {
  width: 100%;
  min-height: 180px;
  padding: 1rem;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  resize: vertical;
  transition: border-color var(--transition);
}
.io-box textarea:focus {
  outline: none;
  border-color: rgba(212,168,67,.4);
}
.io-box textarea::placeholder { color: var(--text-dim); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-copy {
  background: rgba(212,168,67,.1);
  color: var(--gold);
  border: 1px solid rgba(212,168,67,.2);
}
.btn-copy:hover { background: rgba(212,168,67,.2); }
.btn-copy.copied { background: rgba(39,174,96,.15); color: var(--success); border-color: rgba(39,174,96,.3); }
.btn-clear {
  background: rgba(255,255,255,.05);
  color: var(--text-muted);
}
.btn-clear:hover { background: rgba(255,255,255,.1); color: var(--text); }

.tool-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.btn-brute {
  background: rgba(107,63,160,.15);
  color: var(--accent-light);
  border: 1px solid rgba(107,63,160,.25);
}
.btn-brute:hover { background: rgba(107,63,160,.25); }

/* Brute Force Results */
.brute-results {
  margin-top: 1.5rem;
  display: none;
}
.brute-results.visible { display: block; }
.brute-results h3 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.brute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: .75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: .5rem;
}
.brute-grid::-webkit-scrollbar { width: 4px; }
.brute-grid::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }
.brute-item {
  display: flex;
  gap: .75rem;
  padding: .75rem;
  background: rgba(255,255,255,.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  transition: var(--transition);
}
.brute-item:hover { background: rgba(212,168,67,.05); border-color: rgba(212,168,67,.15); }
.brute-shift {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-weight: 700;
  color: var(--gold);
  min-width: 2rem;
  text-align: center;
}
.brute-text {
  color: var(--text-muted);
  font-size: .875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Info Section (SEO Content) --- */
.info {
  padding: 4rem 0;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}
.info-card:hover {
  border-color: rgba(212,168,67,.15);
  transform: translateY(-2px);
}
.info-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.info-card h3 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: .75rem;
}
.info-card p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
}

/* --- Affiliate Section --- */
.affiliate {
  padding: 4rem 0;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: .5rem;
}
.section-header p { color: var(--text-muted); font-size: .95rem; }
.section-header .affiliate-note {
  font-size: .75rem;
  color: var(--text-dim);
  margin-top: .5rem;
}

.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.affiliate-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.affiliate-card:hover {
  border-color: rgba(212,168,67,.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}
.affiliate-emoji { font-size: 2.5rem; margin-bottom: 1rem; }
.affiliate-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .5rem;
}
.affiliate-card p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex: 1;
}
.affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  background: linear-gradient(135deg, rgba(212,168,67,.12), rgba(212,168,67,.06));
  border: 1px solid rgba(212,168,67,.25);
  border-radius: 100px;
  color: var(--gold);
  font-size: .85rem;
  font-weight: 600;
  transition: var(--transition);
}
.affiliate-link:hover {
  background: linear-gradient(135deg, rgba(212,168,67,.2), rgba(212,168,67,.1));
  color: var(--gold-light);
}
.affiliate-link svg { width: 14px; height: 14px; }

/* --- SEO Long Content --- */
.seo-content {
  padding: 4rem 0;
  border-top: 1px solid rgba(255,255,255,.04);
}
.seo-content article {
  max-width: 720px;
  margin: 0 auto;
}
.seo-content h2 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}
.seo-content h3 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.15rem;
  color: var(--gold);
  margin: 2rem 0 .75rem;
}
.seo-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: .95rem;
}
.seo-content .cipher-example {
  background: var(--bg-card);
  border: 1px solid rgba(212,168,67,.1);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  font-size: .9rem;
}
.seo-content .cipher-example .label {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: .25rem;
}
.seo-content .cipher-example .text { color: var(--gold); }

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(17,15,26,.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212,168,67,.15);
  padding: 1.25rem 1.5rem;
  display: none;
}
.cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cookie-inner p {
  font-size: .85rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 250px;
}
.cookie-inner p a { text-decoration: underline; }
.cookie-buttons { display: flex; gap: .75rem; }
.btn-cookie-accept {
  padding: .55rem 1.5rem;
  background: var(--gold);
  color: var(--bg-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-cookie-accept:hover { background: var(--gold-light); }
.btn-cookie-decline {
  padding: .55rem 1.5rem;
  background: rgba(255,255,255,.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-cookie-decline:hover { background: rgba(255,255,255,.1); }

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255,255,255,.05);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-brand {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: .5rem;
}
.footer-logo-img {
  height: 36px;
  width: auto;
  margin-bottom: .5rem;
}
.footer-tagline {
  font-size: .8rem;
  color: var(--text-dim);
}
.footer-links { display: flex; gap: 2rem; }
.footer-col h4 {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.footer-col a {
  display: block;
  font-size: .85rem;
  color: var(--text-dim);
  padding: .2rem 0;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.04);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom p {
  font-size: .75rem;
  color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--gold); }

/* --- Legal Pages --- */
.legal {
  padding: 4rem 0;
}
.legal h1 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 2rem;
}
.legal h2 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin: 2rem 0 .75rem;
}
.legal h3 {
  font-size: 1rem;
  color: var(--text);
  margin: 1.5rem 0 .5rem;
}
.legal p, .legal li {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.8;
  margin-bottom: .75rem;
}
.legal ul { padding-left: 1.5rem; list-style: disc; }
.legal a { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero { padding: 3rem 0 2rem; }
  .tool-card { padding: 1.25rem; }
  .tool-io { grid-template-columns: 1fr; }
  .tool-controls { flex-direction: column; align-items: stretch; }
  .brute-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(7,6,11,.97);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(212,168,67,.1);
  }
  .nav-hamburger { display: block; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 1.5rem; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .affiliate-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .affiliate-grid { grid-template-columns: 1fr; }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeInUp .6s ease-out both;
}
.fade-in-delay-1 { animation-delay: .1s; }
.fade-in-delay-2 { animation-delay: .2s; }
.fade-in-delay-3 { animation-delay: .3s; }
