/* CSP Builder — Ocean Blue theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0984E3;
  --primary-dim: rgba(9,132,227,0.12);
  --primary-glow: rgba(9,132,227,0.3);
  --secondary: #74B9FF;
  --accent: #FDCB6E;
  --accent-dim: rgba(253,203,110,0.12);
  --bg: #0A141A;
  --bg-card: #112028;
  --bg-input: #0B1218;
  --border: rgba(9,132,227,0.15);
  --border-focus: rgba(9,132,227,0.5);
  --text: #E2EEF5;
  --text-dim: #8BAEC0;
  --text-muted: #3D5A6E;
  --green: #00B894;
  --green-dim: rgba(0,184,148,0.12);
  --red: #E17055;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at top, rgba(9,132,227,0.04), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(17,32,40,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 800px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.preset-select { padding: 5px 8px; font-family: var(--font); font-size: 0.75rem; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; outline: none; cursor: pointer; }

.main { max-width: 800px; margin: 0 auto; padding: 20px; }

.directives { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.directive-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.directive-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.directive-name { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--primary); min-width: 130px; }
.directive-desc { font-size: 0.68rem; color: var(--text-muted); flex: 1; }
.directive-values { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.val-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; font-family: var(--mono); font-size: 0.68rem; border-radius: 3px; cursor: pointer; transition: all var(--transition); border: 1px solid var(--border); color: var(--text-muted); background: transparent; }
.val-chip.active { background: var(--primary-dim); border-color: var(--primary); color: var(--secondary); }
.val-chip:hover { border-color: var(--primary); }
.directive-custom { margin-top: 4px; }
.custom-input { width: 100%; padding: 4px 8px; font-family: var(--mono); font-size: 0.72rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; outline: none; }
.custom-input:focus { border-color: var(--border-focus); }

.output-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.btn-copy { background: none; border: 1px solid var(--border); color: var(--text-muted); padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 0.68rem; transition: all var(--transition); }
.btn-copy:hover { border-color: var(--primary); color: var(--primary); }
.output-code { padding: 12px 14px; font-family: var(--mono); font-size: 0.72rem; color: var(--green); line-height: 1.5; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
