@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-main: #0a0d14;
  --bg-card: rgba(16, 22, 36, 0.75);
  --bg-card-hover: rgba(22, 31, 51, 0.85);
  --bg-darker: #06080d;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 255, 136, 0.25);
  
  --primary: #00ff88;
  --primary-glow: rgba(0, 255, 136, 0.4);
  --accent-cyan: #00e5ff;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --discord-blurple: #5865f2;
  --discord-hover: #4752c4;

  --color-critical: #ff3366;
  --color-critical-bg: rgba(255, 51, 102, 0.12);
  --color-high: #ff9900;
  --color-high-bg: rgba(255, 153, 0, 0.12);
  --color-medium: #ffcc00;
  --color-medium-bg: rgba(255, 204, 0, 0.12);
  --color-low: #00ccff;
  --color-low-bg: rgba(0, 204, 255, 0.12);
  --color-pass: #00ff88;
  --color-pass-bg: rgba(0, 255, 136, 0.12);
  --color-info: #94a3b8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(0, 255, 136, 0.15);
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 255, 136, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(88, 101, 242, 0.06) 0%, transparent 45%),
    linear-gradient(to bottom, #0a0d14, #05070a);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Panel Utilities */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Navigation Bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.4));
  transition: transform 0.25s ease;
}

.brand:hover .brand-logo-img {
  transform: scale(1.08) rotate(3deg);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(0, 255, 136, 0.15);
  color: var(--primary);
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #00ff88, #00ccaa);
  color: #051a10;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.55);
}

.btn-discord {
  background-color: var(--discord-blurple);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.35);
}

.btn-discord:hover {
  background-color: var(--discord-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: var(--color-critical-bg);
  color: var(--color-critical);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 4rem auto 2rem auto;
  padding: 0 2rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}

.hero h1 span {
  background: linear-gradient(90deg, #00ff88, #00e5ff, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.feature-card {
  padding: 2rem;
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Container & Layout */
.container {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title h2 {
  font-size: 2rem;
  font-weight: 800;
}

.page-title p {
  color: var(--text-muted);
}

/* Server Cards Grid */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.server-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--primary)), transparent);
  opacity: 0.8;
}

.server-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.server-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.server-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.server-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
}

.server-score-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
}

.score-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
}

.score-grade {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.badge-critical { background: var(--color-critical-bg); color: var(--color-critical); border: 1px solid rgba(255, 51, 102, 0.4); }
.badge-high { background: var(--color-high-bg); color: var(--color-high); border: 1px solid rgba(255, 153, 0, 0.4); }
.badge-medium { background: var(--color-medium-bg); color: var(--color-medium); border: 1px solid rgba(255, 204, 0, 0.4); }
.badge-low { background: var(--color-low-bg); color: var(--color-low); border: 1px solid rgba(0, 204, 255, 0.4); }
.badge-pass { background: var(--color-pass-bg); color: var(--color-pass); border: 1px solid rgba(0, 255, 136, 0.4); }
.badge-info { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Server SOC Overview Screen */
.soc-grid-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .soc-grid-top {
    grid-template-columns: 1fr;
  }
}

.score-gauge-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gauge-circle {
  width: 150px;
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.gauge-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.gauge-progress {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.gauge-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-score {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.gauge-grade {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-box {
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
}

/* Tabs Navigation */
.soc-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Rules / Findings Table & Cards */
.filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.pill-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill.active, .filter-pill:hover {
  background: rgba(0, 255, 136, 0.15);
  color: var(--primary);
  border-color: rgba(0, 255, 136, 0.3);
}

.rule-card {
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 4px solid var(--rule-accent, var(--border-color));
}

.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.rule-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.rule-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.rule-detail-box {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}

.rule-values-row {
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  margin-top: 0.4rem;
}

.remediation-box {
  background: rgba(0, 204, 255, 0.08);
  border: 1px solid rgba(0, 204, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: #e0f2fe;
}

/* Forms & Config */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #051a10;
}

/* Event Logs Table */
.events-table {
  width: 100%;
  border-collapse: collapse;
}

.events-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border-color);
}

.events-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.events-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(16, 22, 36, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius-sm);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}
