/* ==========================================================================
   PORTAL LAYANAN TERPADU SEKOLAH - MASTER STYLESHEET
   Aesthetics: Modern SaaS, Glassmorphism, Dynamic Gradients, Clean School Portal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Color System
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.28);
  --shadow-glow-emerald: 0 8px 24px -4px rgba(16, 185, 129, 0.35);
  --shadow-glow-blue: 0 8px 24px -4px rgba(59, 130, 246, 0.35);

  /* Accents */
  --color-emerald: #10b981;
  --color-emerald-light: #34d399;
  --color-teal: #14b8a6;
  --color-blue: #3b82f6;
  --color-indigo: #6366f1;
  --color-violet: #8b5cf6;
  --color-purple: #a855f7;
  --color-amber: #f59e0b;
  --color-orange: #f97316;
  --color-rose: #f43f5e;
  --color-cyan: #06b6d4;
  --color-sky: #0ea5e9;
}

/* Dark Theme (Default) - Deep Obsidian Cyber Tech */
[data-theme="dark"] {
  --bg-body: #060913;
  --bg-card: rgba(14, 20, 34, 0.68);
  --bg-card-hover: rgba(22, 30, 50, 0.85);
  --bg-glass: rgba(10, 16, 30, 0.65);
  --bg-input: rgba(12, 18, 32, 0.85);
  --bg-subtle: rgba(255, 255, 255, 0.045);
  --bg-subtle-hover: rgba(255, 255, 255, 0.09);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --border-glass: rgba(255, 255, 255, 0.12);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #060913;

  --nav-bg: rgba(6, 9, 19, 0.82);
  --glow-1: rgba(16, 185, 129, 0.24);
  --glow-2: rgba(59, 130, 246, 0.22);
  --glow-3: rgba(139, 92, 246, 0.20);
  --glow-4: rgba(6, 182, 212, 0.18);
}

/* Light Theme - Clean Modern Slate */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.78);
  --bg-input: rgba(255, 255, 255, 0.95);
  --bg-subtle: rgba(0, 0, 0, 0.035);
  --bg-subtle-hover: rgba(0, 0, 0, 0.065);

  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(0, 0, 0, 0.16);
  --border-glass: rgba(0, 0, 0, 0.1);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --nav-bg: rgba(248, 250, 252, 0.85);
  --glow-1: rgba(16, 185, 129, 0.12);
  --glow-2: rgba(59, 130, 246, 0.12);
  --glow-3: rgba(139, 92, 246, 0.10);
  --glow-4: rgba(6, 182, 212, 0.08);
}

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

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

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

/* --------------------------------------------------------------------------
   2.1 High-Tech Ambient Background System
   -------------------------------------------------------------------------- */
/* Top Radiant Light Ray */
.bg-radial-beam {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1500px;
  height: 560px;
  background: radial-gradient(
    ellipse 80% 60% at 50% -10%,
    rgba(16, 185, 129, 0.25) 0%,
    rgba(59, 130, 246, 0.16) 38%,
    rgba(139, 92, 246, 0.08) 60%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 0;
  animation: beamPulse 12s ease-in-out infinite alternate;
}

@keyframes beamPulse {
  0% { opacity: 0.85; transform: translateX(-50%) scale(0.98); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.02); }
}

[data-theme="light"] .bg-radial-beam {
  background: radial-gradient(
    ellipse 80% 60% at 50% -10%,
    rgba(16, 185, 129, 0.15) 0%,
    rgba(59, 130, 246, 0.10) 38%,
    rgba(139, 92, 246, 0.05) 60%,
    transparent 80%
  );
}

