/* SafeTest Documentation Stylesheet */

:root {
  color-scheme: dark;
  --bg-primary: #0A0D16;
  --bg-secondary: #111522;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-hover: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(0, 229, 255, 0.4);
  
  --accent-cyan: #00E5FF;
  --accent-purple: #8B5CF6;
  --accent-blue: #3B82F6;
  --accent-green: #10B981;
  --accent-amber: #F59E0B;
  
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'Courier New', Courier, monospace;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #F8FAFF;
  --bg-secondary: #EFF2FA;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-hover: rgba(0, 0, 0, 0.05);
  --border-light: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(0, 120, 200, 0.4);

  --accent-cyan: #0078C8;
  --accent-purple: #6D28D9;
  --accent-blue: #2563EB;
  --accent-green: #059669;
  --accent-amber: #D97706;

  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
}

[data-theme="light"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Header */
[data-theme="light"] .docs-header {
  background: rgba(248, 250, 255, 0.95);
  border-bottom-color: var(--border-light);
}

/* Sidebar */
[data-theme="light"] .docs-sidebar {
  background: #EFF2FA;
  border-right-color: var(--border-light);
}

[data-theme="light"] .sidebar-item.active a {
  background: rgba(0, 120, 200, 0.08);
  border-color: rgba(0, 120, 200, 0.15);
}

/* Orbs */
[data-theme="light"] .glow-orb {
  opacity: 0.1;
}

/* h1 gradient — use dark text in light mode */
[data-theme="light"] .doc-section h1 {
  background: linear-gradient(135deg, #111827, #4B5563);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Code blocks */
[data-theme="light"] .code-container {
  background: #F1F5F9;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-header {
  background: rgba(0, 0, 0, 0.04);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .code-block {
  color: #1E293B;
}

[data-theme="light"] .copy-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Tables */
[data-theme="light"] .matrix-table-wrapper {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .matrix-table th {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .matrix-table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Screenshot placeholder */
[data-theme="light"] .screenshot-placeholder {
  background: #E2E8F0;
  border-color: rgba(0, 0, 0, 0.1);
}

/* Back button hover */
[data-theme="light"] .back-btn:hover {
  border-color: rgba(0, 0, 0, 0.15);
}


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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Background Glow Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-purple), transparent);
  top: -100px;
  right: -100px;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-cyan), transparent);
  bottom: 10%;
  left: -100px;
}

/* Top Navigation Bar */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #0A0D16;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.back-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Search Bar styling */
.search-wrapper {
  position: relative;
  width: 300px;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 8px 16px 8px 38px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Docs Layout Containers */
.docs-wrapper {
  display: flex;
  flex: 1;
  position: relative;
}

/* Sidebar Navigation */
.docs-sidebar {
  width: 280px;
  background: rgba(17, 21, 34, 0.6);
  border-right: 1px solid var(--border-light);
  padding: 32px 16px;
  overflow-y: auto;
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 0;
  z-index: 90;
  transition: var(--transition-smooth);
}

.sidebar-group {
  margin-bottom: 24px;
}

.group-title {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 12px;
  font-weight: 700;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sidebar-item a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-item.active a {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
}

.sidebar-item.active a i {
  color: var(--accent-cyan);
}

.sidebar-item a i {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

/* Main Content Area */
.docs-content-container {
  flex: 1;
  margin-left: 280px;
  padding: 48px 64px;
  max-width: 960px;
}

/* Documentation Content Styling */
.doc-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.doc-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc-section h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.doc-section h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.doc-section h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--accent-cyan);
}

.doc-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.7;
}

.doc-section ul, .doc-section ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.doc-section li {
  margin-bottom: 8px;
  font-size: 15px;
}

.doc-section li strong {
  color: var(--text-primary);
}

/* Callout Box Styling */
.callout {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: 12px;
  margin: 24px 0;
  border-left: 4px solid transparent;
  background: var(--bg-card);
}

.callout-icon {
  display: flex;
  align-items: flex-start;
  margin-top: 2px;
}

.callout-body h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.callout-body p {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Callout types */
.callout.info {
  border-left-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}
.callout.info .callout-icon i {
  color: var(--accent-blue);
}
.callout.info h4 {
  color: var(--accent-blue);
}

.callout.tip {
  border-left-color: var(--accent-green);
  background: rgba(16, 185, 129, 0.05);
}
.callout.tip .callout-icon i {
  color: var(--accent-green);
}
.callout.tip h4 {
  color: var(--accent-green);
}

.callout.warning {
  border-left-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.05);
}
.callout.warning .callout-icon i {
  color: var(--accent-amber);
}
.callout.warning h4 {
  color: var(--accent-amber);
}

/* Code block styling */
.code-container {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin: 20px 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

.code-lang {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.copy-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.code-block {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 1.5;
  color: #E5E7EB;
}

/* Basic Syntax Highlights */
.code-comment { color: var(--text-muted); }
.code-keyword { color: #F43F5E; }

/* Search Highlight */
mark {
  background: rgba(250, 204, 21, 0.4);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}
[data-theme="light"] mark {
  background: rgba(234, 179, 8, 0.35);
}
.code-string { color: #34D399; }
.code-func { color: #60A5FA; }

/* Platform Matrix Table */
.matrix-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.matrix-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.matrix-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

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

.matrix-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.badge-yes {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
}

.badge-no {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
}

/* Mobile Sidebar Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .docs-content-container {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .docs-header {
    padding: 0 16px;
  }
  
  .search-wrapper {
    width: 180px;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .docs-sidebar {
    transform: translateX(-100%);
    top: 70px;
    width: 260px;
    background: var(--bg-secondary);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  .docs-sidebar.active {
    transform: translateX(0);
  }
  
  .docs-content-container {
    margin-left: 0;
    padding: 24px 16px;
  }
  
  .doc-section h1 {
    font-size: 28px;
  }
  
  .doc-section h2 {
    font-size: 20px;
  }
}

/* Screenshot Placeholder Styling */
.screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 24px;
  margin: 24px 0;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.screenshot-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: var(--transition-smooth);
}

.screenshot-placeholder:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(0, 229, 255, 0.25);
}

.screenshot-placeholder:hover::before {
  opacity: 1;
}

.placeholder-icon {
  color: var(--accent-cyan);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.placeholder-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-top: 4px;
}

.placeholder-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-body);
  margin-top: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
