/* ==========================================================================
   SIX SOCIAL & SYSTEMS MASTER PORTAL - DESIGN SYSTEM
   Dark Cyber Glassmorphism & High-Tech Aesthetics
   ========================================================================== */

:root {
  --bg-darkest: #070913;
  --bg-main: #0B0F19;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 54, 0.85);
  --bg-glass-subtle: rgba(255, 255, 255, 0.03);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --border-glow-cyan: rgba(6, 182, 212, 0.35);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --accent-primary: #6366F1;
  --accent-primary-hover: #4F46E5;
  --accent-cyan: #06B6D4;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;
  --accent-purple: #A855F7;
  
  --gradient-brand: linear-gradient(135deg, #6366F1 0%, #06B6D4 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.18);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Prompt', 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Radiant Glow Effects */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
}

.glow-2 {
  top: 35%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
}

.glow-3 {
  bottom: -10%;
  left: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2), transparent 70%);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-badge {
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.5);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-center-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pulse-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: relative;
}

.pulse-indicator.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.pulse-indicator.online::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-emerald);
  animation: pulsePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulsePing {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.clock-badge i {
  color: var(--accent-cyan);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

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

.btn-glass-sm {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-md);
}

.btn-glass-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-card-launch {
  flex: 1;
  background: var(--gradient-brand);
  color: #fff;
  padding: 9px 16px;
  font-size: 0.86rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-card-launch:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.btn-card-copy {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 9px 12px;
  font-size: 0.86rem;
  border-radius: var(--radius-md);
}

.btn-card-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   MAIN CONTAINER & HERO
   ========================================================================== */
.main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 24px 60px 24px;
  position: relative;
  z-index: 1;
}

.hero-section {
  text-align: center;
  margin-bottom: 36px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-desc strong {
  color: #E2E8F0;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.metric-icon.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.metric-icon.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
}

.metric-icon.purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.text-success { color: var(--accent-emerald) !important; }
.text-warning { color: var(--accent-amber) !important; }
.text-purple { color: var(--accent-purple) !important; }

/* ==========================================================================
   CONTROLS BAR (FILTER & SEARCH)
   ========================================================================== */
.controls-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-btn.active {
  background: rgba(99, 102, 241, 0.18);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
  font-weight: 600;
}

.search-box {
  position: relative;
  min-width: 320px;
  flex: 1;
  max-width: 440px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
}

.search-box input {
  width: 100%;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 38px 10px 40px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background: rgba(11, 15, 25, 0.95);
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.1rem;
}

.clear-search:hover {
  color: #fff;
}

/* ==========================================================================
   CATEGORY & SERVICE CARDS
   ========================================================================== */
.category-block {
  margin-bottom: 40px;
}

.category-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.category-dot-social {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.category-dot-ops {
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

/* Service Card Design */
.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.service-card:hover::before {
  background: var(--gradient-brand);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: var(--transition);
}

.service-card:hover .card-icon-wrapper {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #fff;
  transform: scale(1.05);
}

.card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.3px;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.offline {
  background: rgba(148, 163, 184, 0.08);
  color: #94A3B8;
  border-color: rgba(148, 163, 184, 0.2);
}

.status-badge.external {
  background: rgba(59, 130, 246, 0.1);
  color: #93C5FD;
  border-color: rgba(59, 130, 246, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-badge.online .status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.status-badge.offline .status-dot {
  background: #64748B;
}

.status-badge.external .status-dot {
  background: #3B82F6;
}

.type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.type-badge.primary { background: rgba(99, 102, 241, 0.18); color: #C7D2FE; }
.type-badge.indigo { background: rgba(79, 70, 229, 0.18); color: #A5B4FC; }
.type-badge.cyan { background: rgba(6, 182, 212, 0.18); color: #A5F3FC; }
.type-badge.blue { background: rgba(37, 99, 235, 0.18); color: #BFDBFE; }
.type-badge.purple { background: rgba(168, 85, 247, 0.18); color: #E9D5FF; }
.type-badge.amber { background: rgba(245, 158, 11, 0.18); color: #FDE68A; }
.type-badge.rose { background: rgba(244, 63, 94, 0.18); color: #FECDD3; }
.type-badge.emerald { background: rgba(16, 185, 129, 0.18); color: #A7F3D0; }
.type-badge.teal { background: rgba(20, 184, 166, 0.18); color: #99F6E4; }
.type-badge.violet { background: rgba(139, 92, 246, 0.18); color: #DDD6FE; }

.card-title-group {
  margin-bottom: 12px;
}

.card-name {
  font-size: 1.22rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 0.84rem;
  color: var(--accent-cyan);
  font-weight: 500;
  margin-top: 2px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.port-tag {
  color: var(--text-dim);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.port-tag strong {
  color: #E2E8F0;
}

.url-preview {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.tag-pill {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.card-sublink {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent-cyan);
  text-decoration: none;
  margin-top: 10px;
  font-weight: 500;
  transition: var(--transition);
}

.card-sublink:hover {
  text-decoration: underline;
  color: #fff;
}

/* ==========================================================================
   OBS GUIDE SECTION
   ========================================================================== */
.obs-guide-section {
  margin-top: 30px;
}

.obs-guide-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.obs-guide-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.obs-guide-text {
  flex: 1;
  min-width: 280px;
}

.obs-guide-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.obs-guide-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.obs-guide-text code {
  background: rgba(0, 0, 0, 0.4);
  color: #A5F3FC;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 19, 0.9);
  padding: 24px 0;
  margin-top: 50px;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

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

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

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.25);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

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

.toast-icon {
  font-size: 1.25rem;
  color: var(--accent-emerald);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.3rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

@media (max-width: 768px) {
  .nav-center-stats { display: none; }
  .hero-title { font-size: 1.9rem; }
  .hero-desc { font-size: 0.92rem; }
  .metrics-grid { grid-template-columns: 1fr; }
  .controls-section { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 100%; max-width: 100%; }
  .cards-grid { grid-template-columns: 1fr; }
  .obs-guide-card { flex-direction: column; text-align: center; }
  .obs-guide-action { width: 100%; }
  .obs-guide-action button { width: 100%; }
  .footer-container { flex-direction: column; text-align: center; }
}