/* High-Tech Dual Blueprint & Dot-Matrix Pattern */
.bg-grid-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle, rgba(255, 255, 255, 0.065) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 24px 24px, 72px 72px, 72px 72px;
  background-position: 0 0, 0 0, 0 0;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black 25%, transparent 88%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black 25%, transparent 88%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .bg-grid-pattern {
  background-image: 
    radial-gradient(circle, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

/* Interactive Cyber Particle Constellation Canvas */
.bg-cyber-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.88;
  transition: opacity var(--transition-smooth);
}

[data-theme="light"] .bg-cyber-canvas {
  opacity: 0.65;
}

/* Cinematic Edge Vignette */
.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 45%, transparent 50%, rgba(6, 9, 19, 0.72) 100%);
}

[data-theme="light"] .bg-vignette {
  background: radial-gradient(circle at 50% 45%, transparent 60%, rgba(226, 232, 240, 0.45) 100%);
}

/* Organic Floating Aurora Orbs */
@keyframes auroraDrift1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(65px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-45px, 60px) scale(0.92);
  }
}

@keyframes auroraDrift2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-70px, 45px) scale(0.9);
  }
  66% {
    transform: translate(50px, -60px) scale(1.12);
  }
}

@keyframes auroraDrift3 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(55px, -35px) scale(1.08);
  }
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(130px);
  -webkit-filter: blur(130px);
  z-index: 0;
  will-change: transform;
}

.bg-glow-1 {
  width: 580px;
  height: 580px;
  top: -120px;
  left: -120px;
  background: var(--glow-1);
  animation: auroraDrift1 24s infinite ease-in-out;
}

.bg-glow-2 {
  width: 620px;
  height: 620px;
  top: 18%;
  right: -140px;
  background: var(--glow-2);
  animation: auroraDrift2 28s infinite ease-in-out;
}

.bg-glow-3 {
  width: 540px;
  height: 540px;
  bottom: 8%;
  left: 15%;
  background: var(--glow-3);
  animation: auroraDrift3 22s infinite ease-in-out;
}

.bg-glow-4 {
  width: 440px;
  height: 440px;
  top: 40%;
  left: 45%;
  background: var(--glow-4);
  animation: auroraDrift1 30s infinite ease-in-out reverse;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --------------------------------------------------------------------------
   3. Top Navigation Bar
   -------------------------------------------------------------------------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

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

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

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

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-emerald);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

.live-clock-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.nav-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-family: var(--font-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: var(--bg-subtle-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.search-shortcut-btn {
  padding: 0.45rem 1rem;
}

.shortcut-text {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.kbd-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  justify-content: center;
}

[data-theme="dark"] .icon-sun { display: block; color: var(--color-amber); }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; color: var(--color-indigo); }

.settings-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-emerald);
  font-weight: 600;
}

.settings-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(59, 130, 246, 0.25) 100%);
  border-color: var(--color-emerald);
}

/* --------------------------------------------------------------------------
   4. Main Content Layout
   -------------------------------------------------------------------------- */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
  padding: 0.25rem 0 0.5rem 0;
}

.greeting-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--color-emerald);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-headline {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.35rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Interactive Search Bar */
.search-box-wrapper {
  margin-bottom: 1.5rem;
}

.search-input-box {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.5rem 0.25rem 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
}

.search-input-box:focus-within {
  border-color: var(--color-emerald);
  box-shadow: var(--shadow-glow-emerald);
  transform: translateY(-2px);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1rem;
  margin-right: 0.75rem;
}

.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 0.92rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
}

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

.clear-search-btn {
  background: var(--bg-subtle-hover);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.clear-search-btn:hover {
  background: var(--color-rose);
  color: #ffffff;
}

/* Hero Stats Row (Compact) */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  backdrop-filter: blur(14px);
  text-align: left;
  transition: all var(--transition-fast);
}

.stat-item:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-icon-wrap.emerald { background: rgba(16, 185, 129, 0.15); color: var(--color-emerald); }
.stat-icon-wrap.blue { background: rgba(59, 130, 246, 0.15); color: var(--color-blue); }
.stat-icon-wrap.amber { background: rgba(245, 158, 11, 0.15); color: var(--color-amber); }
.stat-icon-wrap.purple { background: rgba(168, 85, 247, 0.15); color: var(--color-purple); }

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

