*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b0f1a;
  --bg2: #121829;
  --card: #1b2236;
  --card2: #222d44;
  --accent: #6366f1;
  --accent2: #818cf8;
  --glow: rgba(99, 102, 241, 0.25);
  --red: #ef4444;
  --rbg: rgba(239, 68, 68, 0.12);
  --orange: #f59e0b;
  --obg: rgba(245, 158, 11, 0.12);
  --blue: #3b82f6;
  --bbg: rgba(59, 130, 246, 0.12);
  --green: #10b981;
  --gbg: rgba(16, 185, 129, 0.12);
  --cyan: #06b6d4;
  --cbg: rgba(6, 182, 212, 0.12);
  --t1: #f1f5f9;
  --t2: #94a3b8;
  --t3: #64748b;
  --brd: #2a3450;
  --brd2: #3a4a6b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  line-height: 1.5;
}

/* Background */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-blob {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.bg-blob-a {
  top: -200px;
  right: -150px;
  background: var(--accent);
}

.bg-blob-b {
  bottom: -200px;
  left: -150px;
  background: #7c3aed;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: 260px;
  background: rgba(18, 24, 41, 0.6);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--brd);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--t2);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--card);
  color: var(--t1);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
  color: var(--accent2);
  border-left: 3px solid var(--accent);
}

.nav-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

.main-content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  position: relative;
}

.wrapper {
  margin: 0 auto;
  padding: 24px 32px;
  max-width: 1200px;
}

.logo-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--glow);
  overflow: hidden;
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--t1);
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Stats */
.stat-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--t2);
}

.stat-chip strong {
  color: var(--accent2);
}

/* URL Section */
.url-section {
  max-width: 860px;
  margin: 14px auto 18px;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 16px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.url-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #7c3aed, var(--cyan));
}

.url-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.url-heading h2 {
  font-size: 1rem;
  font-weight: 700;
}

.new-badge {
  padding: 2px 8px;
  background: var(--cbg);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.url-form {
  display: flex;
  gap: 10px;
}

.url-field-wrap {
  flex: 1;
  position: relative;
}

.url-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.url-field {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--bg2);
  border: 2px solid var(--brd);
  border-radius: 12px;
  color: var(--t1);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.url-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.url-field::placeholder {
  color: var(--t3);
}

.url-go-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.url-go-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.url-go-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.url-options {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.url-opt-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--t2);
  cursor: pointer;
}

.url-opt-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.url-msg {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
}

.url-msg.is-loading {
  display: flex;
  background: var(--bbg);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.url-msg.is-ok {
  display: flex;
  background: var(--gbg);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.url-msg.is-fail {
  display: flex;
  background: var(--rbg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.spinner-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin-anim 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin-anim {
  to { transform: rotate(360deg); }
}

.url-hint {
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--t3);
}

/* Site Info */
.site-info-box {
  display: none;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.site-info-box.visible {
  display: block;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.info-cell {
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 10px;
}

.info-cell-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--t3);
  font-weight: 600;
  margin-bottom: 3px;
}

.info-cell-value {
  font-size: 0.85rem;
  font-weight: 600;
  word-break: break-all;
}

.info-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 1px;
}

.info-tag-green { background: var(--gbg); color: var(--green); }
.info-tag-red { background: var(--rbg); color: var(--red); }
.info-tag-blue { background: var(--bbg); color: var(--blue); }

/* Main Grid */
.main-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.view-hidden {
  display: none !important;
}

.single-col {
  grid-template-columns: 1fr !important;
}

@media (max-width: 1060px) {
  .main-columns { grid-template-columns: 1fr; }
  .url-form { flex-direction: column; }
}

/* Panel / Card */
.panel {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 14px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--brd);
}

.panel-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head h3 {
  font-size: 0.88rem;
  font-weight: 700;
}

.panel-body {
  padding: 16px 18px;
}

/* Controls */
.ctrl-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.select-wrap {
  position: relative;
  flex: 1;
  min-width: 120px;
}

.select-wrap select {
  width: 100%;
  padding: 8px 30px 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 8px;
  color: var(--t1);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s;
}

.select-wrap select:focus {
  border-color: var(--accent);
}

.select-wrap::after {
  content: "\25BE";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  pointer-events: none;
  font-size: 0.8rem;
}

/* Editor */
.editor-shell {
  border: 1px solid var(--brd);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.editor-shell:focus-within {
  border-color: var(--accent);
}

.editor-bar {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.25);
  gap: 5px;
}

.editor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: var(--red); }
.dot-yellow { background: var(--orange); }
.dot-green { background: var(--green); }

