/* ============================================================
   MARLTHON WEBSITE — styles.css
   Dark, clean, minimalist — Inter font
   ============================================================ */

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

:root {
  --bg:       #1a1a2e;
  --surface:  #222236;
  --card:     #2a2a42;
  --border:   rgba(255,255,255,0.10);
  --accent:   #f59e0b;
  --accent-h: #fbbf24;
  --green:    #10B981;
  --muted:    #9ca3b8;
  --text:     #d4d8e8;
  --bright:   #f0f2fc;
  --red:      #ef4444;
  --max:      1020px;
  --r:        8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- Typography ---- */
h1, h2, h3, h4 { color: var(--bright); font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
p  { margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }
strong { color: var(--bright); }
code { font-family: monospace; font-size: .85em; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .82rem; font-weight: 600; font-family: inherit;
  letter-spacing: .03em; white-space: nowrap;
  padding: 9px 18px; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary   { background: var(--accent);   color: #000; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #000; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.secondary:hover { border-color: rgba(255,255,255,.2); color: var(--bright); }
.btn.info      { background: rgba(56,189,248,.12); color: #38bdf8; border-color: rgba(56,189,248,.3); }
.btn.info:hover { background: rgba(56,189,248,.22); border-color: rgba(56,189,248,.5); color: #7dd3fc; }
.btn.success   { background: var(--green); color: #fff; border-color: var(--green); }
.btn.success:hover { filter: brightness(1.1); color: #fff; }
.btn.danger    { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(239,68,68,.25); }
.btn.danger:hover { background: rgba(239,68,68,.22); }

.text-link { color: var(--accent); font-weight: 500; }
.text-link:hover { color: var(--accent-h); }

/* ---- Forms ---- */
label { display: block; font-size: .83rem; font-weight: 500; color: var(--text); margin-bottom: 14px; }
label > span, label > :first-child { display: block; margin-bottom: 5px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

input[type=text], input[type=email], input[type=password],
input[type=number], textarea, select {
  width: 100%; padding: 9px 13px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px; color: var(--bright); font-size: .93rem;
  font-family: 'JetBrains Mono', monospace; transition: border-color .15s, background .15s;
}
input:hover, textarea:hover, select:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.07); }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.28); font-style: italic; }
textarea { resize: vertical; line-height: 1.55; }

.radio-group { border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; margin: 8px 0; }
.radio-group legend { padding: 0 6px; color: var(--muted); font-size: .78rem; }
.radio-label { display: inline-flex; align-items: center; gap: 7px; margin-right: 18px; cursor: pointer; font-size: .88rem; }
.radio-label input { width: auto; accent-color: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: rgba(15,23,32,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; width: 100%;
}
.site-header .container { display: flex; align-items: center; height: 64px; gap: 8px; }

.brand a { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 48px; display: block; }

nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
nav a {
  font-size: .82rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 6px 10px; border-radius: 6px;
  transition: color .15s, background .15s;
}
nav a:hover, nav a.active { color: var(--accent); background: rgba(245,158,11,.08); }

.cart-link {
  display: flex; align-items: center; gap: 7px;
  color: var(--muted); text-decoration: none;
  font-size: .82rem; font-weight: 500;
  padding: 7px 13px; border: 1px solid var(--border);
  border-radius: 6px; transition: all .15s; flex-shrink: 0;
}
.cart-link svg { width: 15px; height: 15px; stroke: currentColor; }
.cart-link:hover { color: var(--accent); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.06); }

.announcement-bar {
  background: rgba(245,158,11,.08);
  border-top: 1px solid rgba(245,158,11,.15);
  border-bottom: 1px solid rgba(245,158,11,.08);
  padding: 7px 24px; text-align: center;
}
.affiliate-ad {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text); font-size: .8rem;
  padding: 2px 8px; border-radius: 5px; transition: background .15s, color .15s;
}
.affiliate-ad:hover { background: rgba(255,255,255,.04); color: var(--bright); }
.ad-logo  { height: 15px; opacity: .8; }
.ad-text  { font-weight: 500; }
.ad-discount {
  background: var(--green); color: #fff;
  font-size: .68rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; letter-spacing: .03em;
}
#rotating-slogan { display: inline-block; min-width: 260px; text-align: left; transition: opacity .4s; }
#rotating-slogan.fade-out { opacity: 0; }

/* ============================================================
   HOME
   ============================================================ */
.hero { padding: 60px 0 48px; }
.hero-tag {
  display: inline-block; font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: var(--bright); margin-bottom: 16px; }
.hero-title span { color: var(--accent); }
.hero-subtitle { font-size: .98rem; color: var(--muted); max-width: 520px; margin-bottom: 30px; line-height: 1.7; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 0 0 44px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 20px;
  transition: border-color .2s;
}
.feature-card:hover { border-color: rgba(245,158,11,.25); }
.feature-icon { font-size: 1.4rem; margin-bottom: 12px; }
.feature-card h3 { font-size: .9rem; margin-bottom: 6px; }
.feature-card p  { font-size: .84rem; color: var(--muted); margin: 0; }

.cta-hosting {
  background: var(--card); border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--r); padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; margin-bottom: 44px;
}
.cta-hosting h2 { font-size: 1.15rem; margin-bottom: 8px; }
.cta-hosting p  { font-size: .87rem; color: var(--muted); max-width: 540px; margin: 0; }
.cta-action { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
.cta-logo   { max-width: 120px; }

.news { padding-bottom: 52px; }
.section-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.news ul { list-style: none; }
.news li {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: .87rem; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.news li::before { content: '›'; color: var(--accent); font-size: 1rem; }

/* ============================================================
   SHOP
   ============================================================ */
.shop-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 32px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.shop-header h2 { font-size: 1.3rem; }
.shop-header span { font-size: .78rem; color: var(--muted); }

.shop-layout { display: grid; grid-template-columns: 1fr 288px; gap: 24px; align-items: start; padding-bottom: 60px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }

.product {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.product:hover { border-color: rgba(245,158,11,.3); transform: translateY(-2px); }
.product-img { aspect-ratio: 1/1; background: #080e17; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.product:hover .product-img img { transform: scale(1.04); }
.product-body { padding: 13px 14px; flex: 1; display: flex; flex-direction: column; }
.product h4 { font-size: .88rem; font-weight: 600; color: var(--bright); margin-bottom: 2px; }
.product .by { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.product .dl { font-size: .72rem; color: var(--muted); margin-bottom: 6px; }
.product .price { font-size: 1rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.product .short { font-size: .78rem; color: var(--muted); line-height: 1.5; margin-bottom: 12px; flex: 1; }
.product-footer { padding: 0 14px 13px; display: flex; gap: 7px; justify-content: flex-end; }

/* Tags */
.tag-free    { display:inline-block; background:rgba(16,185,129,.15); color:#34d399; font-size:.65rem; font-weight:700; padding:2px 7px; border-radius:4px; border:1px solid rgba(16,185,129,.25); }
.tag-updated { display:inline-block; background:rgba(16,185,129,.15); color:#34d399; font-size:.65rem; font-weight:700; padding:2px 7px; border-radius:4px; border:1px solid rgba(16,185,129,.25); letter-spacing:.04em; }
.tag-ver     { font-size:.72rem; color:var(--muted); margin-left:4px; }


.cart-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  position: static;
}
.cart-panel h3 { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 14px; }
.cart-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); gap: 8px; font-size: .84rem; }
.cart-row .price-sm { font-size: .74rem; color: var(--muted); }
.cart-footer { padding-top: 14px; display: flex; justify-content: space-between; align-items: center; }
.cart-footer .total-row { font-size: .88rem; margin-bottom: 0; color: var(--muted); }
#cart-total { font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.cart-actions { display: flex; flex-direction: row; gap: 7px; }
.cart-actions .btn { width: auto; justify-content: center; }
.remove-btn { background: none; border: none; color: var(--muted); font-size: .73rem; cursor: pointer; text-decoration: underline; font-family: inherit; flex-shrink: 0; }
.remove-btn:hover { color: var(--red); }

/* ============================================================
   MOD DETAIL PAGE
   ============================================================ */
.detail-wrap { padding: 28px 0 60px; }

.carousel {
  position: relative; width: 100%; padding-bottom: 50%; height: 0;
  background: #060b11; border-radius: var(--r) var(--r) 0 0; overflow: hidden;
}
.carousel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.carousel-controls {
  position: absolute; inset: 0; display: flex;
  justify-content: space-between; align-items: center;
  padding: 0 10px; pointer-events: none;
}
.carousel-controls button {
  background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 15px; cursor: pointer;
  pointer-events: all; transition: background .15s;
}
.carousel-controls button:hover { background: rgba(0,0,0,.8); }

.detail-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }

.detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 22px; border-bottom: 1px solid var(--border); gap: 16px;
}
.detail-header h2 { font-size: 1.3rem; margin-bottom: 4px; }
.detail-header .by  { font-size: .8rem; color: var(--muted); }
.detail-header .dl  { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.detail-price { font-size: 1.5rem; font-weight: 700; color: var(--accent); text-align: right; margin-bottom: 10px; }
.detail-btns  { display: flex; gap: 7px; justify-content: flex-end; }

.detail-body { padding: 22px; line-height: 1.75; font-size: .93rem; }
.detail-body h2, .detail-body h3 { margin: 20px 0 10px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 8px; }
.detail-body h4 { margin: 14px 0 6px; font-size: .9rem; color: var(--accent); }
.detail-body h2:first-child, .detail-body h3:first-child { margin-top: 0; }
.detail-body hr + h2, .detail-body hr + h3 { margin-top: 4px; }
.detail-body ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.detail-body ul li { color: var(--text); margin-bottom: 5px; line-height: 1.6; }
.detail-body p  { color: var(--text); margin-bottom: 12px; }
.detail-body ul, .detail-body ol { padding-left: 20px; margin-bottom: 12px; }
.detail-body li { color: var(--text); margin-bottom: 5px; }
.detail-body img { max-width: 100%; display: inline-block; vertical-align: middle; margin: 5px 10px 5px 0; border-radius: 6px; }
.detail-body a { color: var(--accent); }
.detail-body code { font-family: monospace; font-size: .85em; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; }
.detail-body details { margin-bottom: 14px; }
.detail-body summary { cursor: pointer; font-weight: 600; color: var(--bright); }
.detail-body details > *:first-child { margin-top: 8px; }
.detail-body details p { color: var(--muted); margin-top: 6px; }
.detail-body hr { border: none; border-top: 2px solid rgba(255,255,255,0.12); margin: 28px 0 24px; }

/* ============================================================
   INNER PAGES (contact, custom, register)
   ============================================================ */
.page-header { padding: 36px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.page-header h2 { font-size: 1.3rem; }
.page-header p  { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }

.form-layout { display: flex; gap: 48px; align-items: flex-start; padding-bottom: 60px; }
.form-main { flex: 1.5; }
.form-info { flex: 1; }
.form-info h3 { color: var(--accent); font-size: .95rem; margin-bottom: 12px; }
.form-info p  { font-size: .86rem; color: var(--muted); line-height: 1.7; }
.form-info a  { color: var(--accent); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.78);
  backdrop-filter: blur(4px); display: flex; justify-content: center;
  align-items: center; z-index: 200; padding: 20px;
}
.modal-content {
  background: var(--card); border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--r); padding: 28px 32px;
  max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto;
}
.modal-content h3 { color: var(--accent); margin-bottom: 12px; text-align: center; }
.hidden { display: none !important; }

/* ============================================================
   TOAST
   ============================================================ */
#toast-notification {
  position: fixed; bottom: 22px; right: 22px; z-index: 300;
  padding: 11px 18px; background: var(--accent); color: #000;
  font-size: .8rem; font-weight: 700; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transform: translateY(80px); opacity: 0; visibility: hidden;
  transition: transform .3s, opacity .3s, visibility .3s;
}
#toast-notification.show { transform: translateY(0); opacity: 1; visibility: visible; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-content small { color: var(--muted); font-size: .76rem; }
.footer-content .text-link { color: var(--muted); font-weight: 400; font-size: .74rem; }
.footer-content .text-link:hover { color: var(--text); }
.social-links a img { display: block; opacity: .65; transition: opacity .15s; }
.social-links a:hover img { opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .shop-layout { grid-template-columns: 1fr; }
  .cart-panel  { position: static; }
  .features    { grid-template-columns: repeat(2,1fr); }
  .cta-hosting { flex-direction: column; }
}
@media (max-width: 680px) {
  .site-header .container { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  nav { order: 3; width: 100%; gap: 0; }
  nav a { font-size: .78rem; }
  .brand img { height: 40px; }
  .features { grid-template-columns: 1fr; }
  .form-layout { flex-direction: column; }
  .footer-content { flex-direction: column; text-align: center; }
  .detail-header { flex-direction: column; }
  .detail-btns { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.6rem; }
}

/* ============================================================
   VIDEO EMBED
   ============================================================ */
.video-wrap { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 16px 0; border-radius: 6px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   DONATE BUTTONS
   ============================================================ */
.donate-buttons { display: flex; justify-content: center; gap: 14px; margin: 16px 0; }
.donate-buttons img { width: 160px; height: auto; }
/* ============================================================
   MARKDOWN FORMATTING (Thunderstore Style)
   ============================================================ */
.markdown-body {
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.95rem;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: #fff;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3em;
}
.markdown-body img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1em 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.markdown-body p { margin-bottom: 1em; }
.markdown-body ul, .markdown-body ol { margin-bottom: 1em; padding-left: 2em; }
.markdown-body li { margin-bottom: 0.25em; }
.markdown-body pre {
  background: #0f1720;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1em;
  border: 1px solid var(--border);
}
.markdown-body code {
  background: rgba(255,255,255,0.1);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
}
.markdown-body pre code { background: transparent; padding: 0; border: none; }
.markdown-body a { color: var(--accent); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1em;
  color: var(--muted);
  margin-bottom: 1em;
  background: rgba(245, 158, 11, 0.05);
  padding: 10px 15px;
  border-radius: 0 4px 4px 0;
}

/* ============================================================
   LATEST UPDATES WIDGET (HOME)
   ============================================================ */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.update-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  gap: 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.update-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.15);
}

.update-icon {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.update-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.update-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 4px;
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.tag-ver {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.update-date {
  color: var(--muted);
}

.update-link {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.update-link:hover {
  text-decoration: underline;
}

/* Deixa em apenas 1 coluna no celular */
@media (max-width: 680px) {
  .updates-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ESTILO DE TABELAS (THUNDERSTORE)
   ============================================================ */
.detail-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    background-color: #12171e;
    border: 1px solid #30363d;
    font-size: 0.78rem;
    border-radius: 6px;
    overflow: hidden;
    table-layout: auto;
}

.detail-body th {
    background-color: #0d1117;
    color: #f0f6fc;
    font-weight: 600;
    text-align: left;
    padding: 7px 10px;
    border: 1px solid #30363d;
    white-space: nowrap;
}

.detail-body td {
    padding: 6px 10px;
    border: 1px solid #30363d;
    color: #c9d1d9;
}

/* Efeito de listras (Zebra) igual da Thunderstore */
.detail-body tr:nth-child(even) {
    background-color: #0d1117;
}

.detail-body tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Scroll horizontal em telas pequenas */
.detail-body small {
    font-size: 0.75rem;
}
.detail-body small table {
    font-size: 0.75rem;
}