/* OAuth URL Builder — style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #3B82F6;
  --bg: #0C0C14;
  --bg-card: rgba(14, 14, 24, 0.92);
  --surface: rgba(28, 28, 48, 0.5);
  --border: rgba(59, 130, 246, 0.08);
  --text: #D8D8E4;
  --text-dim: #8888A0;
  --text-muted: #4A4A60;
  --green: #10B981;
  --yellow: #F59E0B;
  --red: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--bg-card); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; height: 34px; background: linear-gradient(135deg, var(--primary), #60A5FA); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.header h1 { font-size: 15px; font-weight: 600; color: var(--text); }

.btn {
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-inline { background: none; border: none; cursor: pointer; font-size: 14px; position: absolute; right: 8px; top: 24px; opacity: 0.5; }
.btn-inline:hover { opacity: 1; }

.input {
  width: 100%; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 12px; outline: none;
}
.input:focus { border-color: var(--primary); }
.input.mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.input-sm { width: auto; padding: 6px 10px; }
.textarea { height: 60px; resize: vertical; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
select.input { cursor: pointer; }

.app-container { max-width: 800px; margin: 0 auto; padding: 16px; }

.section-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
}
.section-card h3 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim); margin-bottom: 12px; }

.field { margin-bottom: 10px; position: relative; }
.field label { display: block; font-size: 11px; font-weight: 500; color: var(--text-dim); margin-bottom: 4px; }
.field.full { flex: 1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.scope-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.scope-chip {
  display: flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 14px; background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.2);
  font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--primary);
}
.scope-chip-remove { cursor: pointer; opacity: 0.5; font-size: 10px; }
.scope-chip-remove:hover { opacity: 1; }
.scope-add { display: flex; gap: 6px; }

.url-output { position: relative; }
.url-preview {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.6;
  word-break: break-all; white-space: pre-wrap; max-height: 200px; overflow-y: auto;
  color: var(--green);
}
.url-length { float: right; font-size: 10px; font-weight: 400; font-family: 'JetBrains Mono', monospace; }
.url-length.warn { color: var(--yellow); }
.url-length.danger { color: var(--red); }
.url-actions { display: flex; gap: 8px; margin-top: 8px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 13px; color: var(--text);
  opacity: 0; transition: all 0.3s ease; z-index: 300; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }

@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
