/* Nevernote Documentation Shared Styles */

:root {
  --bg-dark: #0a0e17;
  --bg-card: rgba(15, 23, 42, 0.8);
  --border: rgba(100, 116, 139, 0.2);
  --cyan: #22d3ee;
  --green: #4ade80;
  --purple: #a78bfa;
  --orange: #fb923c;
  --blue: #60a5fa;
  --pink: #f472b6;
  --red: #f87171;
  --yellow: #fcd34d;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
}

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

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse at 20% 0%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(167, 139, 250, 0.08) 0%, transparent 50%);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Navigation */
.doc-nav {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.doc-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.doc-nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.doc-nav-logo img {
  width: 32px;
  height: 32px;
}

.doc-nav-logo span {
  font-size: 1.25rem;
  font-weight: 600;
}

.doc-nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.doc-nav-links a:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
}

.doc-nav-links a.active {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
}

/* Header */
header {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 20px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Section */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3 .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card p, .card ul {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card ul {
  list-style: none;
}

.card ul li {
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card ul li::before {
  content: '•';
  color: var(--cyan);
  font-weight: bold;
}

/* Feature Cards */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  border-left: 4px solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.feature-card.green { border-left-color: var(--green); }
.feature-card.orange { border-left-color: var(--orange); }
.feature-card.purple { border-left-color: var(--purple); }
.feature-card.cyan { border-left-color: var(--cyan); }
.feature-card.blue { border-left-color: var(--blue); }
.feature-card.pink { border-left-color: var(--pink); }
.feature-card.yellow { border-left-color: var(--yellow); }

.feature-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card.green h4 { color: var(--green); }
.feature-card.orange h4 { color: var(--orange); }
.feature-card.purple h4 { color: var(--purple); }
.feature-card.cyan h4 { color: var(--cyan); }
.feature-card.blue h4 { color: var(--blue); }
.feature-card.pink h4 { color: var(--pink); }
.feature-card.yellow h4 { color: var(--yellow); }

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Link Cards */
.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--cyan);
}

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

.link-card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.link-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.link-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.link-card-arrow {
  color: var(--cyan);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Badges */
.badge {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

.badge-green {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-orange {
  background: rgba(251, 146, 60, 0.15);
  color: var(--orange);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.badge-purple {
  background: rgba(167, 139, 250, 0.15);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.badge-cyan {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

/* Code Blocks */
.code-block {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  overflow-x: auto;
}

.code-block h4 {
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 16px;
  font-weight: 500;
}

.code-block pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.code-block .key { color: var(--pink); }
.code-block .string { color: #fcd34d; }
.code-block .encrypted { color: var(--green); }
.code-block .plain { color: var(--orange); }
.code-block .comment { color: #64748b; font-style: italic; }
.code-block .bool { color: var(--purple); }

/* Step Flow */
.step-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.step {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  min-width: 140px;
}

.step .num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: var(--bg-dark);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

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

.step-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
}

/* Flow Diagram */
.flow-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 0;
}

.flow-node {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  min-width: 200px;
  transition: all 0.3s ease;
}

.flow-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.flow-node.primary {
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.15);
}

.flow-node.server {
  border-color: var(--purple);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.15);
}

.flow-node.drive {
  border-color: var(--blue);
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.15);
}

.node-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.node-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.node-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.node-badge.encrypted {
  background: rgba(74, 222, 128, 0.2);
  color: var(--green);
}

.node-badge.plaintext {
  background: rgba(251, 146, 60, 0.2);
  color: var(--orange);
}

.node-badge.backup {
  background: rgba(167, 139, 250, 0.2);
  color: var(--purple);
}

.node-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
  list-style: none;
}

.node-details li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.node-details li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: rgba(148, 163, 184, 0.5);
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.flow-arrow svg {
  width: 48px;
  height: 24px;
}

.flow-arrow span {
  font-size: 0.75rem;
  text-align: center;
  max-width: 100px;
}

/* AI Flow Diagram */
.ai-flow-diagram {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.ai-flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.ai-flow-row:last-child {
  margin-bottom: 0;
}

.ai-box {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  text-align: center;
  font-size: 0.85rem;
}

.ai-box.input { border-color: var(--cyan); }
.ai-box.process { border-color: var(--purple); }
.ai-box.output { border-color: var(--green); }

.ai-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* File Tree */
.file-tree-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.file-tree-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.file-tree-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.file-tree {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.9;
}

.file-tree .folder { color: #fcd34d; }
.file-tree .file { color: var(--cyan); }
.file-tree .encrypted { color: var(--green); font-size: 0.7rem; }
.file-tree .server-encrypted { color: var(--purple); font-size: 0.7rem; }
.file-tree .plain { color: var(--orange); font-size: 0.7rem; }
.file-tree .comment { color: #64748b; font-size: 0.7rem; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 16px;
  margin-top: 48px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Input Flow */
.input-flow {
  display: flex;
  align-items: stretch;
  gap: 24px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.input-column {
  flex: 1;
  min-width: 200px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
}

.input-column h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-column ul {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.input-column ul li {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-column ul li span.icon {
  font-size: 1rem;
}

/* Hero Diagram */
.hero-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.hero-diagram::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-title h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

/* Feature Icon Grid */
.feature-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.feature-icon-item {
  text-align: center;
  padding: 16px 8px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.feature-icon-item:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: var(--cyan);
}

.feature-icon-item .emoji {
  font-size: 2rem;
  margin-bottom: 8px;
}

.feature-icon-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3);
}

/* Footer */
.doc-footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.doc-footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.doc-footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.doc-footer-links a {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
}

.doc-footer-links a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero-diagram { padding: 24px; }
  .flow-container { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .flow-arrow span { display: none; }
  .doc-nav-links { display: none; }
}

