/* ===========================
   Theme · Developer Workspace
   =========================== */
:root{
  --bg: #1a202c;
  --panel: #2d3748;
  --panel-2: #232b3a;
  --text: #e2e8f0;
  --muted: #a0aec0;
  --accent: #00ffff;
  --danger: #ff6b6b;
  --success: #00ff9d;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --ring: 0 0 0 3px rgba(0,255,255,.25);
}

* { box-sizing: border-box; }
body{
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Editor chrome (VSCode vibes) */
.editor-chrome{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #10141b;
  border-bottom: 1px solid #0e131b;
  padding: .6rem 1rem;
}
.editor-chrome .traffic span{
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: 6px;
}
.editor-chrome .traffic span:nth-child(1){ background:#ff5f56; }
.editor-chrome .traffic span:nth-child(2){ background:#ffbd2e; }
.editor-chrome .traffic span:nth-child(3){ background:#27c93f; }
.tabs{ display:flex; gap:.5rem; }
.tab{ background:#161b24; color:var(--muted); border:1px solid #202636;
      padding:.35rem .7rem; border-radius:6px; font-size:.85rem; }
.tab.active{ color:var(--text); background:#1b2230; }

/* Header */
header{ text-align:center; padding: 2rem 1rem 1rem; }
h1{ margin:0; font-weight:800; }
.subtitle{ color: var(--muted); }

/* Layout */
.container{ max-width: 960px; margin: auto; padding: 2rem 1rem 4rem; }
.section-card{
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid #39455c;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.section-title{ margin-top:0; }

/* Buttons */
.btn{
  background: var(--accent);
  color: #0b1120;
  border: none;
  padding: .7rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,255,255,.2); }
.btn:disabled{ background:#4a5568; cursor:not-allowed; opacity:.6; }
.btn-outline{ background:transparent; color:var(--text); border:1px solid #425173; }

/* Dropdown */
.icon-right{ position:relative; padding-right:2rem; }
.chevron{
  position:absolute; right:.8rem; top:50%;
  width:10px; height:10px;
  border-right:2px solid #0b1120; border-bottom:2px solid #0b1120;
  transform:translateY(-50%) rotate(45deg);
  transition: transform .25s;
}
.dropdown{
  list-style:none; margin:.7rem 0 0; padding:0;
  border:1px solid #425173; border-radius:8px;
  background:#1b2331; overflow:hidden;
  max-height:0; opacity:0; transform:translateY(-4px);
  transition:max-height .35s, opacity .25s, transform .25s;
}
.dropdown li a{
  display:block; padding:.8rem 1rem; text-decoration:none; color:var(--text);
}
.dropdown li a:hover{ background:#2d3648; }
.dropdown.show{ max-height:400px; opacity:1; transform:translateY(0); }

/* Modal */
.modal-overlay[hidden]{ display:none; }
.modal-overlay{
  position:fixed; inset:0; display:grid; place-items:center;
  background:rgba(0,0,0,.6); backdrop-filter: blur(2px);
}
.modal{
  background: var(--panel); border:1px solid #425173;
  border-radius:12px; padding:1.5rem; max-width:500px; width:90%;
  animation: scaleIn .2s ease;
}
.modal-actions{ margin-top:1rem; text-align:right; }

/* Form */
form{ display:grid; gap:1rem; }
.field{ display:grid; gap:.4rem; }
input{
  padding:.8rem; border-radius:8px; border:1px solid #3a4764;
  background:#1b2331; color:var(--text); font-family:'Fira Code', monospace;
}
input:focus{ outline:none; box-shadow: var(--ring); }
input.valid{ border-color: var(--success); box-shadow:0 0 0 2px rgba(0,255,157,.2); }
input.invalid{ border-color: var(--danger); box-shadow:0 0 0 2px rgba(255,107,107,.2); }
.error{ color:var(--danger); font-size:.85rem; min-height:1.1em; }
.toast[hidden]{ display:none; }
.toast{ margin-top:.8rem; color:var(--success); }

/* Code sample */
.code-sample{
  background:#111723; border:1px solid #273149;
  padding:.7rem 1rem; font-family:'Fira Code', monospace;
  font-size:.9rem; border-radius:8px;
}

/* Animations */
@keyframes scaleIn{ from{transform:scale(.95);opacity:0;} to{transform:scale(1);opacity:1;} }
@keyframes shake{
  10%,90%{transform:translateX(-1px);} 20%,80%{transform:translateX(2px);}
  30%,50%,70%{transform:translateX(-4px);} 40%,60%{transform:translateX(4px);}
}
