/* ==========================================================================
   Superplanning.blog Main Stylesheet
   Theme: Dark & Light Mode Support with Glassmorphism & Modern Typography
   ========================================================================== */

/* --- Root Color Variables --- */
:root {
  /* Dark Theme (Default) */
  --bg-main: #090d16;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-navbar: rgba(9, 13, 22, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.4);

  --accent-blue: #38bdf8;
  --accent-purple: #a855f7;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  --gradient-hero: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #f43f5e 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);

  --particle-color: rgba(56, 189, 248, 0.8);
  --particle-line: rgba(56, 189, 248, 0.15);

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

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-navbar: rgba(248, 250, 252, 0.85);
  --bg-glass: rgba(0, 0, 0, 0.03);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(14, 165, 233, 0.5);

  --accent-blue: #0284c7;
  --accent-purple: #9333ea;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --gradient-hero: linear-gradient(135deg, #0284c7 0%, #9333ea 50%, #e11d48 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 32px rgba(14, 165, 233, 0.08);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.12);

  --particle-color: rgba(2, 132, 199, 0.6);
  --particle-line: rgba(2, 132, 199, 0.12);
}

/* --- Base Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* --- Utility Typography & Classes --- */
.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.code-font {
  font-family: var(--font-mono);
}

.text-emerald { color: var(--accent-emerald) !important; }
.text-blue { color: var(--accent-blue) !important; }
.text-purple { color: var(--accent-purple) !important; }
.font-semibold { font-weight: 600; }
.mt-4 { margin-top: 1rem; }

/* --- Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.logo-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.logo-icon {
  width: 20px;
  height: 20px;
}

.brand-text .dot {
  color: var(--accent-blue);
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  background-color: rgba(56, 189, 248, 0.1);
}

.icon-sun { display: none; width: 16px; height: 16px; color: var(--accent-amber); }
.icon-moon { display: block; width: 16px; height: 16px; color: var(--accent-blue); }

[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

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

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--accent-blue);
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 8rem;
  padding-bottom: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Canvas Background */
#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

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

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.badge-icon {
  width: 16px;
  height: 16px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

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

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

/* Quick Stats Banner */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.stat-item i {
  width: 28px;
  height: 28px;
  color: var(--accent-blue);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.stat-divider {
  width: 1px;
  height: 40px;
  background-color: var(--border-color);
}

/* --- Section Global Layout --- */
.section {
  padding: 6rem 1.5rem;
  position: relative;
  z-index: 2;
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-tag i {
  width: 14px;
  height: 14px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* --- Dashboard Section (4 Cards) --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.dashboard-card:hover::before {
  opacity: 1;
}

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

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon i {
  width: 22px;
  height: 22px;
}

.icon-blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.card-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.status-online, .status-healthy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Info List Items */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.info-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-label i {
  width: 15px;
  height: 15px;
}

.info-value {
  font-weight: 600;
}

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

.badge-success {
  color: var(--accent-emerald);
  font-size: 0.8rem;
}

/* Metric Progress Bars */
.metric-group {
  margin-bottom: 0.5rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}

.metric-label { color: var(--text-muted); }
.metric-percentage { font-family: var(--font-mono); font-weight: 700; }

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress-blue { background: linear-gradient(90deg, #38bdf8, #6366f1); }
.progress-purple { background: linear-gradient(90deg, #a855f7, #f43f5e); }
.progress-emerald { background: linear-gradient(90deg, #10b981, #34d399); }

/* Network Stats */
.network-stats {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.net-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.net-item i { width: 20px; height: 20px; }

.net-value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

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

/* --- Features Section Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.feature-header-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-header-compact .feature-icon {
  margin-bottom: 0;
}

.feature-header-compact .feature-title {
  margin-bottom: 0;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon i {
  width: 26px;
  height: 26px;
}

.icon-bg-blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }
.icon-bg-purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.icon-bg-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.icon-bg-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.icon-bg-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.icon-bg-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-card-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-card-action:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.btn-card-action i {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.btn-card-action:hover i {
  transform: translateX(4px);
}

/* --- About Section --- */
.about-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  backdrop-filter: blur(12px);
}

.about-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.about-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 800px;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.highlight-icon {
  width: 22px;
  height: 22px;
  color: var(--accent-emerald);
}

/* --- Modal Overlay & Card --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-muted);
  padding: 0.4rem;
  border-radius: 50%;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover { color: var(--text-main); }
.modal-close-btn i { width: 20px; height: 20px; }

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.modal-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon-wrapper i { width: 20px; height: 20px; }

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-text {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.modal-status-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.modal-status-box i { width: 18px; height: 18px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
  background: var(--bg-navbar);
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.footer-info {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.server-ip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
}

.server-ip i { width: 14px; height: 14px; }

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-title { font-size: 2.75rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { display: none; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .btn-lg { width: 100%; }
  .footer-container { flex-direction: column; text-align: center; }
  .footer-info { text-align: center; }
}
