/* HTTP Header Security Grader — 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: #0a0a12;
  --bg-card: rgba(13, 13, 22, 0.92);
  --surface: rgba(28, 28, 45, 0.6);
  --border: rgba(59, 130, 246, 0.08);
  --text: #D8D8E4;
  --text-dim: #8888A0;
  --text-muted: #4A4A60;
  --green: #10B981;
  --yellow: #F59E0B;
  --orange: #F97316;
  --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(--green), var(--primary)); 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); }
.header-right { display: flex; gap: 8px; }

.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-sm { padding: 5px 10px; font-size: 11px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; text-decoration: underline; font-family: inherit; }

.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: 13px; outline: none;
}
.input:focus { border-color: var(--primary); }
.input-lg { font-size: 15px; padding: 12px 16px; }
.textarea { height: 100px; font-family: 'JetBrains Mono', monospace; font-size: 11px; resize: vertical; margin-top: 8px; }

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

.input-section { margin-bottom: 16px; }
.input-row { display: flex; gap: 8px; }
.input-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.grade-card {
  display: flex; align-items: center; gap: 20px; padding: 24px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px;
}
.grade-badge {
  width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: #fff;
  transition: all 0.5s ease;
}
.grade-A { background: linear-gradient(135deg, #10B981, #059669); }
.grade-B { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.grade-C { background: linear-gradient(135deg, #F59E0B, #D97706); }
.grade-D { background: linear-gradient(135deg, #F97316, #EA580C); }
.grade-F { background: linear-gradient(135deg, #EF4444, #DC2626); }
.grade-score { font-size: 24px; font-weight: 700; }
.grade-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.result-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.result-icon { font-size: 16px; flex-shrink: 0; }
.result-name { font-size: 12px; font-weight: 600; font-family: 'JetBrains Mono', monospace; min-width: 200px; }
.result-status { flex: 1; font-size: 11px; }
.status-pass { color: var(--green); }
.status-warn { color: var(--yellow); }
.status-fail { color: var(--red); }
.result-info { font-size: 10px; color: var(--text-muted); max-width: 250px; cursor: help; }

.config-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.config-panel h3 { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }
.config-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.config-tab {
  padding: 4px 12px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); font-size: 11px; cursor: pointer;
}
.config-tab.active { background: var(--primary); color: #fff; border-color: transparent; }
.config-code {
  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; overflow-x: auto; white-space: pre; color: var(--green);
}

.history-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.history-panel h3 { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }
.history-item { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; display: flex; justify-content: space-between; }
.history-item:last-child { border-bottom: none; }

.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) { .result-name { min-width: 120px; } .result-info { display: none; } }
