/* Modern LiberDrop Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(56, 189, 248, 0.4);
  
  --primary-glow: #00f2fe;
  --secondary-glow: #4facfe;
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;

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

  --nav-bg: rgba(7, 9, 14, 0.75);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Canvas */
#network-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.glow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(0, 242, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Nav */
.header {
  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(--glass-border);
  padding: 1rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #2196f3;
  transition: var(--transition);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
  transition: var(--transition);
  padding: 4px;
}

.logo:hover .logo-icon {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: 2px;
}

.nav-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Nav Drawer */
.mobile-menu {
  display: none;
  position: fixed;
  top: 73px;
  left: 0;
  width: 100%;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1.5rem;
  z-index: 99;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .nav-link {
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Layout */
main {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Web App Iframe Container */
.app-container {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 40px rgba(56, 189, 248, 0.1);
  position: relative;
  transition: var(--transition);
  width: 360px;
  max-width: 100%;
  margin: 0 auto 3rem;
}

.app-container:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-card), 0 0 50px rgba(56, 189, 248, 0.2);
}

.app-header-bar {
  background: rgba(15, 23, 42, 0.8);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.app-url {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.app-iframe {
  width: 100%;
  height: 560px;
  border: none;
  display: block;
  background: transparent;
}

/* Iframe Loading Overlay */
.iframe-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  z-index: 10;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.iframe-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.iframe-spinner-ring {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iframe-spinner {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(56, 189, 248, 0.15);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-indigo);
  border-radius: 50%;
  animation: iframeSpin 0.9s linear infinite;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.iframe-loader-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  animation: iframePulse 1.8s ease-in-out infinite;
}

@keyframes iframeSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes iframePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-cyan);
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Download Page */
.page-title-section {
  text-align: center;
  margin-bottom: 3.5rem;
}

.page-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.download-category {
  margin-bottom: 4rem;
}

.category-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-title svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-cyan);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.download-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: var(--transition);
}

.download-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.platform-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-icon-wrap svg {
  width: 28px;
  height: 28px;
  fill: var(--text-main);
}

.platform-name {
  font-size: 1.4rem;
  font-weight: 700;
}

.platform-req {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.btn-primary-dl {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary-dl:hover {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.btn-secondary-dl {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition);
}

.btn-secondary-dl:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* FAQ Page */
.faq-search-wrap {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}

.faq-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 1rem 1.5rem 1rem 3.25rem;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.faq-search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.faq-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--text-dim);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--glass-border-hover);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem;
  text-align: left;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  stroke: var(--accent-cyan);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.code-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin: 0.75rem 0;
  line-height: 1.5;
}

.faq-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  transition: var(--transition);
}

.faq-link:hover {
  color: var(--primary-glow);
}

/* Footer */
.footer {
  position: relative;
  z-index: 2;
  background: rgba(7, 9, 14, 0.9);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .app-iframe {
    height: 480px;
  }
  .page-title {
    font-size: 2.2rem;
  }
}

/* ==========================================================================
   Theme Support (Light & Dark Mode)
   ========================================================================== */

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(15, 23, 42, 0.1);
  --glass-border-hover: rgba(14, 165, 233, 0.4);

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

  --nav-bg: rgba(248, 250, 252, 0.85);

  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.15);
}

[data-theme="light"] .glow-overlay {
  background: 
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 50%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .mobile-menu {
  background: rgba(248, 250, 252, 0.98);
  border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] .logo-icon {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}

[data-theme="light"] .logo:hover .logo-icon {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.5);
}

[data-theme="light"] .faq-search-input {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
}

[data-theme="light"] .faq-item {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .faq-answer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .hero-badge {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.25);
}

[data-theme="light"] .footer {
  background: rgba(241, 245, 249, 0.8);
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  color: var(--accent-cyan);
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  display: none;
}

/* Show icon based on active theme setting */
[data-theme-setting="system"] .icon-system,
[data-theme-setting="light"] .icon-light,
[data-theme-setting="dark"] .icon-dark {
  display: block !important;
}