.editor-filename {
  margin-left: 8px;
  font-size: 0.7rem;
  color: var(--t3);
  font-family: Consolas, "Courier New", monospace;
}

.editor-body {
  position: relative;
}

.line-nums {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 36px;
  padding: 10px 4px 10px 0;
  text-align: right;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--t3);
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.code-highlight {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 10px 12px 10px 44px;
  background: var(--bg2);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  tab-size: 2;
}

.code-highlight code[class*="language-"],
.code-highlight pre[class*="language-"] {
  font-family: Consolas, "Courier New", monospace !important;
  font-size: 0.8rem !important;
  line-height: 1.65 !important;
  text-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.code-area {
  position: relative;
  width: 100%;
  min-height: 300px;
  padding: 10px 12px 10px 44px;
  background: transparent;
  color: transparent;
  caret-color: var(--t1);
  border: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  tab-size: 2;
  white-space: pre;
  overflow-x: auto;
  z-index: 2;
}

.code-area::selection {
  background: rgba(99, 102, 241, 0.3);
  color: transparent;
}

.code-area::placeholder {
  color: var(--t3);
}

/* Buttons */
.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  flex: 1;
  justify-content: center;
  box-shadow: 0 4px 12px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--glow);
}

.btn-ghost {
  background: var(--bg2);
  color: var(--t2);
  border: 1px solid var(--brd);
}

.btn-ghost:hover {
  background: var(--card2);
  color: var(--t1);
}

.btn-small {
  padding: 5px 12px;
  font-size: 0.74rem;
  border-radius: 6px;
}

/* Templates */
.tpl-heading {
  font-size: 0.74rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 14px 0 7px;
  font-weight: 600;
}

.tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

@media (max-width: 600px) {
  .tpl-grid { grid-template-columns: 1fr; }
}

.tpl-btn {
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  text-align: left;
  font-family: inherit;
  color: var(--t1);
}

.tpl-btn:hover {
  background: var(--card2);
  border-color: var(--accent);
}

.tpl-btn-name {
  font-size: 0.77rem;
  font-weight: 600;
  display: block;
}

.tpl-btn-desc {
  font-size: 0.65rem;
  color: var(--t3);
  display: block;
  margin-top: 1px;
}

/* Overlay */
.scan-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.88);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.scan-overlay.active {
  display: flex;
}

.scan-overlay-inner {
  text-align: center;
}

.scan-rings {
  width: 100px;
  height: 100px;
  margin: 0 auto 18px;
  position: relative;
}

.scan-ring {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
}

.scan-ring-1 {
  width: 100%;
  height: 100%;
  border-top-color: var(--accent);
  animation: spin-anim 1s linear infinite;
}

.scan-ring-2 {
  width: 72%;
  height: 72%;
  top: 14%;
  left: 14%;
  border-right-color: #7c3aed;
  animation: spin-anim 1.4s linear infinite reverse;
}

.scan-ring-3 {
  width: 44%;
  height: 44%;
  top: 28%;
  left: 28%;
  border-bottom-color: var(--cyan);
  animation: spin-anim 1.8s linear infinite;
}

.scan-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  overflow: hidden;
}

.scan-center-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scan-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.scan-sublabel {
  font-size: 0.78rem;
  color: var(--t3);
}

