/* ═══════════════════════════════════════════════════════════════
   OdimarDev Apps — Design System
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:        #0a0d14;
  --bg2:       #0f1320;
  --bg3:       #151b2e;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.14);
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --accent:    #3b82f6;
  --accent2:   #6366f1;
  --green:     #22c55e;
  --yellow:    #eab308;
  --red:       #ef4444;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --transition: all .22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* ── CONTAINER ─────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section   { padding: 4rem 0; }

/* ── NAVBAR ────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,13,20,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.15rem; transition: var(--transition);
}
.nav-brand:hover { opacity: .8; }
.brand-icon { font-size: 1.35rem; }
.brand-sub  { color: var(--text-muted); font-weight: 400; font-size: .95rem; }
.nav-links  { display: flex; gap: .5rem; }
.nav-link {
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem; border-radius: 8px;
  font-size: .9rem; color: var(--text-muted); transition: var(--transition);
}
.nav-link:hover { background: var(--bg3); color: var(--text); }

/* ── HERO ──────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 7rem 0 5rem; text-align: center;
  background: linear-gradient(180deg, #0d1526 0%, var(--bg) 100%);
}
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .18; pointer-events: none;
}
.hero-glow-1 { width: 500px; height: 500px; background: #3b82f6; top: -200px; left: 50%; transform: translateX(-50%); }
.hero-glow-2 { width: 300px; height: 300px; background: #6366f1; bottom: -100px; right: 10%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .9rem; border-radius: 999px;
  border: 1px solid rgba(59,130,246,.3); background: rgba(59,130,246,.08);
  color: #60a5fa; font-size: .82rem; font-weight: 600;
  margin-bottom: 1.5rem; letter-spacing: .02em;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1.1rem;
}
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  max-width: 580px; margin: 0 auto;
  color: var(--text-muted); font-size: 1.08rem; line-height: 1.7;
}

/* ── SECTION TITLE ─────────────────────────────────────────────── */
.section-title {
  font-size: 1.45rem; font-weight: 700; margin-bottom: 2rem;
  display: flex; align-items: center; gap: .5rem; color: var(--text);
}
.section-title i { color: var(--accent); }