.stat-number {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   6. Filter & Role Navigation Section (Compact)
   -------------------------------------------------------------------------- */
.filter-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(16px);
}

.role-selector-wrap,
.category-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 95px;
}

.role-pill-group,
.category-chip-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}

.role-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.role-pill:hover {
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.role-pill.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.cat-chip {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.cat-chip:hover {
  border-color: var(--color-blue);
  color: var(--text-primary);
}

.cat-chip.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.filter-meta-right {
  margin-left: auto;
}

.active-count-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. Section Titles & Grids
   -------------------------------------------------------------------------- */
.section-title-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.title-left {
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* View Mode Switcher: 3D Carousel vs Grid */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(14px);
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.25s ease;
}

.view-mode-btn:hover {
  color: var(--text-primary);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* --------------------------------------------------------------------------
   7.1 3D Rotating Card Carousel Cylinder (As in Code With Nazia / InfiWebCraft)
   -------------------------------------------------------------------------- */
.carousel-3d-stage {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
  perspective-origin: 50% 45%;
  overflow: visible;
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 2rem;
}

.carousel-3d-cylinder {
  position: relative;
  width: 290px;
  height: 380px;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.carousel-3d-cylinder.is-dragging {
  cursor: grabbing;
  transition: none;
}

/* Carousel Card Item in 3D Cylinder */
.carousel-card-item {
  position: absolute;
  width: 290px;
  height: 380px;
  left: 0;
  top: 0;
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
  transform: rotateY(var(--card-angle, 0deg)) translateZ(var(--card-radius, 340px));
  transition: opacity 0.5s ease, filter 0.5s ease, box-shadow 0.4s ease, border-color 0.3s ease;
  will-change: transform, opacity;
  backface-visibility: visible;
}

.carousel-card-item .app-card {
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45);
  animation: none;
}

/* Dim & blur cards on the back side of cylinder */
.carousel-card-item.is-back {
  opacity: 0.52;
  filter: blur(0.6px) brightness(0.8);
  pointer-events: none;
}

.carousel-card-item.is-back:hover {
  opacity: 0.8;
}

.carousel-card-item.is-front {
  opacity: 1;
  filter: none;
  z-index: 10;
}

.carousel-card-item.is-front .app-card {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 25px 55px -10px rgba(16, 185, 129, 0.35), 0 0 30px rgba(16, 185, 129, 0.15);
}

/* Carousel Controls Bar */
.carousel-controls-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 20;
}

.carousel-control-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-control-btn:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.carousel-control-btn:active {
  transform: scale(0.96);
}

.carousel-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-play-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  background: var(--bg-subtle);
}

.carousel-nav-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-subtle-hover);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dot.active {
  width: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.carousel-drag-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  z-index: 10;
}

.carousel-drag-hint i {
  color: var(--color-emerald);
}

@media (max-width: 768px) {
  .carousel-3d-stage {
    min-height: 470px;
    perspective: 800px;
  }
  .carousel-3d-cylinder {
    width: 260px;
    height: 350px;
  }
  .carousel-card-item {
    width: 260px;
    height: 350px;
    transform: rotateY(var(--card-angle, 0deg)) translateZ(var(--card-radius-sm, 260px));
  }
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  perspective: 1200px;
}

/* --------------------------------------------------------------------------
   8. App Card Design (Ultra-Modern 3D Holographic Perspective)
   -------------------------------------------------------------------------- */
@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: perspective(1000px) translateY(24px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) translateY(0) scale(1);
  }
}

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

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background 0.3s ease;
  overflow: visible;
  min-height: 185px;
  animation: cardEntrance 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered entrance animation */
.app-card:nth-child(1) { animation-delay: 0.04s; }
.app-card:nth-child(2) { animation-delay: 0.10s; }
.app-card:nth-child(3) { animation-delay: 0.16s; }
.app-card:nth-child(4) { animation-delay: 0.22s; }
.app-card:nth-child(5) { animation-delay: 0.28s; }

