<?php
// Wiki pública de SlotMachine: docs + compra + reseñas (visibles sin login).
require_once __DIR__ . '/../includes/init.php';
require_once __DIR__ . '/../includes/plugins.php';
$slug = 'slotmachine';
$SM_PRICE = plugin_get($slug)['price'] ?? '4.99'; // precio desde el manifiesto (includes/plugins.php)
$loggedIn = is_logged_in();
$revTotal = 0; $revAvg = 0.0; $revDist = [5=>0,4=>0,3=>0,2=>0,1=>0]; $revList = []; $myRev = null; $revMsg = ''; $saved = false; $replies = [];

function wiki_pdo() {
    return new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8mb4', DB_USER, DB_PASS,
        [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC]);
}
function rw_stars($n) { $n = max(0, min(5, (int)$n)); return str_repeat('★', $n) . '<span class="off">' . str_repeat('★', 5 - $n) . '</span>'; }

// Enviar / editar reseña (una por usuario, editable).
if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['do'] ?? '') === 'review' && $loggedIn) {
    csrf_check();
    $rating = (int)($_POST['rating'] ?? 0); $comment = trim($_POST['comment'] ?? '');
    if ($rating >= 1 && $rating <= 5 && $comment !== '') {
        try {
            $pdo = wiki_pdo();
            $o = $pdo->prepare("SELECT 1 FROM licenses WHERE user_id=? AND plugin_slug=? AND status='active' LIMIT 1");
            $o->execute([$_SESSION['uid'], $slug]); $owns = $o->fetchColumn() ? 1 : 0;
            $pdo->prepare("INSERT INTO reviews (user_id, plugin_slug, rating, comment, verified_buyer) VALUES (?,?,?,?,?)
                ON DUPLICATE KEY UPDATE rating=VALUES(rating), comment=VALUES(comment), verified_buyer=VALUES(verified_buyer), created_at=NOW()")
                ->execute([$_SESSION['uid'], $slug, $rating, $comment, $owns]);
            header('Location: ./?saved=1'); exit;
        } catch (Throwable $e) { $revMsg = 'No se pudo guardar tu reseña. Intenta de nuevo.'; }
    } else { $revMsg = 'Elige estrellas y escribe un comentario.'; }
}
$saved = isset($_GET['saved']);

// Datos de reseñas (resiliente: si la BD falla, la wiki carga igual).
try {
    $pdo = wiki_pdo();
    $s = $pdo->prepare("SELECT COUNT(*) c, COALESCE(AVG(rating),0) a FROM reviews WHERE plugin_slug=? AND status='visible'");
    $s->execute([$slug]); $sm = $s->fetch();
    $revTotal = (int)$sm['c']; $revAvg = round((float)$sm['a'], 1);
    $s = $pdo->prepare("SELECT rating, COUNT(*) c FROM reviews WHERE plugin_slug=? AND status='visible' GROUP BY rating");
    $s->execute([$slug]); foreach ($s->fetchAll() as $r) { $revDist[(int)$r['rating']] = (int)$r['c']; }
    $s = $pdo->prepare("SELECT r.id, r.rating, r.comment, r.created_at, us.username, us.role,
        (SELECT GROUP_CONCAT(l.plugin_slug) FROM licenses l WHERE l.user_id=r.user_id AND l.status='active') owned
        FROM reviews r JOIN users us ON us.id=r.user_id
        WHERE r.plugin_slug=? AND r.status='visible' ORDER BY r.created_at DESC LIMIT 100");
    $s->execute([$slug]); $revList = $s->fetchAll();
    try {
        $rp = $pdo->prepare("SELECT id, admin_reply, admin_reply_at FROM reviews WHERE plugin_slug=? AND admin_reply IS NOT NULL AND admin_reply<>''");
        $rp->execute([$slug]);
        foreach ($rp->fetchAll() as $x) { $replies[(int)$x['id']] = $x; }
    } catch (Throwable $e) {}
    if ($loggedIn) {
        $m = $pdo->prepare("SELECT rating, comment FROM reviews WHERE user_id=? AND plugin_slug=?");
        $m->execute([$_SESSION['uid'], $slug]); $myRev = $m->fetch() ?: null;
    }
} catch (Throwable $e) {}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SlotMachine — Minecraft Casino Plugin | infinity3113</title>
<meta name="description" content="SlotMachine: real casino slot machines for Minecraft. Build them from a Jukebox and Item Frames, win real money via Vault. Docs, commands, config and prizes.">
<meta property="og:title" content="SlotMachine — Minecraft Casino Plugin">
<meta property="og:description" content="Real slot machines for your Minecraft server. Insert a coin, spin the reels, win real money.">
<meta property="og:type" content="website">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>%F0%9F%8E%B0</text></svg>">
<link rel="stylesheet" href="../assets/app.css">
</head>
<body>
<style>
  :root{
    --bg:#0d0a18; --bg2:#130f24; --panel:#191330; --panel2:#211a3d;
    --line:rgba(255,255,255,.09); --line2:rgba(255,255,255,.14);
    --gold:#f6c453; --gold-deep:#e0a92e;
    --pink:#ff3d84; --cyan:#34d2f2; --green:#37d67a;
    --text:#f1ecff; --muted:#a79dc7; --muted2:#7f7599;
    --maxw:1200px;
    --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
    --mono:ui-monospace,"SF Mono","Cascadia Code",Consolas,"Liberation Mono",monospace;
  }
  *{box-sizing:border-box}
  body{margin:0}
  #smhub{
    background:
      radial-gradient(1100px 600px at 82% -10%, rgba(255,61,132,.14), transparent 60%),
      radial-gradient(900px 520px at 4% 2%, rgba(52,210,242,.10), transparent 55%),
      linear-gradient(180deg,var(--bg2),var(--bg) 42%);
    color:var(--text);font-family:var(--sans);font-size:16px;line-height:1.62;
    min-height:100vh;-webkit-font-smoothing:antialiased;overflow-x:hidden;
  }
  #smhub a{color:inherit;text-decoration:none}
  #smhub h1,#smhub h2,#smhub h3{text-wrap:balance;line-height:1.1;margin:0;letter-spacing:-.02em}
  .eyebrow{font:600 12px/1 var(--mono);letter-spacing:.22em;text-transform:uppercase;color:var(--gold)}

  /* TOP BAR */
  .top{position:sticky;top:0;z-index:50;backdrop-filter:blur(14px);
    background:rgba(13,10,24,.78);border-bottom:1px solid var(--line)}
  .top .in{max-width:var(--maxw);margin:0 auto;padding:0 22px;display:flex;align-items:center;gap:16px;height:62px}
  .brand{display:flex;align-items:center;gap:11px;margin-right:auto}
  .brand .logo{width:38px;height:38px;border-radius:10px;flex:none;
    background:linear-gradient(145deg,var(--gold),var(--gold-deep));display:grid;place-items:center;font-size:20px;
    box-shadow:0 6px 20px rgba(246,196,83,.35),inset 0 1px 0 rgba(255,255,255,.5)}
  .brand b{font-size:15px;font-weight:800;display:block;letter-spacing:-.01em}
  .brand span{font:600 11px/1.3 var(--mono);color:var(--muted);letter-spacing:.06em}
  .dl{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:10px;font-weight:700;font-size:14px;
    background:linear-gradient(145deg,var(--gold),var(--gold-deep));color:#241a06;box-shadow:0 6px 18px rgba(246,196,83,.3)}
  .dl:hover{transform:translateY(-1px)}
  .lang{display:flex;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:3px}
  .lang button{border:0;background:transparent;color:var(--muted);font-family:var(--mono);font-size:12px;font-weight:600;
    padding:6px 9px;border-radius:7px;cursor:pointer;transition:.15s}
  .lang button:hover{color:var(--text)}
  .lang button.on{background:linear-gradient(145deg,var(--gold),var(--gold-deep));color:#241a06}
  .lang button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}

  /* LAYOUT */
  .layout{max-width:var(--maxw);margin:0 auto;padding:24px 22px 0;display:grid;grid-template-columns:246px minmax(0,1fr);gap:34px;align-items:start}

  /* SIDEBAR */
  .side{position:sticky;top:86px}
  .plugsel{display:flex;align-items:center;gap:10px;padding:12px 13px;border-radius:13px;margin-bottom:8px;
    border:1px solid var(--gold);background:linear-gradient(180deg,rgba(246,196,83,.1),var(--panel));
    box-shadow:0 6px 18px -10px var(--gold)}
  .plugsel .ic{font-size:20px}
  .plugsel b{font-size:14.5px;font-weight:800;display:block}
  .plugsel small{font:600 10px/1.3 var(--mono);color:var(--muted2);letter-spacing:.08em}
  .sidelabel{font:600 10px/1 var(--mono);letter-spacing:.18em;text-transform:uppercase;color:var(--muted2);padding:14px 12px 8px}
  .sidenav{display:flex;flex-direction:column;gap:2px}
  .sidenav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;font-size:14px;font-weight:600;
    color:var(--muted);cursor:pointer;transition:.14s;border-left:2px solid transparent}
  .sidenav a .n{width:19px;text-align:center;opacity:.85}
  .sidenav a:hover{color:var(--text);background:var(--panel)}
  .sidenav a.on{color:var(--text);background:var(--panel);border-left-color:var(--gold)}
  .sidenav a:focus-visible{outline:2px solid var(--cyan);outline-offset:1px}

  /* CONTENT */
  .content{min-width:0;padding-bottom:40px}
  .page{display:none;animation:fade .25s ease}
  .page.active{display:block}
  @keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
  .crumb{font:600 12px/1 var(--mono);letter-spacing:.05em;color:var(--muted2);margin-bottom:14px}
  .crumb b{color:var(--gold)}
  .ptitle{font-size:clamp(26px,4vw,36px);font-weight:800;margin-bottom:10px}
  .plead{color:var(--muted);font-size:16.5px;max-width:60ch;margin-bottom:28px}
  h3.sub{font-size:19px;font-weight:800;margin:34px 0 14px}

  /* HERO (overview) */
  .hero{display:grid;grid-template-columns:1.05fr .95fr;gap:34px;align-items:center;margin-bottom:14px}
  .badge{display:inline-flex;align-items:center;gap:8px;padding:7px 13px;border-radius:999px;
    background:var(--panel);border:1px solid var(--line2);font:600 12.5px/1 var(--sans);color:var(--muted);margin-bottom:20px}
  .badge .dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 10px var(--green)}
  .hero h1{font-size:clamp(40px,6vw,68px);font-weight:900}
  .hero h1 .grad{background:linear-gradient(120deg,#fff 8%,var(--gold) 52%,var(--pink));-webkit-background-clip:text;background-clip:text;color:transparent}
  .lede{color:var(--muted);font-size:clamp(15px,2vw,18px);margin:18px 0 26px;max-width:36ch}
  .cta{display:flex;gap:12px;flex-wrap:wrap}
  .btn{display:inline-flex;align-items:center;gap:9px;padding:12px 20px;border-radius:12px;font-weight:700;font-size:15px;cursor:pointer;border:1px solid transparent;transition:.18s}
  .btn.primary{background:linear-gradient(145deg,var(--gold),var(--gold-deep));color:#241a06;box-shadow:0 10px 26px rgba(246,196,83,.32)}
  .btn.primary:hover{transform:translateY(-2px)}
  .btn.ghost{background:var(--panel);border-color:var(--line2);color:var(--text)}
  .btn.ghost:hover{border-color:var(--gold);color:var(--gold)}
  .stats{display:flex;gap:24px;margin-top:30px;flex-wrap:wrap}
  .stats .s b{font-size:18px;font-weight:800;display:block;font-variant-numeric:tabular-nums}
  .stats .s span{font:600 10px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted2)}

  .machine{position:relative;justify-self:center;width:min(100%,380px);
    background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--line2);border-radius:24px;padding:24px 22px 28px;
    box-shadow:0 40px 90px -34px rgba(255,61,132,.4)}
  .marquee{text-align:center;font:800 12px/1 var(--mono);letter-spacing:.3em;color:var(--gold);text-transform:uppercase;margin-bottom:4px}
  .payline{text-align:center;font-size:32px;font-weight:900;letter-spacing:-.03em;margin-bottom:16px;
    background:linear-gradient(120deg,var(--gold),#fff,var(--gold));background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:sheen 4s linear infinite}
  @keyframes sheen{to{background-position:200% 0}}
  .reels{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}
  .reel{aspect-ratio:3/4;border-radius:15px;background:linear-gradient(180deg,#0b0817,#141024);border:2px solid var(--gold-deep);
    display:grid;place-items:center;font-size:clamp(34px,9vw,50px);box-shadow:inset 0 0 26px rgba(0,0,0,.6),0 0 22px rgba(246,196,83,.16);position:relative;overflow:hidden}
  .reel::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.12),transparent 32%,transparent 68%,rgba(0,0,0,.35))}
  .reel.spin{animation:spin .5s ease-out}
  @keyframes spin{0%,60%{filter:blur(6px)}100%{filter:blur(0)}}
  .lever{position:absolute;right:-15px;top:60px;width:13px;height:110px;background:linear-gradient(90deg,#3a3357,#221d38);border-radius:8px}
  .lever::before{content:"";position:absolute;top:-15px;left:-6px;width:25px;height:25px;border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--pink),#a81655);box-shadow:0 0 16px rgba(255,61,132,.6)}

  /* CARDS / TABLE / CODE — shared */
  .cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px}
  .card{background:linear-gradient(180deg,var(--panel),rgba(25,19,48,.55));border:1px solid var(--line);border-radius:16px;padding:20px;transition:.2s}
  .card:hover{border-color:var(--line2);transform:translateY(-3px)}
  .card .ico{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;font-size:21px;margin-bottom:14px;background:var(--panel2);border:1px solid var(--line2)}
  .card h3{font-size:16.5px;font-weight:800}
  .card p{color:var(--muted);font-size:14px;margin:8px 0 0}

  .tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel);margin-top:8px}
  table{width:100%;border-collapse:collapse;min-width:480px}
  th,td{text-align:left;padding:13px 16px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top}
  th{font:600 11px/1 var(--mono);letter-spacing:.13em;text-transform:uppercase;color:var(--muted2);background:rgba(255,255,255,.02)}
  tr:last-child td{border-bottom:0}
  code{font-family:var(--mono);font-size:12.5px;background:rgba(246,196,83,.1);color:var(--gold);padding:3px 7px;border-radius:6px;white-space:nowrap}
  .perm{font-family:var(--mono);font-size:12px;color:var(--cyan);white-space:nowrap}
  .pill{display:inline-block;font:600 10px/1 var(--mono);letter-spacing:.06em;text-transform:uppercase;padding:3px 6px;border-radius:5px;background:rgba(255,61,132,.14);color:var(--pink);margin-left:6px}
  pre{background:#0a0714;border:1px solid var(--line);border-radius:12px;padding:16px 18px;overflow-x:auto;margin:14px 0}
  pre code{background:none;color:#d6cffb;padding:0;white-space:pre;font-size:13px;line-height:1.7}
  .cmt{color:#6f6699}
  .note{margin-top:18px;padding:15px 17px;border-radius:12px;background:rgba(52,210,242,.08);border:1px solid rgba(52,210,242,.25);color:var(--muted);font-size:14px;display:flex;gap:11px}
  .note.warn{background:rgba(246,196,83,.08);border-color:rgba(246,196,83,.28)}
  .note b{color:var(--text)}

  /* PRIZES */
  .prizes{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-top:8px}
  .prize{background:var(--panel);border:1px solid var(--line);border-radius:15px;padding:18px;display:flex;flex-direction:column;gap:9px}
  .prize.jackpot{border-color:var(--gold);background:linear-gradient(180deg,rgba(246,196,83,.12),var(--panel))}
  .prize .combo{font-size:22px;letter-spacing:2px}
  .prize .lbl{font:600 10px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted2)}
  .prize .amt{font-size:20px;font-weight:900;font-variant-numeric:tabular-nums}
  .prize.jackpot .amt{color:var(--gold)} .prize .amt.small{font-size:16px;color:var(--green)}

  /* EDITIONS */
  .editions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:8px}
  .ed{border:1px solid var(--line);border-radius:18px;padding:24px;background:var(--panel)}
  .ed.pro{border-color:var(--gold);background:linear-gradient(180deg,rgba(246,196,83,.09),var(--panel))}
  .ed .tag{font:700 12px/1 var(--mono);letter-spacing:.1em;text-transform:uppercase}
  .ed.free .tag{color:var(--cyan)} .ed.pro .tag{color:var(--gold)}
  .ed h3{font-size:23px;font-weight:900;margin:9px 0 4px}
  .ed .desc{color:var(--muted);font-size:14px;margin-bottom:16px}
  .ed ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
  .ed li{display:flex;gap:10px;font-size:14px}
  .ed li .ck{flex:none;width:19px;height:19px;border-radius:6px;display:grid;place-items:center;font-size:11px;font-weight:800;margin-top:2px}
  .ed.free li .ck{background:rgba(52,210,242,.16);color:var(--cyan)} .ed.pro li .ck{background:rgba(246,196,83,.18);color:var(--gold)}
  .ed .limit{margin-top:15px;font:600 12.5px/1.4 var(--sans);color:var(--muted2);padding-top:13px;border-top:1px solid var(--line)}

  .steps{list-style:none;counter-reset:s;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:12px}
  .steps li{counter-increment:s;position:relative;padding-left:44px;font-size:15px;color:var(--muted)}
  .steps li b{color:var(--text)}
  .steps li::before{content:counter(s);position:absolute;left:0;top:-2px;width:30px;height:30px;border-radius:9px;
    background:var(--panel2);border:1px solid var(--line2);color:var(--gold);font:800 14px/30px var(--mono);text-align:center}

  footer{border-top:1px solid var(--line);margin-top:24px;padding:26px 0;color:var(--muted2);font-size:13px}
  footer .in{max-width:var(--maxw);margin:0 auto;padding:0 22px;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;align-items:center}
  footer .dom{font-family:var(--mono);color:var(--muted)}

  @media (max-width:920px){
    .layout{grid-template-columns:minmax(0,1fr);gap:16px;padding-top:14px}
    .side{position:sticky;top:62px;z-index:30;background:rgba(13,10,24,.92);backdrop-filter:blur(12px);
      margin:0 -22px;padding:10px 14px;border-bottom:1px solid var(--line)}
    .plugsel,.sidelabel{display:none}
    .sidenav{flex-direction:row;overflow-x:auto;gap:6px;scrollbar-width:none}
    .sidenav::-webkit-scrollbar{display:none}
    .sidenav a{white-space:nowrap;border-left:0;border-bottom:2px solid transparent;border-radius:8px;padding:8px 12px;flex:none}
    .sidenav a.on{border-left:0;border-bottom-color:var(--gold)}
    .hero{grid-template-columns:1fr;gap:28px}
    .machine{order:-1}
    .cards,.prizes{grid-template-columns:1fr 1fr}
    .editions{grid-template-columns:1fr}
  }
  @media (max-width:560px){
    .cards,.prizes{grid-template-columns:1fr}
    .brand span{display:none}.dl span.t{display:none}
    .lang button{padding:6px 7px;font-size:11px}
  }
  @media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

  /* REVIEWS (públicas) */
  .rev-summary{display:grid;grid-template-columns:190px 1fr;gap:24px;align-items:center;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--panel);margin-bottom:16px}
  .rev-score{text-align:center}
  .rev-score .big{font-size:52px;font-weight:900;line-height:1}
  .rev-score .rstars{color:var(--gold);font-size:17px;letter-spacing:2px;margin:5px 0 3px}
  .rev-score .rstars .off,.rev-st .off{color:#3a3357}
  .rev-score .cnt{font-size:12.5px;color:var(--muted2)}
  .dist{display:flex;flex-direction:column;gap:7px}
  .drow{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--muted)}
  .drow .k{width:30px;color:var(--muted2);font-family:var(--mono)}
  .drow .bar{flex:1;height:8px;border-radius:5px;background:var(--panel2);overflow:hidden}
  .drow .bar i{display:block;height:100%;background:linear-gradient(90deg,var(--gold-deep),var(--gold))}
  .drow .p{width:34px;text-align:right;font-family:var(--mono);color:var(--muted2)}
  .rev-cta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 18px;border:1px solid var(--line2);border-radius:14px;background:linear-gradient(180deg,rgba(52,210,242,.06),var(--panel));margin-bottom:20px;color:var(--muted);font-size:14px}
  .rev-item{display:flex;gap:14px;padding:18px 0;border-top:1px solid var(--line)}
  .rev-item .ra{width:40px;height:40px;border-radius:11px;flex:none;display:grid;place-items:center;font:800 15px/1 var(--sans);color:#241a06;background:linear-gradient(145deg,var(--cyan),#2aa7c4)}
  .rev-top{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
  .rev-top .who{font-size:14.5px;font-weight:800}
  .rev-top .when{font-size:11.5px;color:var(--muted2);margin-left:auto}
  .rev-st{color:var(--gold);font-size:13px;letter-spacing:1px;margin:5px 0 6px}
  .rev-body p{margin:0;font-size:14px;color:var(--muted)}
  .rev-empty{color:var(--muted2)}
  .writebox{border:1px solid var(--line2);border-radius:16px;background:linear-gradient(180deg,rgba(52,210,242,.06),var(--panel));padding:20px;margin-bottom:20px}
  .starpick{display:flex;gap:6px;font-size:30px;margin:8px 0 12px;cursor:pointer;width:max-content}
  .starpick span{color:#3a3357;transition:.1s}
  .starpick span.hot{color:var(--gold);text-shadow:0 0 12px rgba(246,196,83,.5)}
  .rev-ta{width:100%;background:#0a0714;border:1px solid var(--line);border-radius:12px;color:var(--text);font-family:inherit;font-size:14px;padding:12px 14px;resize:vertical;min-height:84px}
  .rev-ta:focus{outline:2px solid var(--cyan);outline-offset:1px;border-color:transparent}
  .rev-note{padding:10px 13px;border-radius:10px;background:rgba(255,107,107,.12);border:1px solid rgba(255,107,107,.3);color:#ffb3b3;font-size:13px;margin-bottom:12px}
  .rev-note.ok{background:rgba(55,214,122,.12);border-color:rgba(55,214,122,.3);color:#a6f0c6}
  .pbadge{display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border-radius:999px;font:800 10.5px/1 var(--mono);letter-spacing:.05em;text-transform:uppercase;color:#3a2704;position:relative;overflow:hidden;white-space:nowrap;background:linear-gradient(120deg,#e0a92e,#f6c453,#fff1c2,#f6c453,#e0a92e);background-size:220% 100%;box-shadow:0 0 0 1px rgba(246,196,83,.55),0 2px 12px rgba(246,196,83,.4);animation:pb-flow 3.2s linear infinite}
  .pbadge .ic{display:inline-block;animation:pb-pulse 1.9s ease-in-out infinite}
  .pbadge::after{content:"";position:absolute;top:0;left:-70%;width:45%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.85),transparent);transform:skewX(-20deg);animation:pb-shine 3.2s ease-in-out infinite}
  @keyframes pb-flow{to{background-position:-220% 0}}
  @keyframes pb-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.28) rotate(8deg)}}
  @keyframes pb-shine{0%{left:-70%}55%,100%{left:150%}}
  @media (max-width:900px){.rev-summary{grid-template-columns:1fr;gap:18px}}
</style>

<div id="smhub">
  <!-- NAV compartida -->
  <?php require __DIR__ . '/../includes/nav.php'; ?>

  <div class="layout" id="top">
    <!-- SIDEBAR -->
    <aside class="side">
      <div class="plugsel">
        <span class="ic">🎰</span>
        <span><b>SlotMachine</b><small>v1.0.1 · 1.21+</small></span>
      </div>
      <div class="sidelabel" data-i18n="sideDocs">Documentation</div>
      <nav class="sidenav">
        <a data-page="overview" class="on"><span class="n">🏠</span><span data-i18n="navOverview">Overview</span></a>
        <a data-page="install"><span class="n">⚙️</span><span data-i18n="navInstall">Installation</span></a>
        <a data-page="commands"><span class="n">⌨️</span><span data-i18n="navCommands">Commands</span></a>
        <a data-page="perms"><span class="n">🔑</span><span data-i18n="navPerms">Permissions</span></a>
        <a data-page="signs"><span class="n">🪧</span><span data-i18n="navSigns">Buy-token Signs</span></a>
        <a data-page="config"><span class="n">🛠️</span><span data-i18n="navConfig">Configuration</span></a>
        <a data-page="prizes"><span class="n">💰</span><span data-i18n="navPrizes">Prizes</span></a>
        <a data-page="editions"><span class="n">💎</span><span data-i18n="navEditions">Free vs Premium</span></a>
        <a data-page="reviews"><span class="n">⭐</span><span data-i18n="navReviews">Reviews</span></a>
      </nav>
    </aside>

    <!-- CONTENT -->
    <main class="content">

      <!-- OVERVIEW -->
      <section class="page active" data-p="overview">
        <div class="hero">
          <div>
            <span class="badge"><span class="dot"></span><span data-i18n="heroBadge">Casino for Minecraft · 1.21+</span></span>
            <h1><span class="grad">SlotMachine</span></h1>
            <p class="lede" data-i18n="heroTagline">Real slot machines, built in your world from a Jukebox and three Item Frames. Drop a coin, spin the reels, win real money.</p>
            <div class="cta">
              <a class="btn primary" href="../panel/buy.php?plugin=slotmachine">💳 <span data-i18n="buyPremium">Buy Premium</span> — $<?= e($SM_PRICE) ?></a>
              <a class="btn ghost" href="../panel/download.php?plugin=slotmachine&edition=free&version=1.0.1"><span>⬇</span> <span data-i18n="btnDownload">Download</span> <span style="opacity:.7">(free)</span></a>
            </div>
            <div style="margin-top:10px"><a href="https://www.spigotmc.org/resources/slotmachine-casino-slots-with-jackpot-1-21-26-x.136839/" target="_blank" rel="noopener" style="font-size:13px;color:var(--muted)"><span data-i18n="btnSpigot">View on Spigot</span> ↗</a></div>
            <div class="stats">
              <div class="s"><b>1.0.1</b><span data-i18n="statVersion">Version</span></div>
              <div class="s"><b>1.21+</b><span data-i18n="statServer">Server</span></div>
              <div class="s"><b>Vault</b><span data-i18n="statEconomy">Economy</span></div>
            </div>
          </div>
          <div class="machine" aria-hidden="true">
            <div class="marquee" data-i18n="jackpotLabel">JACKPOT</div>
            <div class="payline">$5,000</div>
            <div class="reels"><div class="reel">💎</div><div class="reel">💎</div><div class="reel">💎</div></div>
            <div class="lever"></div>
          </div>
        </div>
        <h3 class="sub" data-i18n="featuresTitle">Everything a casino floor needs</h3>
        <div class="cards">
          <div class="card"><div class="ico">🎰</div><h3 data-i18n="f1t">Real slot machines</h3><p data-i18n="f1d">Build a working machine from a Jukebox and three Item Frames.</p></div>
          <div class="card"><div class="ico">💰</div><h3 data-i18n="f2t">Economy payouts</h3><p data-i18n="f2d">Wins pay real money through Vault — EssentialsX, CMI, any economy.</p></div>
          <div class="card"><div class="ico">🪧</div><h3 data-i18n="f3t">Buy-token signs</h3><p data-i18n="f3d">Players buy their own coins from a sign. No admin needed.</p></div>
          <div class="card"><div class="ico">🎁</div><h3 data-i18n="f4t">Growing jackpot</h3><p data-i18n="f4d">The pool grows with every spin until someone lands three diamonds.</p></div>
          <div class="card"><div class="ico">🌍</div><h3 data-i18n="f5t">Four languages</h3><p data-i18n="f5d">English, Spanish, French and Chinese — fully editable.</p></div>
          <div class="card"><div class="ico">✨</div><h3 data-i18n="f6t">Holograms</h3><p data-i18n="f6d">A floating jackpot display via DecentHolograms.</p></div>
        </div>
      </section>

      <!-- INSTALL -->
      <section class="page" data-p="install">
        <div class="crumb">SlotMachine · <b data-i18n="navInstall">Installation</b></div>
        <h2 class="ptitle" data-i18n="navInstall">Installation</h2>
        <p class="plead" data-i18n="instLead">Get SlotMachine running on your server in a few minutes.</p>
        <h3 class="sub" data-i18n="instReq">Requirements</h3>
        <div class="tablewrap"><table>
          <thead><tr><th data-i18n="thReq">Requirement</th><th data-i18n="thNotes">Notes</th></tr></thead>
          <tbody>
            <tr><td><b>Server</b></td><td>Paper / Spigot 1.21+</td></tr>
            <tr><td><b>Java</b></td><td>Java 21+</td></tr>
            <tr><td><b>Vault</b></td><td data-i18n="reqVault">Required — economy bridge</td></tr>
            <tr><td><b data-i18n="reqEcoName">Economy plugin</b></td><td data-i18n="reqEco">Required — EssentialsX, CMI, or any Vault economy</td></tr>
            <tr><td><b>DecentHolograms</b></td><td data-i18n="reqHolo">Required — jackpot hologram</td></tr>
            <tr><td>PlaceholderAPI</td><td data-i18n="reqPapi">Optional (Premium)</td></tr>
          </tbody>
        </table></div>
        <h3 class="sub" data-i18n="instStepsT">Steps</h3>
        <ol class="steps">
          <li data-i18n="st1">Download <b>SlotMachine.jar</b> from the resource page.</li>
          <li data-i18n="st2">Install <b>Vault</b>, an economy plugin (EssentialsX or CMI) and <b>DecentHolograms</b>.</li>
          <li data-i18n="st3">Drop SlotMachine.jar into your server's <b>plugins/</b> folder.</li>
          <li data-i18n="st4"><b>Restart</b> the server (a reload is not enough on first install).</li>
          <li data-i18n="st5">Files generate in plugins/SlotMachine/ — config.yml, machines.yml and the lang/ folder.</li>
        </ol>
        <h3 class="sub" data-i18n="instLangT">Choosing a language</h3>
        <p style="color:var(--muted);font-size:15px" data-i18n="instLangP">Open config.yml, set the language, then run /slot reload.</p>
        <pre><code>language: "en"   <span class="cmt"># en, es, fr, zh</span></code></pre>
      </section>

      <!-- COMMANDS -->
      <section class="page" data-p="commands">
        <div class="crumb">SlotMachine · <b data-i18n="navCommands">Commands</b></div>
        <h2 class="ptitle" data-i18n="navCommands">Commands</h2>
        <p class="plead" data-i18n="cmdLead">Base command /slot — aliases /slots, /tragamonedas.</p>
        <div class="tablewrap"><table>
          <thead><tr><th data-i18n="thCmd">Command</th><th data-i18n="thDesc">What it does</th><th data-i18n="thPerm">Permission</th></tr></thead>
          <tbody>
            <tr><td><code>/slot create &lt;name&gt;</code></td><td data-i18n="c1">Start creating a machine</td><td class="perm">slotmachine.admin</td></tr>
            <tr><td><code>/slot delete &lt;name&gt;</code></td><td data-i18n="c2">Delete a machine</td><td class="perm">slotmachine.admin</td></tr>
            <tr><td><code>/slot getcoin [n]</code></td><td data-i18n="c3">Give yourself casino coins</td><td class="perm">slotmachine.admin</td></tr>
            <tr><td><code>/slot reload</code></td><td data-i18n="c4">Reload config &amp; languages</td><td class="perm">slotmachine.admin</td></tr>
            <tr><td><code>/slot top</code></td><td><span data-i18n="c5">Win leaderboard</span><span class="pill">Premium</span></td><td class="perm">slotmachine.admin</td></tr>
            <tr><td><code>/slot stats</code></td><td><span data-i18n="c6">Your play stats</span><span class="pill">Premium</span></td><td class="perm">slotmachine.use</td></tr>
            <tr><td><code>/slot help</code></td><td data-i18n="c7">Show the help menu</td><td class="perm">slotmachine.use</td></tr>
            <tr><td><code>/slot ver</code></td><td data-i18n="c8">Show plugin info</td><td class="perm">slotmachine.use</td></tr>
          </tbody>
        </table></div>
        <h3 class="sub" data-i18n="cmdCreateT">Create a machine</h3>
        <ol class="steps">
          <li data-i18n="cm1">Place a <b>Jukebox</b> and, next to it, <b>3 Item Frames</b> in a row.</li>
          <li data-i18n="cm2">Run <b>/slot create &lt;name&gt;</b>.</li>
          <li data-i18n="cm3"><b>Right-click the Jukebox</b> — it becomes the center of the machine.</li>
          <li data-i18n="cm4"><b>Right-click the 3 Item Frames in order</b> (left to right).</li>
          <li data-i18n="cm5">Done! The machine is saved and a jackpot hologram appears above it.</li>
        </ol>
        <div class="note"><span>💡</span><span data-i18n="cmdPlay">To play, a player right-clicks the Jukebox holding a casino coin. The reels spin and pay out if the symbols match.</span></div>
      </section>

      <!-- PERMISSIONS -->
      <section class="page" data-p="perms">
        <div class="crumb">SlotMachine · <b data-i18n="navPerms">Permissions</b></div>
        <h2 class="ptitle" data-i18n="navPerms">Permissions</h2>
        <p class="plead" data-i18n="permLead">Grant these with LuckPerms or any permissions plugin.</p>
        <div class="tablewrap"><table>
          <thead><tr><th data-i18n="thPerm">Permission</th><th data-i18n="thDesc">What it does</th><th data-i18n="thDefault">Default</th></tr></thead>
          <tbody>
            <tr><td class="perm">slotmachine.admin</td><td data-i18n="pm1">Full admin: create/delete, getcoin, reload</td><td><code>op</code></td></tr>
            <tr><td class="perm">slotmachine.use</td><td data-i18n="pm2">Play the slot machines</td><td data-i18n="everyone">everyone</td></tr>
            <tr><td class="perm">slotmachine.sign.create</td><td data-i18n="pm3">Create buy-token signs</td><td><code>op</code></td></tr>
            <tr><td class="perm">slotmachine.sign.use</td><td data-i18n="pm4">Use buy-token signs</td><td data-i18n="everyone">everyone</td></tr>
            <tr><td class="perm">slotmachine.discount.vip1</td><td><span data-i18n="pm5">VIP purchase discount</span><span class="pill">Premium</span></td><td><code>op</code></td></tr>
          </tbody>
        </table></div>
        <h3 class="sub" data-i18n="permExT">Example (LuckPerms)</h3>
        <pre><code>/lp group default permission set slotmachine.use true
/lp group admin permission set slotmachine.admin true
/lp group vip permission set slotmachine.discount.vip1 true</code></pre>
      </section>

      <!-- SIGNS -->
      <section class="page" data-p="signs">
        <div class="crumb">SlotMachine · <b data-i18n="navSigns">Buy-token Signs</b></div>
        <h2 class="ptitle" data-i18n="navSigns">Buy-token Signs</h2>
        <p class="plead" data-i18n="signLead">Let players buy their own coins from a sign — the price is charged through Vault.</p>
        <h3 class="sub" data-i18n="signCreateT">Create a sign</h3>
        <p style="color:var(--muted);font-size:15px" data-i18n="signCreateP">Place a sign and write, line by line:</p>
        <pre><code>[Slots]
Buy Tokens
20</code></pre>
        <ol class="steps">
          <li data-i18n="sg1"><b>Line 1</b> — [Slots] identifies the sign (required).</li>
          <li data-i18n="sg2"><b>Line 2</b> — label text (free to customize).</li>
          <li data-i18n="sg3"><b>Line 3</b> — the price per coin (a number, e.g. 20).</li>
        </ol>
        <h3 class="sub" data-i18n="signUseT">Use a sign</h3>
        <p style="color:var(--muted);font-size:15px" data-i18n="signUseP">Players right-click the sign, choose how many coins to buy, and confirm. Money is taken via Vault and coins are given instantly.</p>
        <div class="note warn"><span>💎</span><span data-i18n="signPrem"><b>Premium:</b> VIP ranks get automatic discounts with the slotmachine.discount.vip1/2 permissions.</span></div>
      </section>

      <!-- CONFIG -->
      <section class="page" data-p="config">
        <div class="crumb">SlotMachine · <b data-i18n="navConfig">Configuration</b></div>
        <h2 class="ptitle" data-i18n="navConfig">Configuration</h2>
        <p class="plead" data-i18n="cfgLead">Main file: plugins/SlotMachine/config.yml. Run /slot reload after editing.</p>
        <h3 class="sub" data-i18n="cfgMachineT">Machine &amp; jackpot</h3>
        <pre><code>machine_settings:
  play_cost: 1                 <span class="cmt"># coins per spin</span>
  coin_value_for_jackpot: 50.0 <span class="cmt"># added to the pool per coin</span>
jackpot:
  enabled: true
  starting_amount: 500.0       <span class="cmt"># resets to this after a win</span></code></pre>
        <h3 class="sub" data-i18n="cfgReelsT">Roulette symbols</h3>
        <p style="color:var(--muted);font-size:15px" data-i18n="cfgReelsP">The numbers are weights (rarity). Higher = appears more often.</p>
        <pre><code>roulette_items:
  CHERRY_SAPLING: 60   <span class="cmt"># most common (never pays)</span>
  COAL: 50
  REDSTONE: 40
  LAPIS_LAZULI: 35
  IRON_INGOT: 25
  GOLD_INGOT: 15
  EMERALD: 8
  DIAMOND: 3           <span class="cmt"># rarest, jackpot symbol</span></code></pre>
        <h3 class="sub" data-i18n="cfgPrizesT">Prize payouts</h3>
        <pre><code>prizes:
  jackpot_emerald: { reward: 5000.0 }
  gold_win:        { reward: 1000.0 }
  iron_win:        { reward: 500.0 }
  two_diamonds:    { reward: 250.0 }
  two_emeralds:    { reward: 100.0 }</code></pre>
      </section>

      <!-- PRIZES -->
      <section class="page" data-p="prizes">
        <div class="crumb">SlotMachine · <b data-i18n="navPrizes">Prizes</b></div>
        <h2 class="ptitle" data-i18n="prizesTitle">Prizes &amp; how to win</h2>
        <p class="plead" data-i18n="prizesSub">Match symbols across all three reels. Only these combinations pay:</p>
        <div class="prizes">
          <div class="prize jackpot"><div class="combo">💎 💎 💎</div><div class="lbl" data-i18n="jackpotLabel">JACKPOT</div><div class="amt" data-i18n="prizeGrowing">Growing pool</div></div>
          <div class="prize"><div class="combo">💚 💚 💚</div><div class="lbl">Emerald</div><div class="amt small">$5,000</div></div>
          <div class="prize"><div class="combo">🥇 🥇 🥇</div><div class="lbl">Gold</div><div class="amt small">$1,000</div></div>
          <div class="prize"><div class="combo">⚙️ ⚙️ ⚙️</div><div class="lbl">Iron</div><div class="amt small">$500</div></div>
          <div class="prize"><div class="combo">💎 💎 ⬦</div><div class="lbl" data-i18n="prizeTwoDia">Two diamonds + any</div><div class="amt small">$250</div></div>
          <div class="prize"><div class="combo">💚 💚 ⬦</div><div class="lbl" data-i18n="prizeTwoEme">Two emeralds + any</div><div class="amt small">$100</div></div>
        </div>
        <div class="note warn"><span>⚠️</span><span data-i18n="prizesNote"><b>Any other symbol never pays</b> — not even three of a kind. The rarer the symbol, the bigger the prize.</span></div>
      </section>

      <!-- EDITIONS -->
      <section class="page" data-p="editions">
        <div class="crumb">SlotMachine · <b data-i18n="navEditions">Free vs Premium</b></div>
        <h2 class="ptitle" data-i18n="editionsTitle">Free vs Premium</h2>
        <div class="editions">
          <div class="ed free">
            <div class="tag" data-i18n="freeTag">Free</div><h3>SlotMachine</h3>
            <div class="desc" data-i18n="freeDesc">A complete, working casino for your server.</div>
            <ul>
              <li><span class="ck">✓</span><span data-i18n="ef1">Slot machines &amp; money prizes</span></li>
              <li><span class="ck">✓</span><span data-i18n="ef2">Growing jackpot</span></li>
              <li><span class="ck">✓</span><span data-i18n="ef3">Buy-token signs</span></li>
              <li><span class="ck">✓</span><span data-i18n="ef4">Four languages &amp; holograms</span></li>
            </ul>
            <div class="limit" data-i18n="freeLimit">Limited to 2 machines per server.</div>
            <a class="btn ghost" style="margin-top:16px;width:100%;justify-content:center" href="../panel/download.php?plugin=slotmachine&edition=free&version=1.0.1">⬇ <span data-i18n="btnDownload">Download</span></a>
          </div>
          <div class="ed pro">
            <div class="tag" data-i18n="proTag">Premium</div><h3>SlotMachine+</h3>
            <div class="desc" data-i18n="proDesc">Everything in Free, plus the full server feature.</div>
            <ul>
              <li><span class="ck">★</span><span data-i18n="ep1">Item, command &amp; permission prizes</span></li>
              <li><span class="ck">★</span><span data-i18n="ep2">VIP purchase discounts</span></li>
              <li><span class="ck">★</span><span data-i18n="ep3">Leaderboards, stats &amp; PlaceholderAPI</span></li>
              <li><span class="ck">★</span><span data-i18n="ep4">Discord alerts, cooldowns &amp; limits</span></li>
            </ul>
            <div class="limit" data-i18n="proLimit">Unlimited machines.</div>
            <a class="btn primary" style="margin-top:16px;width:100%;justify-content:center" href="../panel/buy.php?plugin=slotmachine">💳 <span data-i18n="buyPremium">Buy Premium</span> — $<?= e($SM_PRICE) ?></a>
          </div>
        </div>
      </section>

      <!-- REVIEWS (públicas) -->
      <section class="page" data-p="reviews">
        <div class="crumb">SlotMachine · <b data-i18n="navReviews">Reviews</b></div>
        <h2 class="ptitle" data-i18n="reviewsTitle">Player reviews</h2>
        <p class="plead" data-i18n="reviewsSub">What server owners think of SlotMachine.</p>

        <div class="rev-summary">
          <div class="rev-score">
            <div class="big"><?= $revTotal ? number_format($revAvg, 1) : '—' ?></div>
            <div class="rstars"><?= rw_stars($revTotal ? (int)round($revAvg) : 0) ?></div>
            <div class="cnt"><b><?= $revTotal ?></b> <span data-i18n="reviewsWord">reviews</span></div>
          </div>
          <div class="dist">
            <?php foreach ([5,4,3,2,1] as $k): $pc = $revTotal ? round($revDist[$k] * 100 / $revTotal) : 0; ?>
              <div class="drow"><span class="k"><?= $k ?> ★</span><span class="bar"><i style="width:<?= $pc ?>%"></i></span><span class="p"><?= $pc ?>%</span></div>
            <?php endforeach; ?>
          </div>
        </div>

        <?php if ($loggedIn): ?>
          <div class="writebox">
            <h3 style="font-size:16px;font-weight:800;margin-bottom:8px"><?= $myRev ? '<span data-i18n="reviewEditT">Edit your review</span>' : '<span data-i18n="reviewWriteT">Write a review</span>' ?></h3>
            <?php if ($saved): ?><div class="rev-note ok">✓ <span data-i18n="reviewSaved">Review saved</span></div><?php endif; ?>
            <?php if ($revMsg): ?><div class="rev-note"><?= htmlspecialchars($revMsg, ENT_QUOTES) ?></div><?php endif; ?>
            <form method="post">
              <?= csrf_field() ?>
              <input type="hidden" name="do" value="review">
              <input type="hidden" name="rating" id="rating" value="<?= $myRev ? (int)$myRev['rating'] : 0 ?>">
              <div class="starpick" id="starpick" role="radiogroup" aria-label="rating">
                <span data-v="1">★</span><span data-v="2">★</span><span data-v="3">★</span><span data-v="4">★</span><span data-v="5">★</span>
              </div>
              <textarea class="rev-ta" name="comment" maxlength="1000" data-i18n-ph="reviewPh" placeholder="Share your experience…"><?= htmlspecialchars($myRev['comment'] ?? '', ENT_QUOTES) ?></textarea>
              <div style="margin-top:12px"><button class="btn primary" type="submit"><?= $myRev ? '<span data-i18n="reviewUpdate">Update review</span>' : '<span data-i18n="reviewPublish">Publish review</span>' ?></button></div>
            </form>
          </div>
        <?php else: ?>
          <div class="rev-cta">
            <span data-i18n="reviewsLoginPrompt">Log in to leave a review.</span>
            <a class="btn ghost" href="../login.php" data-i18n="navLogin">Log in</a>
          </div>
        <?php endif; ?>

        <div class="rev-list">
          <?php if ($revList): foreach ($revList as $r):
            $ini = strtoupper(mb_substr($r['username'], 0, 2));
            $cmt = nl2br(htmlspecialchars($r['comment'], ENT_QUOTES, 'UTF-8')); ?>
            <div class="rev-item">
              <span class="ra"><?= htmlspecialchars($ini, ENT_QUOTES) ?></span>
              <div class="rev-body">
                <div class="rev-top">
                  <span class="who"><?= htmlspecialchars($r['username'], ENT_QUOTES) ?></span>
                  <?= review_badges(($r['role'] ?? '')==='admin', $r['owned']) ?>
                  <span class="when"><?= date('d M Y', strtotime($r['created_at'])) ?></span>
                </div>
                <div class="rev-st"><?= rw_stars((int)$r['rating']) ?></div>
                <p><?= $cmt ?></p>
                <?php if (!empty($replies[(int)$r['id']])): $rep = $replies[(int)$r['id']]; ?>
                  <div class="adminreply">
                    <div class="arhead"><?= role_badge(true) ?><span class="lbl">infinity3113</span><span class="when"><?= date('d M Y', strtotime($rep['admin_reply_at'])) ?></span></div>
                    <p><?= nl2br(htmlspecialchars($rep['admin_reply'], ENT_QUOTES, 'UTF-8')) ?></p>
                  </div>
                <?php endif; ?>
              </div>
            </div>
          <?php endforeach; else: ?>
            <p class="rev-empty" data-i18n="reviewsNone">No reviews yet — be the first!</p>
          <?php endif; ?>
        </div>
      </section>

    </main>
  </div>

  <footer><div class="in">
    <span data-i18n="footMade">Made by infinity3113 · SlotMachine</span>
    <span class="dom">infinity3113.mc-paradise.com/plugins/slotmachine</span>
  </div></footer>
</div>

<script>
(function(){
  var I18N={
    en:{brandSub:"Minecraft Plugins",sideDocs:"Documentation",
      navOverview:"Overview",navInstall:"Installation",navCommands:"Commands",navPerms:"Permissions",navSigns:"Buy-token Signs",navConfig:"Configuration",navPrizes:"Prizes",navEditions:"Free vs Premium",navReviews:"Reviews",reviewsTitle:"Player reviews",reviewsSub:"What server owners think of SlotMachine.",reviewsWord:"reviews",reviewsWrite:"Write a review",reviewsLoginPrompt:"Log in to leave a review.",navLogin:"Log in",navHubPlugins:"Plugins",navMyPanel:"My panel",navLogout:"Log out",navRegister:"Sign up",reviewsNone:"No reviews yet — be the first!",buyPremium:"Buy Premium",reviewWriteT:"Write a review",reviewEditT:"Edit your review",reviewSaved:"Review saved",reviewUpdate:"Update review",reviewPublish:"Publish review",reviewPh:"Share your experience…",
      heroBadge:"Casino for Minecraft · 1.21+",heroTagline:"Real slot machines, built in your world from a Jukebox and three Item Frames. Drop a coin, spin the reels, win real money.",
      btnDownload:"Download",btnSpigot:"View on Spigot",statVersion:"Version",statServer:"Server",statEconomy:"Economy",jackpotLabel:"JACKPOT",
      featuresTitle:"Everything a casino floor needs",
      f1t:"Real slot machines",f1d:"Build a working machine from a Jukebox and three Item Frames.",
      f2t:"Economy payouts",f2d:"Wins pay real money through Vault — EssentialsX, CMI, any economy.",
      f3t:"Buy-token signs",f3d:"Players buy their own coins from a sign. No admin needed.",
      f4t:"Growing jackpot",f4d:"The pool grows with every spin until someone lands three diamonds.",
      f5t:"Four languages",f5d:"English, Spanish, French and Chinese — fully editable.",
      f6t:"Holograms",f6d:"A floating jackpot display via DecentHolograms.",
      instLead:"Get SlotMachine running on your server in a few minutes.",instReq:"Requirements",thReq:"Requirement",thNotes:"Notes",
      reqVault:"Required — economy bridge",reqEcoName:"Economy plugin",reqEco:"Required — EssentialsX, CMI, or any Vault economy",reqHolo:"Required — jackpot hologram",reqPapi:"Optional (Premium)",
      instStepsT:"Steps",st1:"Download <b>SlotMachine.jar</b> from the resource page.",st2:"Install <b>Vault</b>, an economy plugin (EssentialsX or CMI) and <b>DecentHolograms</b>.",st3:"Drop SlotMachine.jar into your server's <b>plugins/</b> folder.",st4:"<b>Restart</b> the server (a reload is not enough on first install).",st5:"Files generate in plugins/SlotMachine/ — config.yml, machines.yml and the lang/ folder.",
      instLangT:"Choosing a language",instLangP:"Open config.yml, set the language, then run /slot reload.",
      cmdLead:"Base command /slot — aliases /slots, /tragamonedas.",thCmd:"Command",thDesc:"What it does",thPerm:"Permission",thDefault:"Default",everyone:"everyone",
      c1:"Start creating a machine",c2:"Delete a machine",c3:"Give yourself casino coins",c4:"Reload config & languages",c5:"Win leaderboard",c6:"Your play stats",c7:"Show the help menu",c8:"Show plugin info",
      cmdCreateT:"Create a machine",cm1:"Place a <b>Jukebox</b> and, next to it, <b>3 Item Frames</b> in a row.",cm2:"Run <b>/slot create &lt;name&gt;</b>.",cm3:"<b>Right-click the Jukebox</b> — it becomes the center of the machine.",cm4:"<b>Right-click the 3 Item Frames in order</b> (left to right).",cm5:"Done! The machine is saved and a jackpot hologram appears above it.",
      cmdPlay:"To play, a player right-clicks the Jukebox holding a casino coin. The reels spin and pay out if the symbols match.",
      permLead:"Grant these with LuckPerms or any permissions plugin.",
      pm1:"Full admin: create/delete, getcoin, reload",pm2:"Play the slot machines",pm3:"Create buy-token signs",pm4:"Use buy-token signs",pm5:"VIP purchase discount",permExT:"Example (LuckPerms)",
      signLead:"Let players buy their own coins from a sign — the price is charged through Vault.",signCreateT:"Create a sign",signCreateP:"Place a sign and write, line by line:",
      sg1:"<b>Line 1</b> — [Slots] identifies the sign (required).",sg2:"<b>Line 2</b> — label text (free to customize).",sg3:"<b>Line 3</b> — the price per coin (a number, e.g. 20).",
      signUseT:"Use a sign",signUseP:"Players right-click the sign, choose how many coins to buy, and confirm. Money is taken via Vault and coins are given instantly.",
      signPrem:"<b>Premium:</b> VIP ranks get automatic discounts with the slotmachine.discount.vip1/2 permissions.",
      cfgLead:"Main file: plugins/SlotMachine/config.yml. Run /slot reload after editing.",cfgMachineT:"Machine & jackpot",cfgReelsT:"Roulette symbols",cfgReelsP:"The numbers are weights (rarity). Higher = appears more often.",cfgPrizesT:"Prize payouts",
      prizesTitle:"Prizes & how to win",prizesSub:"Match symbols across all three reels. Only these combinations pay:",prizeGrowing:"Growing pool",prizeTwoDia:"Two diamonds + any",prizeTwoEme:"Two emeralds + any",
      prizesNote:"<b>Any other symbol never pays</b> — not even three of a kind. The rarer the symbol, the bigger the prize.",
      editionsTitle:"Free vs Premium",freeTag:"Free",proTag:"Premium",freeDesc:"A complete, working casino for your server.",proDesc:"Everything in Free, plus the full server feature.",
      ef1:"Slot machines & money prizes",ef2:"Growing jackpot",ef3:"Buy-token signs",ef4:"Four languages & holograms",freeLimit:"Limited to 2 machines per server.",
      ep1:"Item, command & permission prizes",ep2:"VIP purchase discounts",ep3:"Leaderboards, stats & PlaceholderAPI",ep4:"Discord alerts, cooldowns & limits",proLimit:"Unlimited machines.",
      footMade:"Made by infinity3113 · SlotMachine"},

    fr:{brandSub:"Plugins Minecraft",sideDocs:"Documentation",
      navOverview:"Accueil",navInstall:"Installation",navCommands:"Commandes",navPerms:"Permissions",navSigns:"Panneaux d'achat",navConfig:"Configuration",navPrizes:"Gains",navEditions:"Gratuit vs Premium",navReviews:"Avis",reviewsTitle:"Avis des joueurs",reviewsSub:"Ce que les propriétaires de serveurs pensent de SlotMachine.",reviewsWord:"avis",reviewsWrite:"Écrire un avis",reviewsLoginPrompt:"Connectez-vous pour laisser un avis.",navLogin:"Se connecter",navHubPlugins:"Plugins",navMyPanel:"Mon espace",navLogout:"Déconnexion",navRegister:"S'inscrire",reviewsNone:"Aucun avis pour l'instant — soyez le premier !",buyPremium:"Acheter Premium",reviewWriteT:"Écrire un avis",reviewEditT:"Modifier votre avis",reviewSaved:"Avis enregistré",reviewUpdate:"Mettre à jour",reviewPublish:"Publier l'avis",reviewPh:"Partagez votre expérience…",
      heroBadge:"Casino pour Minecraft · 1.21+",heroTagline:"De vraies machines à sous, construites dans votre monde avec un juke-box et trois cadres. Insérez un jeton, lancez les rouleaux, gagnez de l'argent.",
      btnDownload:"Télécharger",btnSpigot:"Voir sur Spigot",statVersion:"Version",statServer:"Serveur",statEconomy:"Économie",jackpotLabel:"JACKPOT",
      featuresTitle:"Tout ce qu'un casino demande",
      f1t:"Vraies machines à sous",f1d:"Montez une machine avec un juke-box et trois cadres.",
      f2t:"Gains en argent",f2d:"Les gains paient de l'argent réel via Vault — EssentialsX, CMI, toute économie.",
      f3t:"Panneaux d'achat",f3d:"Les joueurs achètent leurs jetons sur un panneau. Aucun admin requis.",
      f4t:"Jackpot évolutif",f4d:"La cagnotte grandit à chaque tour jusqu'à trois diamants.",
      f5t:"Quatre langues",f5d:"Anglais, espagnol, français et chinois — entièrement modifiable.",
      f6t:"Hologrammes",f6d:"Un affichage de jackpot flottant via DecentHolograms.",
      instLead:"Installez SlotMachine sur votre serveur en quelques minutes.",instReq:"Prérequis",thReq:"Prérequis",thNotes:"Notes",
      reqVault:"Requis — pont économique",reqEcoName:"Plugin d'économie",reqEco:"Requis — EssentialsX, CMI ou toute économie Vault",reqHolo:"Requis — hologramme du jackpot",reqPapi:"Optionnel (Premium)",
      instStepsT:"Étapes",st1:"Téléchargez <b>SlotMachine.jar</b> depuis la page du plugin.",st2:"Installez <b>Vault</b>, un plugin d'économie (EssentialsX ou CMI) et <b>DecentHolograms</b>.",st3:"Placez SlotMachine.jar dans le dossier <b>plugins/</b> du serveur.",st4:"<b>Redémarrez</b> le serveur (un reload ne suffit pas à la 1re installation).",st5:"Les fichiers apparaissent dans plugins/SlotMachine/ — config.yml, machines.yml et le dossier lang/.",
      instLangT:"Choisir la langue",instLangP:"Ouvrez config.yml, définissez la langue, puis lancez /slot reload.",
      cmdLead:"Commande de base /slot — alias /slots, /tragamonedas.",thCmd:"Commande",thDesc:"Effet",thPerm:"Permission",thDefault:"Défaut",everyone:"tous",
      c1:"Commencer à créer une machine",c2:"Supprimer une machine",c3:"Se donner des jetons",c4:"Recharger config & langues",c5:"Classement des gains",c6:"Vos statistiques",c7:"Afficher l'aide",c8:"Infos du plugin",
      cmdCreateT:"Créer une machine",cm1:"Placez un <b>juke-box</b> et, à côté, <b>3 cadres</b> en ligne.",cm2:"Lancez <b>/slot create &lt;nom&gt;</b>.",cm3:"<b>Clic droit sur le juke-box</b> — il devient le centre de la machine.",cm4:"<b>Clic droit sur les 3 cadres dans l'ordre</b> (gauche à droite).",cm5:"Terminé ! La machine est enregistrée et un hologramme de jackpot apparaît au-dessus.",
      cmdPlay:"Pour jouer, le joueur fait un clic droit sur le juke-box avec un jeton. Les rouleaux tournent et paient si les symboles correspondent.",
      permLead:"Attribuez-les avec LuckPerms ou tout plugin de permissions.",
      pm1:"Admin complet : créer/supprimer, getcoin, reload",pm2:"Jouer aux machines à sous",pm3:"Créer des panneaux d'achat",pm4:"Utiliser les panneaux d'achat",pm5:"Réduction d'achat VIP",permExT:"Exemple (LuckPerms)",
      signLead:"Laissez les joueurs acheter leurs jetons sur un panneau — le prix passe par Vault.",signCreateT:"Créer un panneau",signCreateP:"Placez un panneau et écrivez, ligne par ligne :",
      sg1:"<b>Ligne 1</b> — [Slots] identifie le panneau (requis).",sg2:"<b>Ligne 2</b> — texte du libellé (personnalisable).",sg3:"<b>Ligne 3</b> — le prix par jeton (un nombre, ex. 20).",
      signUseT:"Utiliser un panneau",signUseP:"Le joueur fait un clic droit, choisit le nombre de jetons et confirme. L'argent passe par Vault et les jetons sont donnés aussitôt.",
      signPrem:"<b>Premium :</b> les rangs VIP obtiennent des réductions via les permissions slotmachine.discount.vip1/2.",
      cfgLead:"Fichier principal : plugins/SlotMachine/config.yml. Lancez /slot reload après édition.",cfgMachineT:"Machine & jackpot",cfgReelsT:"Symboles des rouleaux",cfgReelsP:"Les nombres sont des poids (rareté). Plus haut = plus fréquent.",cfgPrizesT:"Montants des gains",
      prizesTitle:"Gains & comment gagner",prizesSub:"Alignez les symboles sur les trois rouleaux. Seules ces combinaisons paient :",prizeGrowing:"Cagnotte",prizeTwoDia:"Deux diamants + tout",prizeTwoEme:"Deux émeraudes + tout",
      prizesNote:"<b>Aucun autre symbole ne paie</b> — même trois identiques. Plus le symbole est rare, plus le gain est gros.",
      editionsTitle:"Gratuit vs Premium",freeTag:"Gratuit",proTag:"Premium",freeDesc:"Un casino complet et fonctionnel pour votre serveur.",proDesc:"Tout le Gratuit, plus la fonctionnalité complète.",
      ef1:"Machines & gains en argent",ef2:"Jackpot évolutif",ef3:"Panneaux d'achat",ef4:"Quatre langues & hologrammes",freeLimit:"Limité à 2 machines par serveur.",
      ep1:"Gains objets, commandes & permissions",ep2:"Réductions VIP",ep3:"Classements, stats & PlaceholderAPI",ep4:"Alertes Discord, délais & limites",proLimit:"Machines illimitées.",
      footMade:"Créé par infinity3113 · SlotMachine"},

    zh:{brandSub:"Minecraft 插件",sideDocs:"文档",
      navOverview:"概览",navInstall:"安装",navCommands:"指令",navPerms:"权限",navSigns:"购买告示牌",navConfig:"配置",navPrizes:"奖励",navEditions:"免费版 vs 高级版",navReviews:"评价",reviewsTitle:"玩家评价",reviewsSub:"服务器主对 SlotMachine 的看法。",reviewsWord:"条评价",reviewsWrite:"写评价",reviewsLoginPrompt:"登录后即可评价。",navLogin:"登录",navHubPlugins:"插件",navMyPanel:"我的面板",navLogout:"退出",navRegister:"注册",reviewsNone:"还没有评价——来做第一个吧！",buyPremium:"购买高级版",reviewWriteT:"写评价",reviewEditT:"编辑你的评价",reviewSaved:"评价已保存",reviewUpdate:"更新评价",reviewPublish:"发布评价",reviewPh:"分享你的体验…",
      heroBadge:"Minecraft 赌场 · 1.21+",heroTagline:"真正的老虎机，用唱片机和三个物品展示框在你的世界里搭建。投入代币，转动转轮，赢得真金白银。",
      btnDownload:"下载",btnSpigot:"在 Spigot 查看",statVersion:"版本",statServer:"服务端",statEconomy:"经济",jackpotLabel:"头奖",
      featuresTitle:"赌场所需的一切",
      f1t:"真正的老虎机",f1d:"用唱片机和三个物品展示框搭建一台可用的机器。",
      f2t:"经济奖励",f2d:"通过 Vault 支付真实货币——EssentialsX、CMI 或任意经济插件。",
      f3t:"购买告示牌",f3d:"玩家自己在告示牌上购买代币，无需管理员。",
      f4t:"累积头奖",f4d:"每次游玩奖池增长，直到有人转出三颗钻石。",
      f5t:"四种语言",f5d:"英语、西班牙语、法语和中文——完全可编辑。",
      f6t:"全息显示",f6d:"由 DecentHolograms 提供的悬浮头奖显示。",
      instLead:"几分钟内在你的服务器上运行 SlotMachine。",instReq:"要求",thReq:"要求",thNotes:"说明",
      reqVault:"必需 — 经济桥接",reqEcoName:"经济插件",reqEco:"必需 — EssentialsX、CMI 或任意 Vault 经济",reqHolo:"必需 — 头奖全息",reqPapi:"可选（高级版）",
      instStepsT:"步骤",st1:"从资源页下载 <b>SlotMachine.jar</b>。",st2:"安装 <b>Vault</b>、一个经济插件（EssentialsX 或 CMI）和 <b>DecentHolograms</b>。",st3:"把 SlotMachine.jar 放入服务器的 <b>plugins/</b> 文件夹。",st4:"<b>重启</b>服务器（首次安装仅 reload 不够）。",st5:"文件会生成在 plugins/SlotMachine/ — config.yml、machines.yml 和 lang/ 文件夹。",
      instLangT:"选择语言",instLangP:"打开 config.yml，设置语言，然后运行 /slot reload。",
      cmdLead:"主指令 /slot — 别名 /slots、/tragamonedas。",thCmd:"指令",thDesc:"功能",thPerm:"权限",thDefault:"默认",everyone:"所有人",
      c1:"开始创建一台机器",c2:"删除一台机器",c3:"给自己代币",c4:"重载配置与语言",c5:"奖励排行榜",c6:"你的游玩统计",c7:"显示帮助菜单",c8:"显示插件信息",
      cmdCreateT:"创建一台机器",cm1:"放置一个<b>唱片机</b>，旁边并排放<b>3 个物品展示框</b>。",cm2:"运行 <b>/slot create &lt;名称&gt;</b>。",cm3:"<b>右键点击唱片机</b>——它成为机器的中心。",cm4:"<b>按顺序右键点击 3 个展示框</b>（从左到右）。",cm5:"完成！机器已保存，上方出现头奖全息。",
      cmdPlay:"游玩时，玩家手持代币右键点击唱片机。转轮转动，符号相配即派奖。",
      permLead:"用 LuckPerms 或任意权限插件授予这些权限。",
      pm1:"完整管理：创建/删除、getcoin、reload",pm2:"游玩老虎机",pm3:"创建购买告示牌",pm4:"使用购买告示牌",pm5:"VIP 购买折扣",permExT:"示例（LuckPerms）",
      signLead:"让玩家自己在告示牌上购买代币——价格通过 Vault 收取。",signCreateT:"创建告示牌",signCreateP:"放置一个告示牌，逐行写：",
      sg1:"<b>第 1 行</b> — [Slots] 标识告示牌（必填）。",sg2:"<b>第 2 行</b> — 标签文字（可自定义）。",sg3:"<b>第 3 行</b> — 每枚代币的价格（数字，如 20）。",
      signUseT:"使用告示牌",signUseP:"玩家右键点击告示牌，选择购买数量并确认。金额通过 Vault 扣除，代币立即发放。",
      signPrem:"<b>高级版：</b>VIP 等级通过 slotmachine.discount.vip1/2 权限自动获得折扣。",
      cfgLead:"主文件：plugins/SlotMachine/config.yml。编辑后运行 /slot reload。",cfgMachineT:"机器与头奖",cfgReelsT:"转轮符号",cfgReelsP:"数字是权重（稀有度）。越高出现越频繁。",cfgPrizesT:"奖励金额",
      prizesTitle:"奖励与玩法",prizesSub:"让三个转轮的符号相配。只有以下组合才有奖：",prizeGrowing:"累积奖池",prizeTwoDia:"两颗钻石 + 任意",prizeTwoEme:"两颗绿宝石 + 任意",
      prizesNote:"<b>其他符号一律不中奖</b>——即使三个相同。符号越稀有，奖励越大。",
      editionsTitle:"免费版 vs 高级版",freeTag:"免费版",proTag:"高级版",freeDesc:"为你的服务器提供一座可用的完整赌场。",proDesc:"包含免费版的一切，外加完整功能。",
      ef1:"老虎机与金钱奖励",ef2:"累积头奖",ef3:"购买告示牌",ef4:"四种语言与全息显示",freeLimit:"每个服务器限 2 台机器。",
      ep1:"物品、指令与权限奖励",ep2:"VIP 购买折扣",ep3:"排行榜、统计与 PlaceholderAPI",ep4:"Discord 通知、冷却与限制",proLimit:"机器数量无限。",
      footMade:"由 infinity3113 制作 · SlotMachine"},

    es:{brandSub:"Plugins de Minecraft",sideDocs:"Documentación",
      navOverview:"Inicio",navInstall:"Instalación",navCommands:"Comandos",navPerms:"Permisos",navSigns:"Carteles de fichas",navConfig:"Configuración",navPrizes:"Premios",navEditions:"Gratis vs Premium",navReviews:"Reseñas",reviewsTitle:"Reseñas de jugadores",reviewsSub:"Lo que opinan los dueños de servidores sobre SlotMachine.",reviewsWord:"reseñas",reviewsWrite:"Escribir reseña",reviewsLoginPrompt:"Inicia sesión para dejar una reseña.",navLogin:"Entrar",navHubPlugins:"Plugins",navMyPanel:"Mi panel",navLogout:"Salir",navRegister:"Crear cuenta",reviewsNone:"Aún no hay reseñas — ¡sé el primero!",buyPremium:"Comprar Premium",reviewWriteT:"Escribir reseña",reviewEditT:"Edita tu reseña",reviewSaved:"Reseña guardada",reviewUpdate:"Actualizar reseña",reviewPublish:"Publicar reseña",reviewPh:"Comparte tu experiencia…",
      heroBadge:"Casino para Minecraft · 1.21+",heroTagline:"Tragamonedas reales, construidas en tu mundo con un tocadiscos y tres marcos. Mete una ficha, gira los rodillos y gana dinero real.",
      btnDownload:"Descargar",btnSpigot:"Ver en Spigot",statVersion:"Versión",statServer:"Servidor",statEconomy:"Economía",jackpotLabel:"BOTE",
      featuresTitle:"Todo lo que un casino necesita",
      f1t:"Tragamonedas reales",f1d:"Construye una máquina funcional con un tocadiscos y tres marcos.",
      f2t:"Premios en dinero",f2d:"Los premios pagan dinero real vía Vault — EssentialsX, CMI, cualquier economía.",
      f3t:"Carteles de fichas",f3d:"Los jugadores compran sus fichas en un cartel. Sin necesidad de admin.",
      f4t:"Bote creciente",f4d:"El bote crece con cada giro hasta que alguien saca tres diamantes.",
      f5t:"Cuatro idiomas",f5d:"Inglés, español, francés y chino — totalmente editable.",
      f6t:"Hologramas",f6d:"Un marcador de bote flotante con DecentHolograms.",
      instLead:"Pon SlotMachine en marcha en tu servidor en pocos minutos.",instReq:"Requisitos",thReq:"Requisito",thNotes:"Notas",
      reqVault:"Requerido — puente de economía",reqEcoName:"Plugin de economía",reqEco:"Requerido — EssentialsX, CMI o cualquier economía Vault",reqHolo:"Requerido — holograma del bote",reqPapi:"Opcional (Premium)",
      instStepsT:"Pasos",st1:"Descarga <b>SlotMachine.jar</b> desde la página del recurso.",st2:"Instala <b>Vault</b>, un plugin de economía (EssentialsX o CMI) y <b>DecentHolograms</b>.",st3:"Pon SlotMachine.jar en la carpeta <b>plugins/</b> del servidor.",st4:"<b>Reinicia</b> el servidor (un reload no basta en la 1ª instalación).",st5:"Los archivos se generan en plugins/SlotMachine/ — config.yml, machines.yml y la carpeta lang/.",
      instLangT:"Elegir idioma",instLangP:"Abre config.yml, define el idioma y ejecuta /slot reload.",
      cmdLead:"Comando base /slot — alias /slots, /tragamonedas.",thCmd:"Comando",thDesc:"Qué hace",thPerm:"Permiso",thDefault:"Por defecto",everyone:"todos",
      c1:"Empezar a crear una máquina",c2:"Eliminar una máquina",c3:"Darte fichas de casino",c4:"Recargar config e idiomas",c5:"Ranking de ganancias",c6:"Tus estadísticas",c7:"Mostrar el menú de ayuda",c8:"Mostrar info del plugin",
      cmdCreateT:"Crear una máquina",cm1:"Coloca un <b>tocadiscos</b> y, al lado, <b>3 marcos</b> en fila.",cm2:"Ejecuta <b>/slot create &lt;nombre&gt;</b>.",cm3:"<b>Clic derecho en el tocadiscos</b> — se vuelve el centro de la máquina.",cm4:"<b>Clic derecho en los 3 marcos en orden</b> (de izquierda a derecha).",cm5:"¡Listo! La máquina se guarda y aparece un holograma de bote encima.",
      cmdPlay:"Para jugar, el jugador hace clic derecho en el tocadiscos con una ficha. Los rodillos giran y pagan si los símbolos coinciden.",
      permLead:"Otórgalos con LuckPerms o cualquier plugin de permisos.",
      pm1:"Admin completo: crear/eliminar, getcoin, reload",pm2:"Jugar a las tragamonedas",pm3:"Crear carteles de fichas",pm4:"Usar carteles de fichas",pm5:"Descuento de compra VIP",permExT:"Ejemplo (LuckPerms)",
      signLead:"Deja que los jugadores compren sus fichas en un cartel — el precio se cobra vía Vault.",signCreateT:"Crear un cartel",signCreateP:"Coloca un cartel y escribe, línea por línea:",
      sg1:"<b>Línea 1</b> — [Slots] identifica el cartel (obligatorio).",sg2:"<b>Línea 2</b> — texto de la etiqueta (personalizable).",sg3:"<b>Línea 3</b> — el precio por ficha (un número, ej. 20).",
      signUseT:"Usar un cartel",signUseP:"El jugador hace clic derecho, elige cuántas fichas comprar y confirma. El dinero se cobra vía Vault y las fichas se dan al instante.",
      signPrem:"<b>Premium:</b> los rangos VIP obtienen descuentos automáticos con los permisos slotmachine.discount.vip1/2.",
      cfgLead:"Archivo principal: plugins/SlotMachine/config.yml. Ejecuta /slot reload tras editar.",cfgMachineT:"Máquina y bote",cfgReelsT:"Símbolos de la ruleta",cfgReelsP:"Los números son pesos (rareza). Mayor = aparece más a menudo.",cfgPrizesT:"Pagos de premios",
      prizesTitle:"Premios y cómo ganar",prizesSub:"Haz coincidir los símbolos en los tres rodillos. Solo estas combinaciones pagan:",prizeGrowing:"Bote acumulado",prizeTwoDia:"Dos diamantes + cualquiera",prizeTwoEme:"Dos esmeraldas + cualquiera",
      prizesNote:"<b>Ningún otro símbolo paga</b> — ni siquiera tres iguales. Cuanto más raro el símbolo, mayor el premio.",
      editionsTitle:"Gratis vs Premium",freeTag:"Gratis",proTag:"Premium",freeDesc:"Un casino completo y funcional para tu servidor.",proDesc:"Todo lo de Gratis, más la función completa.",
      ef1:"Tragamonedas y premios en dinero",ef2:"Bote creciente",ef3:"Carteles de fichas",ef4:"Cuatro idiomas y hologramas",freeLimit:"Limitado a 2 máquinas por servidor.",
      ep1:"Premios de objetos, comandos y permisos",ep2:"Descuentos VIP",ep3:"Rankings, estadísticas y PlaceholderAPI",ep4:"Avisos de Discord, cooldowns y límites",proLimit:"Máquinas ilimitadas.",
      footMade:"Hecho por infinity3113 · SlotMachine"}
  };
  var htmlKeys={st1:1,st2:1,st3:1,st4:1,cm1:1,cm2:1,cm3:1,cm4:1,sg1:1,sg2:1,sg3:1,signPrem:1,prizesNote:1};
  function setLang(l){
    var d=I18N[l]||I18N.en;
    document.querySelectorAll('[data-i18n]').forEach(function(el){
      var k=el.getAttribute('data-i18n'); if(d[k]==null) return;
      if(htmlKeys[k]) el.innerHTML=d[k]; else el.textContent=d[k];
    });
    document.querySelectorAll('[data-i18n-ph]').forEach(function(el){
      var k=el.getAttribute('data-i18n-ph'); if(d[k]!=null) el.setAttribute('placeholder',d[k]);
    });
    document.querySelectorAll('.langsw button').forEach(function(b){b.classList.toggle('on',b.getAttribute('data-lang')===l);});
    try{document.documentElement.lang=l;localStorage.setItem('lang',l);}catch(e){}
    document.cookie='lang='+l+';path=/;max-age=31536000';
  }
  document.querySelectorAll('.langsw button').forEach(function(b){
    b.addEventListener('click',function(){setLang(b.getAttribute('data-lang'));});
  });
  // idioma recordado en todo el sitio (misma cookie que el resto)
  (function(){var s;try{s=localStorage.getItem('lang');}catch(e){}
    if(!s){var m=document.cookie.match(/(?:^|;\s*)lang=([^;]+)/);s=m?m[1]:'es';}
    setLang(s);})();

  // wiki tab switching
  function spinReels(){
    if(matchMedia('(prefers-reduced-motion:reduce)').matches) return;
    document.querySelectorAll('.reel').forEach(function(r,i){
      setTimeout(function(){r.classList.add('spin');setTimeout(function(){r.classList.remove('spin');},520);},110*i);
    });
  }
  function show(p){
    document.querySelectorAll('.page').forEach(function(s){s.classList.toggle('active',s.getAttribute('data-p')===p);});
    document.querySelectorAll('.sidenav a').forEach(function(a){a.classList.toggle('on',a.getAttribute('data-page')===p);});
    window.scrollTo({top:0,behavior:'smooth'});
    if(p==='overview') spinReels();
  }
  document.querySelectorAll('.sidenav a').forEach(function(a){
    a.addEventListener('click',function(e){e.preventDefault();show(a.getAttribute('data-page'));});
  });
  spinReels();

  // Selector de estrellas del formulario de reseña
  var rIn=document.getElementById('rating'), sp=document.getElementById('starpick');
  if(rIn && sp){
    var rating=+rIn.value||0, st=sp.querySelectorAll('span');
    function paint(n){st.forEach(function(s,i){s.classList.toggle('hot',i<n);});}
    st.forEach(function(s){
      s.addEventListener('mouseenter',function(){paint(+s.getAttribute('data-v'));});
      s.addEventListener('click',function(){rating=+s.getAttribute('data-v');rIn.value=rating;paint(rating);});
    });
    sp.addEventListener('mouseleave',function(){paint(rating);});
    paint(rating);
  }
  // Abrir la pestaña de Reseñas tras guardar
  if(/[?&]saved/.test(location.search)) show('reviews');
})();
</script>

</body>
</html>
