/* ==========================================================================
   Ownbase Web - Modern Dark Theme Design System for GitHub Pages
   ========================================================================== */

:root {
  --bg-main: #080c14;
  --bg-card: #0f172a;
  --bg-card-hover: #162036;
  --bg-card-alt: #1e293b;
  --bg-input: #0b1120;
  
  --border-subtle: #1e293b;
  --border-accent: #334155;
  --border-glow: rgba(59, 130, 246, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #ffffff;

  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation Bar */
.navbar {
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.9rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-highlight);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-badge {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-blue);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: 3.4rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* App Screenshot Window Mockup */
.mockup-window {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.6);
  margin-top: 1rem;
  border-color: rgba(59, 130, 246, 0.25);
}

.mockup-bar {
  background: #090e17;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-dots {
  display: flex;
  gap: 0.45rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-title {
  margin-left: 1.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.mockup-body {
  min-height: 380px;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #172554 0%, #090e1a 75%);
  text-align: center;
}

.mockup-icon {
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 10px 15px rgba(59, 130, 246, 0.4));
}

.mockup-body h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.mockup-body p {
  color: var(--text-secondary);
  max-width: 500px;
  font-size: 0.95rem;
}

/* Section Common */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

/* Grid System */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Code & Command Blocks */
.code-box {
  background: #060910;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1.25rem 0;
  position: relative;
}

.code-header {
  background: #0d131f;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
  border-color: var(--accent-blue);
}

pre {
  padding: 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: #0d131f;
  color: var(--text-primary);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Callout Alert Boxes */
.callout {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border-left: 4px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
  font-size: 0.95rem;
}

.callout-warning {
  border-left-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
}

.callout-success {
  border-left-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

/* Documentation Layout */
.docs-page {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  padding: 3rem 0;
}

.docs-sidebar {
  position: sticky;
  top: 5.5rem;
  height: calc(100vh - 6.5rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.sidebar-menu {
  list-style: none;
  margin-bottom: 2rem;
}

.sidebar-menu li {
  margin-bottom: 0.35rem;
}

.sidebar-menu a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.sidebar-menu a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-menu a.active {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  font-weight: 600;
}

.docs-body section {
  margin-bottom: 4.5rem;
}

.docs-body h2 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-body h3 {
  font-size: 1.35rem;
  margin: 2rem 0 0.85rem;
  color: var(--text-highlight);
}

.docs-body p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.docs-body ul, .docs-body ol {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.docs-body li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  margin-top: auto;
  background: #05080e;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent-blue);
}

/* Responsive */
@media (max-width: 992px) {
  .docs-page {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.4rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
  }
  .menu-toggle {
    display: block;
  }
}

