:root{
  --bg: #0b0c10;
  --bg-alt: #111319;
  --card: #16181f;
  --card-2: #1b1e27;
  --border: #262a35;
  --text: #eef0f4;
  --muted: #9aa1b2;
  --accent: #6c5ce7;
  --accent2: #00d2b4;
  --danger: #ff5f56;
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #00d2b4 100%);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height:1.6;
  min-height:100vh;
}
a{color:inherit; text-decoration:none;}
ul{list-style:none;}
.container{max-width:1140px; margin:0 auto; padding:0 24px;}

/* Header */
header{
  position:sticky; top:0; z-index:100;
  background: rgba(11,12,16,0.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 0;
}
.logo{
  font-weight:800; font-size:1.3rem; letter-spacing:-0.5px;
  display:flex; align-items:center; gap:8px;
}
.logo span{
  background: var(--gradient);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.nav-links{
  display:flex; gap:28px;
}
.nav-links a{color:var(--muted); font-size:0.95rem; transition:color .2s;}
.nav-links a:hover, .nav-links a.active{color:var(--text);}
.nav-cta{
  display:flex; gap:12px; align-items:center;
}
.btn{
  display:inline-block;
  padding:10px 22px;
  border-radius:8px;
  font-weight:600;
  font-size:0.95rem;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  background:none;
  color:var(--text);
  font-family:inherit;
}
.btn:hover{transform:translateY(-1px);}
.btn:disabled{opacity:0.6; cursor:not-allowed; transform:none;}
.btn-primary{
  background: var(--gradient);
  color:#fff;
  box-shadow: 0 6px 18px rgba(108,92,231,0.35);
}
.btn-ghost{
  background:transparent;
  border-color:var(--border);
  color:var(--text);
}
.btn-sm{padding:7px 14px; font-size:0.85rem;}
.btn-lg{padding:14px 32px; font-size:1.05rem; border-radius:10px;}
.btn-block{width:100%; text-align:center;}
.menu-toggle{display:none; background:none; border:none; color:var(--text); font-size:1.5rem; cursor:pointer;}

/* Hero */
.hero{
  padding:100px 0 80px;
  text-align:center;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(circle at 50% 0%, rgba(108,92,231,0.25), transparent 60%);
  z-index:-1;
}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--card);
  border:1px solid var(--border);
  padding:6px 16px;
  border-radius:999px;
  font-size:0.85rem;
  color:var(--muted);
  margin-bottom:24px;
}
.badge .dot{width:8px; height:8px; border-radius:50%; background:var(--accent2); box-shadow:0 0 8px var(--accent2);}
.hero h1{
  font-size:3.2rem;
  font-weight:800;
  letter-spacing:-1.5px;
  max-width:820px;
  margin:0 auto 20px;
}
.hero h1 .grad, .grad-text{
  background: var(--gradient);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero p.lead{
  max-width:620px;
  margin:0 auto 36px;
  color:var(--muted);
  font-size:1.15rem;
}
.hero-ctas{
  display:flex; justify-content:center; gap:16px; margin-bottom:56px; flex-wrap:wrap;
}
.stats{
  display:flex; justify-content:center; gap:64px; flex-wrap:wrap;
}
.stat b{display:block; font-size:1.8rem; font-weight:800;}
.stat span{color:var(--muted); font-size:0.9rem;}

/* Page header (non-hero pages) */
.page-header{padding:64px 0 40px; text-align:center; border-bottom:1px solid var(--border); background: var(--bg-alt);}
.page-header .eyebrow{color:var(--accent2); font-weight:700; font-size:0.85rem; text-transform:uppercase; letter-spacing:1px;}
.page-header h1{font-size:2.4rem; font-weight:800; margin:12px 0 12px; letter-spacing:-1px;}
.page-header p{color:var(--muted); max-width:600px; margin:0 auto;}

/* Section generic */
section{padding:90px 0;}
.section-head{text-align:center; max-width:640px; margin:0 auto 56px;}
.section-head .eyebrow{
  color:var(--accent2); font-weight:700; font-size:0.85rem; text-transform:uppercase; letter-spacing:1px;
}
.section-head h2{font-size:2.2rem; font-weight:800; margin:12px 0 16px; letter-spacing:-1px;}
.section-head p{color:var(--muted);}

/* Features */
.features-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;
}
.feature-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:28px;
  transition:transform .2s ease, border-color .2s ease;
}
.feature-card:hover{transform:translateY(-4px); border-color:var(--accent);}
.feature-icon{
  width:48px; height:48px;
  border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background: var(--gradient);
  font-size:1.4rem;
  margin-bottom:18px;
}
.feature-card h3{font-size:1.1rem; margin-bottom:10px;}
.feature-card p{color:var(--muted); font-size:0.95rem;}

