:root {
  --bg-dark: #0a0a12;
  --bg-card: #12121f;
  --bg-card-hover: #1a1a2f;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #ff4444;
  --accent-glow: rgba(255, 68, 68, 0.3);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: 
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 160%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 90% 40%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 90%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.3) 0%, transparent 100%);
  background-size: 200px 200px;
  animation: stars 20s linear infinite;
  z-index: 0;
}

@keyframes stars {
  from { transform: translateY(0); }
  to { transform: translateY(-200px); }
}

#app {
  position: relative;
  z-index: 1;
}

.screen {
  min-height: 100vh;
  padding: 2rem;
}

.screen.hidden {
  display: none;
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.mascot {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--accent);
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.wizard {
  max-width: 500px;
  margin: 2rem auto;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.step.active {
  color: var(--accent);
}

.step.done {
  color: var(--success);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.step.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.step.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
}

.wizard-panel {
  display: none;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.wizard-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.wizard-panel p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 1rem;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.protection-levels {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.level-card {
  display: block;
  cursor: pointer;
}

.level-card input {
  display: none;
}

.level-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-dark);
  transition: border-color 0.2s, background 0.2s;
}

.level-card:hover .level-content {
  background: var(--bg-card-hover);
}

.level-card input:checked + .level-content {
  border-color: var(--accent);
  background: rgba(255, 68, 68, 0.1);
}

.level-emoji {
  font-size: 2rem;
}

.level-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.level-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.summary-card {
  background: var(--bg-dark);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-item {
  padding: 0.5rem 0;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mascot-small {
  font-size: 1.5rem;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-badge.protected {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.dash-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.dash-col-left,
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-main section {
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .dash-columns {
    grid-template-columns: 1fr;
  }
  .dash-main {
    max-width: 800px;
  }
}

.dash-main h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.bot-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.bot-avatar {
  font-size: 3rem;
}

.bot-info {
  flex: 1;
}

.bot-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.bot-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.bot-status.online {
  color: var(--success);
}

.bot-stats {
  display: flex;
  gap: 2rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  display: block;
}

.stat-value.warning {
  color: var(--warning);
}

.stat-value.attack {
  color: #9333ea;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}


.activity-list {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.activity-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.activity-icon.approved {
  background: rgba(34, 197, 94, 0.2);
}

.activity-icon.blocked {
  background: rgba(239, 68, 68, 0.2);
}

.activity-icon.manual {
  background: rgba(245, 158, 11, 0.2);
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-weight: 500;
}

.activity-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-container {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.legend-section {
  margin-bottom: 1.5rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.safe { background: var(--success); }
.legend-dot.manual { background: var(--warning); }
.legend-dot.blocked { background: var(--danger); }
.legend-dot.attack { background: #9333ea; }

.legend-count {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  min-width: 1.2rem;
  text-align: center;
}

.legend-help {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  color: var(--bg-dark);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.protection-safety-section {
  margin-bottom: 1.5rem;
}

.protection-safety-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.ps-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.ps-score {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success);
}

.ps-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.ps-checks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ps-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-dark);
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: help;
  transition: border-color 0.2s;
}

.ps-check.active {
  border-color: rgba(34, 197, 94, 0.3);
}

.ps-check.inactive {
  border-color: rgba(239, 68, 68, 0.3);
  opacity: 0.7;
}

.ps-check-icon {
  font-size: 1.1rem;
}

.ps-check-label {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ps-check-status {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--success);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-check.inactive .ps-check-status {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.2);
}

.header-scan-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.header-scan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.section-accordion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.section-accordion:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.accordion-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.section-accordion.expanded .accordion-arrow {
  transform: rotate(90deg);
}

.security-arch-grid.collapsed {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-scan-area {
  text-align: center;
  padding: 1rem 0;
}

.modal-scan-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-footer.hidden {
  display: none;
}

.modal-export-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-export-btn:hover {
  border-color: rgba(124, 58, 237, 0.5);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.activity-item.has-context {
  flex-direction: column;
  align-items: flex-start;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.activity-context {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-dark);
  border-radius: 8px;
  border-left: 3px solid var(--danger);
  width: 100%;
}

.activity-context.attack {
  border-left-color: #9333ea;
}

.activity-context-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.activity-context-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  max-width: 250px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tooltip.visible {
  opacity: 1;
}

.dash-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-divider {
  color: var(--text-muted);
}

.dash-footer a {
  color: var(--accent);
  text-decoration: none;
}

.dash-footer a:hover {
  text-decoration: underline;
}

.footer-note {
  font-size: 0.8rem;
  max-width: 500px;
  margin: 0 auto;
}

.control-section {
  margin-bottom: 2rem;
}

.protection-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.toggle-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.toggle-btn:hover {
  background: var(--bg-card-hover);
}

.toggle-btn.active {
  background: rgba(255, 68, 68, 0.1);
  border-color: var(--accent);
  color: var(--text-primary);
}

.toggle-emoji {
  font-size: 1.5rem;
}

.toggle-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.control-hint {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.approvals-section {
  margin-bottom: 2rem;
}

.approvals-section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.approval-count {
  background: var(--warning);
  color: var(--bg-dark);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-weight: 700;
}

.approvals-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.approval-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--warning);
  border-left: 4px solid var(--warning);
}

.approval-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.approval-icon {
  font-size: 1.5rem;
}

.approval-tool {
  font-weight: 600;
  font-size: 1rem;
}

.approval-time {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.approval-plan {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-dark);
  border-radius: 6px;
}

.approval-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-approve, .btn-deny {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-approve {
  background: var(--success);
  color: white;
}

.btn-deny {
  background: var(--danger);
  color: white;
}

.btn-approve:hover, .btn-deny:hover {
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .dash-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    text-align: center;
  }
  
  .logo {
    justify-content: center;
  }
  
  .status-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  .legend {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .header-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .modal-content {
    max-height: 90vh;
    margin: 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .bot-card {
    flex-direction: column;
    text-align: center;
  }
  
  .bot-stats {
    width: 100%;
    justify-content: space-around;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-divider {
    display: none;
  }
  
  .protection-toggle {
    flex-direction: column;
  }
  
  .toggle-btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }
  
  .approval-actions {
    flex-direction: column;
  }
}

/* Extensions Section */
.extensions-section {
  margin-bottom: 1.5rem;
}

.extension-count {
  font-size: 0.85rem;
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.5rem;
}

.extensions-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.extension-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
  cursor: pointer;
}

.extension-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.ext-icon {
  font-size: 1.75rem;
}

.ext-info {
  flex: 1;
}

.ext-name {
  font-weight: 600;
  font-size: 1rem;
}

.ext-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ext-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.contact-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}

.notification-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.notification-toggle:hover {
  border-color: var(--success);
  color: var(--text-primary);
}

.notification-toggle.enabled {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.reset-dropdown {
  position: relative;
  display: inline-block;
}

.reset-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn:hover {
  border-color: var(--warning);
  color: var(--text-primary);
}

.reset-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 280px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: dropdownFade 0.15s ease-out;
}

.reset-menu.hidden {
  display: none;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.reset-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  color: var(--text-primary);
}

.reset-option:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}

.reset-option-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.reset-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reset-option-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.reset-option-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.reset-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  z-index: 300;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: toastSlide 0.3s ease-out;
}

.reset-toast.success { border-color: var(--success); }
.reset-toast.info { border-color: var(--accent); }

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.reset-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  animation: dropdownFade 0.15s ease-out;
}

.reset-confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
}

.reset-confirm-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.reset-confirm-box p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.reset-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.reset-confirm-actions button {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.btn-confirm-yes {
  background: var(--accent);
  color: white;
  border-color: var(--accent) !important;
}

.btn-confirm-yes:hover {
  opacity: 0.9;
}

.btn-confirm-cancel {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.btn-confirm-cancel:hover {
  color: var(--text-primary);
}

/* Activity Filters */
.activity-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.filter-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.filter-dot.safe { background: var(--success); }
.filter-dot.flagged { background: var(--warning); }
.filter-dot.attack { background: var(--danger); }
.filter-dot.reviewed { background: var(--accent); }

.activity-filter-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 1rem;
  font-style: italic;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.activity-item {
  animation: slideInLeft 0.3s ease-out;
}

/* Feedback Buttons */
.activity-feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.feedback-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.feedback-btn {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-btn:hover {
  transform: scale(1.1);
}

.feedback-btn.helpful:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--success);
}

.feedback-btn.not-helpful:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
}

.feedback-thanks {
  font-size: 0.75rem;
  color: var(--success);
  font-style: italic;
}

.security-arch-section {
  margin-bottom: 1.5rem;
}

.security-arch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.arch-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.arch-item:hover {
  border-color: var(--primary);
}

.arch-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.arch-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.arch-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}


.threat-scan-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border: none;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.threat-scan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.threat-scan-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.threat-score-display {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.threat-grade {
  font-size: 2.5rem;
  font-weight: 800;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-card-hover);
}

.threat-grade.grade-a { color: var(--success); border: 2px solid var(--success); }
.threat-grade.grade-b { color: #60a5fa; border: 2px solid #60a5fa; }
.threat-grade.grade-c { color: var(--warning); border: 2px solid var(--warning); }
.threat-grade.grade-d { color: #f97316; border: 2px solid #f97316; }
.threat-grade.grade-f { color: var(--danger); border: 2px solid var(--danger); }

.threat-score-info {
  display: flex;
  flex-direction: column;
}

.threat-score-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.threat-score-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.threat-summary {
  display: flex;
  gap: 0.75rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.threat-summary-badge {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.threat-summary-badge.critical { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.threat-summary-badge.high { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.threat-summary-badge.medium { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.threat-summary-badge.low { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.threat-summary-badge.passed { background: rgba(34, 197, 94, 0.2); color: var(--success); }

.threat-findings {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.threat-finding {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInLeft 0.3s ease-out;
  transition: border-color 0.2s;
}

.threat-finding:hover {
  border-color: var(--border-hover, #333);
}

.threat-finding.finding-passed {
  opacity: 0.7;
}

.finding-severity {
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.finding-severity.critical { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.finding-severity.high { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.finding-severity.medium { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.finding-severity.low { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.finding-severity.info { background: rgba(148, 163, 184, 0.2); color: var(--text-secondary); }
.finding-severity.pass { background: rgba(34, 197, 94, 0.2); color: var(--success); }

.finding-content {
  flex: 1;
  min-width: 0;
}

.finding-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.finding-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.finding-recommendation {
  font-size: 0.75rem;
  color: var(--primary);
  margin-top: 0.4rem;
  font-style: italic;
}

.finding-category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  background: var(--bg-card-hover);
  border-radius: 4px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .security-arch-grid {
    grid-template-columns: 1fr;
  }
  .threat-score-display {
    flex-wrap: wrap;
  }
  .threat-summary {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

.demo-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.demo-banner .demo-icon { font-size: 20px; }

.demo-banner .demo-text { font-size: 14px; color: #fff; }

.demo-banner .demo-text code {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 12px;
}

.demo-banner .demo-link {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}

.demo-banner .demo-link:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Archives Section */
.archives-section {
  margin-top: 1.5rem;
}

.archives-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.archives-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.archives-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.archives-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.archives-content.hidden {
  display: none;
}

.archives-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}

.archive-card:hover {
  border-color: var(--accent);
}

.archive-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.archive-date {
  font-weight: 600;
  font-size: 0.9rem;
}

.archive-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.archive-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.archive-stat {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.archive-stat .safe { color: var(--success); }
.archive-stat .flagged { color: var(--warning); }
.archive-stat .attack { color: var(--danger); }
.archive-stat .reviewed { color: var(--accent); }
.archive-stat .total { color: var(--text-secondary); }

.archive-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.archive-actions button {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.archive-actions button:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.archive-actions .btn-delete-archive:hover {
  border-color: var(--danger);
  color: var(--danger);
}
