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

/* ============================================================
   DESIGN TOKENS — idênticos ao ModernUI do Koda Electron
   Fonte: src/renderer/components/modern/ModernUI.tsx
   ============================================================ */
:root {
  /* Backgrounds — extraídos do ModernUI */
  --bg-base:          #141414;  /* bg-[#141414] — fundo raiz e painéis */
  --bg-sidebar:       #141414;  /* mesmo fundo, sidebar e iconbar */
  --bg-panel:         #1a1a1a;  /* cards/surfaces um toque mais claro */

  /* Texto */
  --text-primary:     #e2e8f0;  /* text-slate-200 */
  --text-secondary:   #cbd5e1;  /* text-slate-300 */
  --text-muted:       #71717a;  /* text-zinc-500 */
  --text-faint:       #52525b;  /* text-zinc-600 */

  /* Bordas — border-white/5 e border-white/10 */
  --border-subtle:    rgba(255, 255, 255, 0.05);
  --border-soft:      rgba(255, 255, 255, 0.10);

  /* Acentos — cyan (ativo) e indigo (seleção/hover) */
  --accent-cyan:      #22d3ee;  /* text-cyan-400 */
  --accent-cyan-bg:   rgba(34, 211, 238, 0.10);  /* bg-cyan-500/10 */
  --accent-indigo:    #818cf8;  /* text-indigo-400 */
  --accent-indigo-bg: rgba(99, 102, 241, 0.10);  /* bg-indigo-500/10 */

  /* Status */
  --status-green:     #34d399;  /* text-emerald-400 */
  --status-green-bg:  rgba(52, 211, 153, 0.10);  /* bg-emerald-500/10 */
  --status-amber:     #fbbf24;  /* text-amber-400 */
  --status-amber-bg:  rgba(251, 191, 36, 0.10);  /* bg-amber-500/10 */

  /* Seleção de texto */
  --selection-bg:     rgba(99, 102, 241, 0.30);  /* selection:bg-indigo-500/30 */

  /* Código */
  --code-bg:          #0d0d0d;

  /* Fontes */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   BASE
   ============================================================ */
html {
  scroll-behavior: smooth;
  background-color: #141414;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection {
  background-color: var(--selection-bg);
  color: #ffffff;
}

/* ============================================================
   SCROLLBAR — dark, visível sobre fundo #141414
   ============================================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: #2e2e2e #141414;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #141414; }
::-webkit-scrollbar-thumb {
  background: #2e2e2e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }
::-webkit-scrollbar-thumb:active { background: #4a4a4a; }
::-webkit-scrollbar-corner { background: #141414; }

/* ============================================================
   HEADER & NAVBAR
   ============================================================ */
header {
  background-color: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.3rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.logo svg {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}



/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Botão primário: branco */
.btn-primary {
  background-color: #ffffff;
  color: #141414;
  border: 1px solid #ffffff;
}

.btn-primary:hover {
  background-color: #e5e5e5;
  border-color: #e5e5e5;
}

/* Botão secundário: estilo ghost do ModernUI */
.btn-secondary {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
}

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

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.badge {
  align-self: flex-start;
  background-color: var(--accent-indigo-bg);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-indigo);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-title {
  font-family: 'Outfit', var(--font-sans);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ============================================================
   DEMO CODE BLOCK
   ============================================================ */
.hero-visual { width: 100%; }

.demo-box {
  background-color: var(--code-bg);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.demo-header {
  background-color: var(--bg-base);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.demo-header span { color: var(--text-faint); font-size: 0.72rem; }

.demo-body {
  padding: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: auto;
}

.demo-line { margin-bottom: 0.15rem; }
.demo-comment { color: var(--text-faint); }
.demo-output  { color: var(--text-muted); }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-base);
  padding: 5rem 1.5rem;
}

.section-header {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
}

.section-title {
  font-family: 'Outfit', var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 560px;
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;               /* gap de 1px com bg cria efeito de grid de bordas */
  background-color: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}

.feature-card {
  background-color: var(--bg-base);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background-color 0.15s ease;
}

.feature-card:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ============================================================
   OPEN SOURCE / INSTALLATION SECTION
   ============================================================ */
.opensource {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.os-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.os-code-box {
  background-color: var(--code-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.9;
  overflow-x: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-base);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

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

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

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

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

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

/* ============================================================
   RESPONSIVE & UTILS
   ============================================================ */
@media (max-width: 768px) {
  .hero, .opensource {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem;
    gap: 2rem;
  }
  .hero-title { font-size: 2.25rem; }
  .nav-menu { display: none; }
  .features-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BOTÃO COPIAR E FEEDBACK VISUAL (LIMPO & NEUTRO)
   ============================================================ */
.btn-copy {
  position: relative;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-copy:active {
  transform: scale(0.95);
}

.btn-copy:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-copy.copied {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.btn-copy svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   SELETOR DE IDIOMA (PT / EN)
   ============================================================ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

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

.lang-btn.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.lang-divider {
  color: var(--text-faint);
  font-size: 0.65rem;
}

/* ============================================================
   HERO VIDEO PLAYER & FLIP EXPAND LIGHTBOX
   ============================================================ */
.hero-video-container {
  width: 100%;
  max-width: 920px;
  margin-top: 0.75rem;
  position: relative;
}

.hero-video-wrapper {
  width: 100%;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.hero-video-element {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background-color: #0d0d0d;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              border-radius 0.45s ease;
}

.hero-video-wrapper:hover .hero-video-element {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Fundo desfocado (Backdrop Blur) */
.video-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Estado Expandido via Transform Zoom */
.hero-video-wrapper.is-expanded {
  z-index: 999;
}

.hero-video-wrapper.is-expanded .hero-video-element {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.95);
  border-radius: 16px;
}

/* ============================================================
   CHANGELOG PAGE
   ============================================================ */
.changelog-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.changelog-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.changelog-title {
  font-family: 'Outfit', var(--font-sans);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.changelog-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.version-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color 0.15s ease;
}

.version-card:hover {
  border-color: var(--border-soft);
}

.changelog-logs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.log-item {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all 0.15s ease;
  overflow: hidden;
}

.log-item:hover {
  border-color: var(--border-soft);
}

.log-item.active {
  border-color: var(--border-soft);
}

.log-header {
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.log-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.log-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}

.log-item.active .log-chevron {
  transform: rotate(180deg);
  color: var(--text-secondary);
}

.log-title {
  font-family: 'Outfit', var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.log-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.log-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.assets-footer {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.75rem;
}

.log-item.active .assets-footer {
  display: flex;
}

.asset-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.825rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.asset-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.asset-link svg {
  flex-shrink: 0;
}

.asset-size {
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-left: auto;
}

.log-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 0 1.25rem;
}

.log-item.active .log-content {
  max-height: 5000px;
  padding: 0 1.25rem 1.25rem 1.25rem;
}

.log-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0.25rem;
}

.log-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.log-list li::before {
  content: "•";
  position: absolute;
  left: 0.35rem;
  color: var(--text-faint);
  font-size: 1rem;
}

/* ============================================================
   LOG LOADING, ERROR & EMPTY STATES
   ============================================================ */
.log-loading, .log-error, .log-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.log-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--text-muted);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.log-error {
  color: var(--status-amber);
}

/* ============================================================
   MARKDOWN BODY INSIDE LOG
   ============================================================ */
.log-body {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.log-body h1, .log-body h2, .log-body h3, .log-body h4 {
  font-family: 'Outfit', var(--font-sans);
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.log-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.log-body h4 {
  font-size: 0.85rem;
  font-weight: 600;
}

.log-body ul, .log-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.log-body li {
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.log-body p {
  margin-bottom: 0.75rem;
}

.log-body code {
  background-color: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.log-body pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.log-body pre code {
  background: none;
  padding: 0;
}

.log-body a {
  color: var(--accent-indigo);
  text-decoration: none;
}

.log-body a:hover {
  text-decoration: underline;
}

.log-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.log-body hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 1.25rem 0;
}