/* 3D Holographic Dynamic Glass Glare */
.card-3d-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 280px at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.06) 45%,
    transparent 75%
  );
  pointer-events: none;
  opacity: var(--glare-opacity, 0);
  transition: opacity 0.3s ease;
  z-index: 5;
  mix-blend-mode: overlay;
}

[data-theme="light"] .card-3d-glare {
  background: radial-gradient(
    circle 280px at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.65),
    rgba(255, 255, 255, 0.15) 45%,
    transparent 75%
  );
}

/* Dynamic Mouse Spotlight Reflection */
.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.09),
    transparent 75%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

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

/* Shimmer Light Reflection Sweep */
.card-shimmer-sweep {
  position: absolute;
  top: 0;
  left: -140%;
  width: 75%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.16),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}

.app-card:hover .card-shimmer-sweep {
  left: 160%;
  transition: left 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3D Preserved Content Container */
.card-3d-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  transform-style: preserve-3d;
  position: relative;
  z-index: 3;
}

/* Card Background on Hover */
.app-card:hover {
  background: var(--bg-card-hover);
}

/* Themed 3D Deep Glow Highlights on Hover */
.app-card.color-emerald:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 26px 52px -12px rgba(16, 185, 129, 0.38), 0 0 28px -4px rgba(16, 185, 129, 0.22);
}

.app-card.color-indigo:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 26px 52px -12px rgba(99, 102, 241, 0.38), 0 0 28px -4px rgba(99, 102, 241, 0.22);
}

.app-card.color-amber:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 52px -12px rgba(245, 158, 11, 0.38), 0 0 28px -4px rgba(245, 158, 11, 0.22);
}

.app-card.color-cyan:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 26px 52px -12px rgba(6, 182, 212, 0.38), 0 0 28px -4px rgba(6, 182, 212, 0.22);
}

.app-card.color-violet:hover {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 26px 52px -12px rgba(139, 92, 246, 0.38), 0 0 28px -4px rgba(139, 92, 246, 0.22);
}

/* Card Header */
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
}

.card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateZ(0px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.app-card:hover .card-icon-wrap {
  transform: translateZ(44px) scale(1.16) rotate(6deg);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.48);
}

.app-card:hover .card-icon-wrap i {
  animation: iconPulse 1.6s infinite ease-in-out;
}