.scan-progress {
  width: 200px;
  height: 4px;
  background: var(--card);
  border-radius: 4px;
  margin: 14px auto 0;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c3aed, var(--cyan));
  border-radius: 4px;
  width: 0;
  transition: width 0.3s;
}

/* Results */
.results-wrap {
  min-height: 300px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .summary-row { grid-template-columns: repeat(2, 1fr); }
}

.summary-box {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--brd);
}

.summary-box-critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), transparent);
  border-color: rgba(239, 68, 68, 0.2);
}

.summary-box-high {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent);
  border-color: rgba(245, 158, 11, 0.2);
}

.summary-box-medium {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), transparent);
  border-color: rgba(59, 130, 246, 0.2);
}

.summary-box-low {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), transparent);
  border-color: rgba(16, 185, 129, 0.2);
}

.summary-num {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.summary-box-critical .summary-num { color: var(--red); }
.summary-box-high .summary-num { color: var(--orange); }
.summary-box-medium .summary-num { color: var(--blue); }
.summary-box-low .summary-num { color: var(--green); }

.summary-txt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 3px;
  color: var(--t2);
}

/* Score */
.score-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  margin-bottom: 14px;
}

.score-circle {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.score-circle svg {
  transform: rotate(-90deg);
}

.score-track {
  fill: none;
  stroke: var(--brd);
  stroke-width: 6;
}

.score-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  font-weight: 900;
}

.score-details h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.score-details p {
  font-size: 0.78rem;
  color: var(--t2);
}

/* Chart */
.chart-box {
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  margin-bottom: 14px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 80px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transition: height 0.8s ease;
}

.chart-bar-label {
  font-size: 0.58rem;
  color: var(--t3);
  text-transform: uppercase;
  font-weight: 600;
}

.chart-bar-val {
  font-size: 0.7rem;
  font-weight: 700;
}

/* Filter Tabs */
.filter-row {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 4px 10px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--t1);
  background: var(--card2);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Vulnerability Items */
.vuln-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vuln-card {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s;
}

.vuln-card:hover {
  border-color: var(--brd2);
}

.vuln-card-head {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 8px;
}

.sev-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.sev-critical { background: var(--rbg); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.3); }
.sev-high { background: var(--obg); color: var(--orange); border: 1px solid rgba(245, 158, 11, 0.3); }
.sev-medium { background: var(--bbg); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.3); }
.sev-low { background: var(--gbg); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); }

.vuln-card-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.84rem;
}

.vuln-card-line {
  font-size: 0.68rem;
  color: var(--t3);
  font-family: Consolas, "Courier New", monospace;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.vuln-card-arrow {
  color: var(--t3);
  font-size: 0.7rem;
  transition: transform 0.3s;
}

.vuln-card.open .vuln-card-arrow {
  transform: rotate(180deg);
}

.vuln-card-body {
  display: none;
  padding: 0 14px 12px;
  border-top: 1px solid var(--brd);
}

.vuln-card.open .vuln-card-body {
  display: block;
  padding-top: 10px;
}

.vuln-desc {
  font-size: 0.8rem;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 8px;
}

.code-sample {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--brd);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.74rem;
  margin-bottom: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-sample-label {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  display: block;
}

.code-sample-bad { border-left: 3px solid var(--red); }
.code-sample-good { border-left: 3px solid var(--green); }
.label-bad { color: var(--red); }
.label-good { color: var(--green); }

.vuln-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.vuln-tag {
  padding: 2px 7px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  font-size: 0.64rem;
  color: var(--accent2);
  font-weight: 500;
}

/* Empty / Celebration */
.empty-box {
  text-align: center;
  padding: 40px 16px;
}

.empty-box-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty-box h3 {
  font-size: 1rem;
  color: var(--t2);
  margin-bottom: 4px;
}

.empty-box p {
  font-size: 0.8rem;
  color: var(--t3);
  max-width: 260px;
  margin: 0 auto;
}

.celebrate {
  text-align: center;
  padding: 30px 16px;
}

.celebrate-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  display: inline-block;
  animation: bounce-anim 1s ease infinite;
}