/* ── APPS GRID ─────────────────────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ── APP CARD ──────────────────────────────────────────────────── */
.app-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: var(--transition); display: flex; flex-direction: column;
}
.app-card:hover {
  border-color: var(--border-h); transform: translateY(-4px); box-shadow: var(--shadow-lg);
}
.app-card-header {
  background: linear-gradient(135deg, var(--c1,#3b82f6), var(--c2,#1d4ed8));
  padding: 1.5rem; display: flex; align-items: flex-start; justify-content: space-between;
}
.app-icon-wrap {
  width: 56px; height: 56px; background: rgba(255,255,255,.15);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.app-big-icon { font-size: 1.8rem; line-height: 1; }
.app-header-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.platform-badges { font-size: .85rem; color: rgba(255,255,255,.75); display: flex; gap: .3rem; }

.app-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.app-name  { font-size: 1.15rem; font-weight: 700; }
.app-desc  { color: var(--text-muted); font-size: .88rem; line-height: 1.55; flex: 1; }

.app-version-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.version-tag, .release-date {
  display: flex; align-items: center; gap: .3rem;
  font-size: .78rem; color: var(--text-muted);
}
.version-tag { color: #60a5fa; font-weight: 600; }
.version-tag.no-release { color: var(--text-muted); font-weight: 400; }

.app-latest-change {
  background: rgba(59,130,246,.07); border: 1px solid rgba(59,130,246,.15);
  border-radius: 8px; padding: .6rem .8rem; font-size: .8rem;
  display: flex; flex-direction: column; gap: .2rem;
}
.change-label { color: #60a5fa; font-weight: 600; font-size: .75rem; }
.change-text  { color: var(--text-muted); }

.app-card-footer {
  padding: 1rem 1.4rem; border-top: 1px solid var(--border);
  display: flex; gap: .6rem; align-items: center;
}

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: 9px;
  font-size: .88rem; font-weight: 600; cursor: pointer; border: none;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; border: 1px solid var(--border-h); color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); border-color: rgba(255,255,255,.22); }
.btn-lg { padding: .75rem 1.5rem; font-size: .95rem; }
.btn-filename {
  font-size: .72rem; font-weight: 400; opacity: .75;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── BADGES ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge-stable  { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.badge-beta    { background: rgba(234,179,8,.15);   color: #facc15; border: 1px solid rgba(234,179,8,.25); }
.badge-wip     { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.badge-version { background: rgba(59,130,246,.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,.25); }

/* ── APP HERO (detail page) ────────────────────────────────────── */
.app-hero {
  position: relative; overflow: hidden; padding: 5rem 0 4rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1,#3b82f6) 15%, #0a0d14), #0a0d14 70%);
  border-bottom: 1px solid var(--border);
}
.app-hero-inner { display: flex; align-items: flex-start; gap: 2.5rem; position: relative; z-index: 1; }
.app-hero-icon {
  font-size: 5rem; line-height: 1;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px; width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; backdrop-filter: blur(10px);
}
.app-hero-info    { flex: 1; }
.app-hero-badges  { display: flex; gap: .5rem; margin-bottom: .9rem; flex-wrap: wrap; }
.app-hero-title   { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .6rem; }
.app-hero-desc    { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin-bottom: 1.5rem; line-height: 1.6; }
.app-hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; align-items: center; }
.app-meta-row     { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--text-muted); font-size: .85rem; }
.app-meta-row span { display: flex; align-items: center; gap: .4rem; }

.download-info {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem; background: rgba(59,130,246,.07);
  border: 1px solid rgba(59,130,246,.2); border-radius: 9px;
  color: #93c5fd; font-size: .88rem;
}

/* ── DETAIL GRID ───────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 310px; gap: 1.75rem; align-items: start; }

@media (max-width: 768px) {
  .detail-grid        { grid-template-columns: 1fr; }
  .app-hero-inner     { flex-direction: column; align-items: center; text-align: center; }
  .app-hero-actions   { justify-content: center; }
  .app-meta-row       { justify-content: center; }
}

/* ── CARD ──────────────────────────────────────────────────────── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 1.25rem; }
.card-header {
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02);
}
.card-header h2, .card-header h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.card-header h2 i, .card-header h3 i { color: var(--accent); }
.card-body { padding: 1.4rem; }

/* ── CHANGELOG TIMELINE ────────────────────────────────────────── */
.changelog-timeline { display: flex; flex-direction: column; }
.cl-item { display: flex; gap: 1.2rem; position: relative; padding-bottom: 2rem; }
.cl-item:last-child { padding-bottom: 0; }
.cl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 7px; top: 16px; bottom: 0;
  width: 2px; background: var(--border);
}
.cl-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--border-h); border: 2px solid var(--bg2);
  flex-shrink: 0; margin-top: 4px; position: relative; z-index: 1;
}
.cl-latest .cl-dot { background: var(--accent); box-shadow: 0 0 12px rgba(59,130,246,.5); border-color: rgba(59,130,246,.3); }
.cl-content { flex: 1; min-width: 0; }
.cl-header  { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .75rem; }
.cl-version { font-weight: 700; font-size: 1rem; }
.cl-type {
  padding: .15rem .5rem; border-radius: 5px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.cl-major { background: rgba(99,102,241,.18); color: #a5b4fc; border: 1px solid rgba(99,102,241,.25); }
.cl-minor { background: rgba(59,130,246,.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,.2); }
.cl-patch { background: rgba(34,197,94,.12);   color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.cl-date  { color: var(--text-muted); font-size: .8rem; display: flex; align-items: center; gap: .3rem; }
.cl-current-tag {
  display: flex; align-items: center; gap: .3rem;
  background: rgba(234,179,8,.12); color: #fbbf24;
  border: 1px solid rgba(234,179,8,.2); padding: .15rem .55rem;
  border-radius: 5px; font-size: .7rem; font-weight: 700;
}

/* Notas vindas do markdown da release */
.cl-notes { list-style: none; display: flex; flex-direction: column; gap: .35rem; margin: .35rem 0; }
.cl-notes li { font-size: .88rem; color: var(--text-muted); padding-left: 1rem; position: relative; }
.cl-notes li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.cl-latest .cl-notes li { color: var(--text); }
.cl-section { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin: .6rem 0 .25rem; }
.cl-para    { font-size: .88rem; color: var(--text-muted); margin: .2rem 0; }
.cl-latest .cl-para { color: var(--text); }
.no-notes   { font-size: .88rem; color: var(--text-muted); }

/* ── INFO LIST ─────────────────────────────────────────────────── */
.info-list { display: flex; flex-direction: column; gap: .1rem; }
.info-list dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-top: .8rem; }
.info-list dt:first-child { margin-top: 0; }
.info-list dd { font-size: .92rem; color: var(--text); }
.info-list dd a { color: #60a5fa; }
.info-list dd a:hover { text-decoration: underline; }

/* ── DOWNLOAD CARD ─────────────────────────────────────────────── */
.download-card .card-body { display: flex; flex-direction: column; }
.download-file-name { font-size: .85rem; color: var(--text); font-weight: 600; display: flex; align-items: center; gap: .4rem; word-break: break-all; }
.download-file-name i { color: var(--accent); flex-shrink: 0; }
.download-size { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }

/* ── UPDATE CARD ───────────────────────────────────────────────── */
.update-hint { color: var(--text-muted); font-size: .85rem; margin-bottom: 1rem; line-height: 1.5; }
.update-latest-version {
  display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem;
  background: rgba(34,197,94,.06); border: 1px solid rgba(34,197,94,.15); border-radius: 10px;
}
.version-big { font-size: 1.4rem; font-weight: 800; color: #4ade80; }

/* ── LOADING PULSE ─────────────────────────────────────────────── */
.loading-pulse { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.pulse-card {
  flex: 1; min-width: 280px; height: 280px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ── ERROR ─────────────────────────────────────────────────────── */
.error-msg { color: #f87171; padding: 2rem; text-align: center; font-size: 1rem; }

/* ── FOOTER ────────────────────────────────────────────────────── */
.footer { margin-top: 5rem; border-top: 1px solid var(--border); padding: 2.5rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; }
.footer-copy { color: var(--text-muted); font-size: .83rem; }
.footer-copy a { color: #60a5fa; }
.footer-copy a:hover { text-decoration: underline; }