/* Code demo / windows */
.demo{
  background: var(--bg-alt);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.demo-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center;
}
.code-window{
  background:#0d0e13;
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
}
.code-window .bar{
  display:flex; gap:6px; padding:12px 16px; background:#15161c; border-bottom:1px solid var(--border);
  align-items:center;
}
.code-window .bar span.dotc{width:11px; height:11px; border-radius:50%; background:#3a3d47;}
.code-window .bar span.dotc:nth-child(1){background:#ff5f56;}
.code-window .bar span.dotc:nth-child(2){background:#ffbd2e;}
.code-window .bar span.dotc:nth-child(3){background:#27c93f;}
.code-window .bar .filename{margin-left:10px; font-size:0.8rem; color:var(--muted);}
.code-window pre{
  padding:22px; font-size:0.85rem; overflow-x:auto; color:#c9d1d9; font-family:"Cascadia Code", Consolas, monospace;
  margin:0;
}
.code-window code{white-space:pre;}
.kw{color:#ff7ab6;}
.fn{color:#82aaff;}
.str{color:#c3e88d;}
.com{color:#676e95;}
.num{color:#f78c6c;}
.demo-text ul{margin-top:20px;}
.demo-text li{
  display:flex; gap:12px; margin-bottom:14px; color:var(--muted);
}
.demo-text li::before{content:"✓"; color:var(--accent2); font-weight:800;}

/* Pricing */
.pricing-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; align-items:stretch;
}
.price-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:40px 32px;
  text-align:center;
  position:relative;
  display:flex; flex-direction:column;
}
.price-card.featured{
  background: linear-gradient(180deg, rgba(108,92,231,0.1), rgba(0,210,180,0.04));
  border:1px solid var(--accent);
  transform:scale(1.03);
}
.price-card .ribbon{
  position:absolute; top:-14px; left:50%; transform:translateX(-50%);
  background: var(--gradient);
  padding:6px 18px; border-radius:999px; font-size:0.8rem; font-weight:700;
  white-space:nowrap;
}
.price-card h3{font-size:1.2rem; margin-bottom:8px;}
.price{
  font-size:2.8rem; font-weight:800; margin:14px 0 4px;
}
.price span{font-size:1rem; color:var(--muted); font-weight:500;}
.price-card .sub{color:var(--muted); font-size:0.85rem; margin-bottom:24px;}
.price-card ul{text-align:left; margin-bottom:28px; flex-grow:1;}
.price-card li{
  display:flex; gap:10px; margin-bottom:14px; color:var(--text); font-size:0.92rem;
}
.price-card li.off{color:var(--muted);}
.price-card li::before{content:"✓"; color:var(--accent2); font-weight:800;}
.price-card li.off::before{content:"–"; color:var(--muted);}
.no-limit-note{
  text-align:center; margin-top:32px; color:var(--muted); font-size:0.9rem;
}
.compare-table{width:100%; border-collapse:collapse; margin-top:64px;}
.compare-table th, .compare-table td{
  padding:14px 16px; border-bottom:1px solid var(--border); text-align:left; font-size:0.92rem;
}
.compare-table th{color:var(--muted); font-weight:600;}
.compare-table td.center, .compare-table th.center{text-align:center;}
.compare-table .yes{color:var(--accent2); font-weight:700;}
.compare-table .no{color:var(--muted);}

/* FAQ */
.faq{max-width:760px; margin:0 auto;}
.faq-item{
  border-bottom:1px solid var(--border);
  padding:20px 0;
}
.faq-item summary{
  cursor:pointer; font-weight:600; font-size:1.05rem; list-style:none; display:flex; justify-content:space-between; align-items:center;
}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:"+"; font-size:1.4rem; color:var(--accent2); transition:transform .2s;}
.faq-item[open] summary::after{transform:rotate(45deg);}
.faq-item p{color:var(--muted); margin-top:12px;}

/* CTA band */
.cta-band{
  text-align:center;
  background: var(--gradient);
  border-radius:24px;
  padding:64px 32px;
  margin:0 24px;
}
.cta-band h2{font-size:2rem; font-weight:800; margin-bottom:14px; color:#fff;}
.cta-band p{margin-bottom:28px; opacity:0.9; color:#fff;}
.cta-band .btn-ghost{background:rgba(255,255,255,0.15); border-color:rgba(255,255,255,0.4); color:#fff;}
.cta-band .btn-primary{background:#fff; color:#111; box-shadow:none;}

footer{
  padding:48px 0 24px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:0.9rem;
}
.footer-grid{
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:24px; margin-bottom:32px;
}
.footer-cols{display:flex; gap:64px; flex-wrap:wrap;}
.footer-cols h4{color:var(--text); margin-bottom:14px; font-size:0.95rem;}
.footer-cols li{margin-bottom:10px;}
.footer-cols a:hover{color:var(--text);}
.footer-bottom{text-align:center; padding-top:24px; border-top:1px solid var(--border);}

/* Auth pages */
.auth-wrap{
  min-height:calc(100vh - 140px);
  display:flex; align-items:center; justify-content:center;
  padding:60px 20px;
}
.auth-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:40px;
  width:100%; max-width:420px;
}
.auth-card h1{font-size:1.6rem; font-weight:800; margin-bottom:6px;}
.auth-card p.sub{color:var(--muted); font-size:0.9rem; margin-bottom:28px;}
.auth-tabs{
  display:flex; background:var(--bg-alt); border:1px solid var(--border); border-radius:10px; padding:4px; margin-bottom:24px;
}
.auth-tab{
  flex:1; text-align:center; padding:9px 0; border-radius:8px; cursor:pointer; font-size:0.9rem; font-weight:600; color:var(--muted);
}
.auth-tab.active{background:var(--gradient); color:#fff;}
.form-group{margin-bottom:18px;}
.form-group label{display:block; font-size:0.85rem; margin-bottom:8px; color:var(--muted);}
.form-group input, .form-group select, .form-group textarea{
  width:100%; padding:12px 14px; border-radius:10px; border:1px solid var(--border);
  background: var(--bg-alt); color:var(--text); font-size:0.95rem; font-family:inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus{
  outline:none; border-color:var(--accent);
}
.form-row{display:flex; justify-content:space-between; align-items:center; font-size:0.85rem; margin-bottom:22px; color:var(--muted);}
.form-row a{color:var(--accent2);}
.checkbox-row{display:flex; align-items:center; gap:8px;}
.auth-alt{text-align:center; margin-top:24px; font-size:0.9rem; color:var(--muted);}
.auth-alt a{color:var(--accent2); font-weight:600;}
.alert{
  padding:12px 16px; border-radius:10px; font-size:0.85rem; margin-bottom:18px; display:none;
}
.alert.show{display:block;}
.alert-error{background:rgba(255,95,86,0.12); border:1px solid rgba(255,95,86,0.4); color:#ff9691;}
.alert-success{background:rgba(0,210,180,0.12); border:1px solid rgba(0,210,180,0.4); color:var(--accent2);}
.alert-info{background:rgba(110,140,255,0.12); border:1px solid rgba(110,140,255,0.4); color:#a8bcff;}

/* App / Generator workspace */
.app-shell{
  display:grid; grid-template-columns:260px 1fr; min-height:calc(100vh - 65px);
}
.sidebar{
  border-right:1px solid var(--border);
  background: var(--bg-alt);
  padding:24px 18px;
  display:flex; flex-direction:column; gap:24px;
}
.sidebar .user-box{
  display:flex; align-items:center; gap:10px;
  padding:12px; border:1px solid var(--border); border-radius:12px; background:var(--card);
}
.user-box .avatar{
  width:36px; height:36px; border-radius:50%; background:var(--gradient);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:0.9rem;
}
.user-box .meta{overflow:hidden;}
.user-box .meta b{display:block; font-size:0.85rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.user-box .meta span{font-size:0.75rem; color:var(--accent2);}
.sidebar-section h4{font-size:0.75rem; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:10px;}
.sidebar-section-head{display:flex; align-items:center; justify-content:space-between; gap:8px;}
.sidebar-section-head h4{margin-bottom:10px;}
.sidebar-section-head .btn{padding:4px 10px; font-size:0.75rem;}
.history-list li{
  padding:9px 10px; border-radius:8px; font-size:0.85rem; color:var(--muted); cursor:pointer; margin-bottom:4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.history-list li:hover{background:var(--card); color:var(--text);}
.usage-box{
  border:1px solid var(--border); border-radius:12px; padding:14px; background:var(--card); font-size:0.8rem; color:var(--muted);
}
.usage-box b{color:var(--accent2); display:block; font-size:0.95rem; margin-bottom:4px;}

.workspace{padding:32px 36px; overflow-y:auto;}
.workspace-head{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:24px; flex-wrap:wrap; gap:12px;}
.workspace-head h1{font-size:1.6rem; font-weight:800;}
.workspace-head p{color:var(--muted); font-size:0.9rem; margin-top:4px;}

.generator-grid{display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start;}
.panel{
  background:var(--card); border:1px solid var(--border); border-radius:16px; overflow:hidden;
}
.panel-head{
  padding:14px 18px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center;
}
.panel-head h3{font-size:0.9rem; font-weight:700;}
.panel-body{padding:18px;}
.toolbar{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px;}
.toolbar select{
  padding:8px 12px; border-radius:8px; border:1px solid var(--border); background:var(--bg-alt); color:var(--text); font-size:0.85rem;
}
textarea#prompt-input{
  width:100%; min-height:180px; resize:vertical; background:var(--bg-alt); border:1px solid var(--border);
  border-radius:10px; color:var(--text); padding:14px; font-size:0.92rem; font-family:inherit;
}
textarea#prompt-input:focus{outline:none; border-color:var(--accent);}
textarea#improvement-input{
  width:100%; min-height:84px; resize:vertical; background:var(--bg-alt); border:1px solid var(--border);
  border-radius:10px; color:var(--text); padding:14px; font-size:0.92rem; font-family:inherit;
}
textarea#improvement-input:focus{outline:none; border-color:var(--accent);}
.gen-actions{display:flex; justify-content:space-between; align-items:center; margin-top:14px;}
.hint-chips{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px;}
.chip{
  padding:6px 12px; border:1px solid var(--border); border-radius:999px; font-size:0.78rem; color:var(--muted); cursor:pointer;
}
.chip:hover{border-color:var(--accent); color:var(--text);}
.history-list li{display:flex; flex-direction:column; gap:6px; overflow:hidden;}
.history-list li strong{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.history-list .history-head{display:flex; align-items:center; gap:8px; min-width:0;}
.history-list .history-head strong{flex:1; min-width:0;}
.history-delete{
  flex:0 0 auto; background:none; border:none; padding:2px 4px; border-radius:6px;
  color:var(--muted); font-size:0.85rem; line-height:1; cursor:pointer; opacity:0; transition:opacity .15s, color .15s, background .15s;
}
.history-list li:hover .history-delete, .history-delete:focus-visible{opacity:1;}
.history-delete:hover{color:#ff5f56; background:rgba(255,95,86,0.12);}
.history-list li pre{margin:0; max-height:72px; overflow:hidden; color:var(--muted); font:0.7rem/1.35 "Cascadia Code", Consolas, monospace; white-space:pre-wrap; word-break:break-word;}

.output-area{min-height:340px; position:relative;}
.output-area pre{
  margin:0; padding:20px; font-size:0.85rem; font-family:"Cascadia Code", Consolas, monospace; color:#c9d1d9;
  min-height:300px; white-space:pre-wrap; word-break:break-word;
}
.output-placeholder{
  display:flex; flex-direction:column; align-items:center; justify-content:center; height:300px; color:var(--muted); text-align:center; gap:10px; padding:20px;
}
.output-placeholder .big-icon{font-size:2.2rem;}
.loading-dots{display:none; align-items:center; gap:6px; padding:20px; color:var(--muted); font-size:0.9rem;}
.loading-dots.show{display:flex;}
.loading-dots .d{width:7px; height:7px; border-radius:50%; background:var(--accent2); animation:blink 1.2s infinite ease-in-out;}
.loading-dots .d:nth-child(2){animation-delay:0.2s;}
.loading-dots .d:nth-child(3){animation-delay:0.4s;}
@keyframes blink{0%,80%,100%{opacity:0.2;} 40%{opacity:1;}}

.badge-lang{
  padding:4px 10px; border-radius:999px; background:var(--bg-alt); border:1px solid var(--border); font-size:0.75rem; color:var(--muted);
}
.token-note{margin-top:16px; font-size:0.8rem; color:var(--muted); display:flex; align-items:center; gap:6px;}
.token-note .dot2{width:7px; height:7px; border-radius:50%; background:var(--accent2);}

/* Datei-Upload im Generator */
.upload-zone{
  margin-top:12px; padding:12px; border:1px dashed var(--border); border-radius:10px;
  display:flex; flex-wrap:wrap; align-items:center; gap:10px; transition:border-color .15s, background .15s;
}
.upload-zone.dragover{border-color:var(--accent2); background:rgba(0,210,180,0.06);}
.upload-hint{font-size:0.78rem; color:var(--muted);}
.upload-file{
  display:flex; align-items:center; gap:8px; width:100%;
  font-size:0.82rem; color:var(--text);
  background:var(--card); border:1px solid var(--border); border-radius:8px; padding:6px 10px;
}
.upload-file span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.upload-remove{
  margin-left:auto; background:none; border:none; color:var(--muted);
  cursor:pointer; font-size:0.85rem; line-height:1; padding:2px 4px; border-radius:6px;
}
.upload-remove:hover{color:#ff5f56; background:rgba(255,95,86,0.12);}
.upload-error{display:none; width:100%; font-size:0.78rem; color:#ff9691;}

@media (max-width: 960px){
  .app-shell{grid-template-columns:1fr;}
  .sidebar{display:none;}
  .generator-grid{grid-template-columns:1fr;}
  .pricing-grid{grid-template-columns:1fr;}
  .price-card.featured{transform:none;}
}
@media (max-width: 860px){
  .nav-links{display:none;}
  .nav-links.open{
    display:flex; flex-direction:column; gap:16px;
    position:absolute; left:0; right:0; top:100%;
    background:rgba(11,12,16,0.98);
    border-bottom:1px solid var(--border);
    padding:16px 24px;
  }
  nav{position:relative;}
  .nav-cta{gap:8px;}
  .nav-cta .btn{padding:8px 14px; font-size:0.85rem;}
  .menu-toggle{display:block;}
  .hero h1{font-size:2.2rem;}
  .features-grid{grid-template-columns:1fr;}
  .demo-grid{grid-template-columns:1fr;}
  .stats{gap:32px;}
}

/* Usability refinements */
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(0, 210, 180, 0.45);
  outline-offset: 2px;
}
.workspace { max-width: 1440px; width: 100%; margin: 0 auto; }
.workspace-head h1 { font-size: 2rem; letter-spacing: 0; }
.workspace-head p { max-width: 620px; line-height: 1.5; }
.panel { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16); }
.panel-head { min-height: 58px; }
.panel-body { padding: 22px; }
textarea#prompt-input { min-height: 220px; line-height: 1.55; }
textarea#prompt-input::placeholder { color: #b4bac8; opacity: 1; }
.toolbar select { min-height: 42px; }
.chip { min-height: 34px; display: inline-flex; align-items: center; }
.gen-actions { gap: 16px; flex-wrap: wrap; }
.gen-actions .btn { min-height: 44px; }
.output-area pre { line-height: 1.65; }
.output-placeholder { min-height: 340px; }

@media (max-width: 960px) {
  .workspace { padding: 24px 20px; }
  .sidebar { display: flex; border-right: 0; border-bottom: 1px solid var(--border); padding: 16px 20px; }
  .sidebar-section { display: none; }
  .usage-box { max-width: 560px; }
  .app-shell { display: flex; flex-direction: column; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  nav { padding: 12px 0; }
  .workspace { padding: 20px 14px 32px; }
  .workspace-head { margin-bottom: 18px; }
  .workspace-head h1 { font-size: 1.55rem; }
  .workspace-head .badge { width: 100%; justify-content: center; margin-bottom: 0; }
  .panel-body { padding: 16px; }
  .gen-actions { align-items: stretch; }
  .gen-actions .token-note, .gen-actions .btn { width: 100%; }
  .gen-actions .btn { text-align: center; }
}