@keyframes bounce-anim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.celebrate h3 {
  color: var(--green);
  font-size: 1.05rem;
  margin-bottom: 3px;
}

.celebrate p {
  color: var(--t2);
  font-size: 0.82rem;
}

.export-btns {
  display: flex;
  gap: 6px;
}

/* Toast */
.toast-area {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast-item {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  animation: toast-slide 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.toast-ok { background: var(--green); }
.toast-err { background: var(--red); }
.toast-info { background: var(--accent); }

@keyframes toast-slide {
  from { transform: translateX(60px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--brd2); border-radius: 3px; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  display: flex;
  opacity: 1;
}
.modal-content {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 14px;
  width: 90%;
  max-width: 480px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--brd);
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t1);
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--t3);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--red);
}
.modal-body {
  padding: 20px;
}
.settings-group {
  margin-bottom: 16px;
}
.settings-group h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--brd);
  font-size: 0.85rem;
  color: var(--t1);
  cursor: pointer;
  transition: border-color 0.2s;
}
.setting-item:hover {
  border-color: var(--brd2);
}
.setting-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

@media (max-width: 600px) {
  .logo-title { font-size: 1.3rem; }
  .code-area { min-height: 180px; font-size: 0.72rem; }
  .wrapper { padding: 8px; }
}

@media (max-width: 860px) {
  .app-layout { flex-direction: column; }

  /* Hamburger butonu - sadece mobilde gorunsun */
  .hamburger-btn {
    display: flex !important;
  }

  .sidebar {
    width: 100%;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--brd);
    overflow: hidden;
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 0;
    border-bottom: none;
  }

  /* Nav varsayilan olarak kapali */
  .sidebar-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    flex-direction: column;
    padding: 0 16px;
    gap: 4px;
    border-top: none;
  }

  /* Acik hali */
  .sidebar.nav-open .sidebar-nav {
    max-height: 600px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--brd);
  }

  .sidebar.nav-open .sidebar-header {
    border-bottom: none;
  }

  /* Hamburger ikonunu X'e cevir */
  .sidebar.nav-open .hamburger-btn .ham-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .sidebar.nav-open .hamburger-btn .ham-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .sidebar.nav-open .hamburger-btn .ham-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-content { height: auto; overflow-y: visible; }
  .wrapper { padding: 12px 16px; }
}

/* Hamburger butonu - masaustunde gizli */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.hamburger-btn:hover { background: var(--card2); }
.ham-line {
  width: 20px;
  height: 2px;
  background: var(--t1);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Coklu Sekme (Tab) Sistemi */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 12px;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.tab-bar::-webkit-scrollbar { height: 3px; }

.tab-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}
.tab-item:hover { background: var(--card2); color: var(--t1); }
.tab-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), transparent);
  border-color: var(--accent);
  color: var(--accent2);
}
.tab-close {
  font-size: 0.9rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 0 2px;
}
.tab-close:hover { opacity: 1; color: var(--red); }
.tab-add-btn {
  padding: 6px 10px;
  background: transparent;
  border: 1px dashed var(--brd);
  border-radius: 8px;
  color: var(--t3);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-family: inherit;
}
.tab-add-btn:hover { border-color: var(--accent); color: var(--accent2); background: var(--card); }

/* Gecmis item'lari tıklanabilir */
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(212,175,55,0.1);
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.history-item:hover {
  background: rgba(99,102,241,0.08);
  border-color: var(--brd2);
}
.history-item:hover .history-replay-hint {
  opacity: 1;
}
.history-replay-hint {
  font-size: 0.7rem;
  color: var(--accent2);
  opacity: 0;
  transition: opacity 0.2s;
}