/* Card Icon Gradients */
.color-emerald .card-icon-wrap { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.color-indigo .card-icon-wrap { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
.color-amber .card-icon-wrap { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.color-cyan .card-icon-wrap { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }
.color-violet .card-icon-wrap { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }

.card-top-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-top-badges {
  transform: translateZ(28px);
}

/* Live Pulsing Dot */
.live-dot-wrap {
  position: relative;
  width: 10px;
  height: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.15rem;
}

.live-dot-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
}

.live-dot-ping {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.45);
  animation: pingWave 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.app-card:hover .badge-tag {
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.pin-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.pin-btn:hover {
  color: var(--color-amber);
  border-color: var(--color-amber);
  background: rgba(245, 158, 11, 0.12);
  transform: rotate(18deg) scale(1.1);
}

.pin-btn.pinned {
  color: var(--color-amber);
  border-color: var(--color-amber);
  background: rgba(245, 158, 11, 0.18);
}

.card-body {
  margin-bottom: 0.85rem;
  flex: 1;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
  transform: translateZ(0px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s ease,
              text-shadow 0.3s ease;
}

.app-card:hover .card-title {
  color: #ffffff;
  transform: translateZ(36px);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transform: translateZ(0px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-desc {
  transform: translateZ(24px);
}

/* Card Action Footer */
.card-action-footer {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-action-footer {
  transform: translateZ(38px);
}

.card-launch-btn {
  flex: 1;
  background: var(--bg-subtle-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-launch-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  transform: translateY(-2px) scale(1.02);
}

.card-launch-btn i {
  font-size: 0.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-launch-btn:hover i {
  transform: translateX(4px) translateY(-2px);
}

.card-launch-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.card-detail-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.card-detail-btn:hover {
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  transform: scale(1.08);
}

/* Empty State Card */
.empty-state-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-color-hover);
  border-radius: var(--radius-xl);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 550px;
  margin: 2rem auto;
}

.empty-icon-wrap {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.reset-filter-btn {
  background: var(--color-emerald);
  border: none;
  color: #ffffff;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   9. Utilities Strip
   -------------------------------------------------------------------------- */
.utilities-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.util-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  backdrop-filter: blur(14px);
}

.util-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.util-text h5 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.util-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   10. Footer Section
   -------------------------------------------------------------------------- */
.portal-footer {
  border-top: 1px solid var(--border-color);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  padding: 2.5rem 1.75rem;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}

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

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-logo i {
  color: var(--color-emerald);
}

.footer-motto {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.footer-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.badge-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

/* --------------------------------------------------------------------------
   11. Modal System (Details & Settings)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modal-fade-in 0.22s ease-out;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(24px);
  animation: modal-pop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-settings {
  max-width: 780px;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--bg-subtle-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--color-rose);
  color: #ffffff;
  border-color: transparent;
}

/* Detail Modal Styles */
.modal-header-banner {
  padding: 2rem 2rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-subtle);
}

.modal-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.modal-tags-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.modal-badge-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-blue);
  background: rgba(59, 130, 246, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.modal-badge-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-emerald);
}

.modal-app-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-body-content {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-app-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.modal-feature-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-feature-list li i {
  color: var(--color-emerald);
}

.modal-role-tags-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.modal-role-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.modal-role-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.modal-role-pill {
  font-size: 0.76rem;
  background: var(--bg-subtle-hover);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 600;
}

.modal-url-preview-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.url-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.url-code {
  font-family: monospace;
  font-size: 0.83rem;
  color: var(--color-blue);
  word-break: break-all;
}

.modal-footer-actions {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
}

.modal-btn {
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--color-rose);
}

.btn-danger:hover {
  background: var(--color-rose);
  color: #ffffff;
}

/* Settings Modal Specifics */
.modal-settings-header {
  padding: 1.75rem 2rem 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.settings-title-wrap i {
  font-size: 1.75rem;
}

.text-emerald { color: var(--color-emerald); }
.text-amber { color: var(--color-amber); }

.settings-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.settings-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.settings-body-scroll {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-color);
}

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

.settings-hint code {
  background: var(--bg-subtle-hover);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--color-emerald);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.app-links-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.settings-table th {
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.settings-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.settings-table tr:last-child td {
  border-bottom: none;
}

.table-app-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-input-url {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
}

.table-input-url:focus {
  border-color: var(--color-blue);
}

.settings-footer-actions {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   12. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-headline {
    font-size: 2.3rem;
  }
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .utilities-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1rem;
  }
  .live-clock-badge,
  .search-shortcut-btn {
    display: none;
  }
  .hero-headline {
    font-size: 1.85rem;
  }
  .hero-description {
    font-size: 0.95rem;
  }
  .hero-stats-row {
    grid-template-columns: 1fr;
  }
  .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
  }
  .filter-section {
    padding: 1rem;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right {
    align-items: flex-start;
  }
  .settings-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-footer-right {
    justify-content: flex-end;
  }
}

/* --------------------------------------------------------------------------
   13. Feature 5: Cyber UI Sound Effects Toggle Button
   -------------------------------------------------------------------------- */
.sound-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sound-toggle-btn:hover {
  color: var(--color-emerald);
  border-color: rgba(16, 185, 129, 0.4);
}

.sound-toggle-btn.sound-muted {
  color: var(--text-muted);
  opacity: 0.7;
}



