:root {
  --ink: #102438;
  --muted: #617184;
  --navy: #071824;
  --navy-2: #0b2335;
  --surface: #f7f8f4;
  --card: #ffffff;
  --line: rgba(16, 36, 56, .1);
  --green: #41b883;
  --green-2: #2c986a;
  --gold: #f4c45b;
  --danger: #db5b67;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(7, 24, 36, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: Arial, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.shell { max-width: 1180px; }

.site-header { position: absolute; inset: 0 0 auto; z-index: 20; border-bottom: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(3,17,28,.72), rgba(3,17,28,.05)); }
.navbar { min-height: 78px; }
.navbar .nav-link { color: rgba(255,255,255,.8); font-weight: 600; padding: .75rem 1rem !important; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: #fff; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff !important; font-weight: 700; letter-spacing: -.02em; }
.brand b { color: var(--gold); }
.brand-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, var(--green), #69d7a3); color: #062117; font-size: .82rem; font-weight: 900; box-shadow: 0 8px 24px rgba(65,184,131,.35); }
.brand-mark.small { width: 30px; height: 30px; border-radius: 10px; margin-left: .4rem; }
.nav-cta { margin-right: 1rem; }
.admin-link { color: var(--gold) !important; }

.btn { border-radius: 13px; border: 0; padding: .72rem 1.25rem; font-weight: 750; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; box-shadow: 0 10px 28px rgba(44,152,106,.26); }
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, #4fca91, #25845d); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.08); color: inherit; border: 1px solid rgba(255,255,255,.18); }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: inherit; }
.btn-secondary { background: #dfe8ec; color: var(--ink); }
.btn-success { background: var(--green); color: #fff; }
.btn-warning { background: var(--gold); color: #422f08; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-muted { background: #d9dfdf; color: #7a858c; cursor: not-allowed; }
.btn-sm { padding: .45rem .68rem; border-radius: 9px; font-size: .78rem; }
.full { width: 100%; }

.hero { min-height: 760px; position: relative; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--navy); }
.hero-backdrop { position: absolute; inset: 0; background-image: linear-gradient(90deg, rgba(2,15,25,.05) 0%, rgba(2,15,25,.3) 48%, rgba(2,15,25,.88) 100%), url('/images/hero-landscape.png'); background-size: cover; background-position: center; transform: scale(1.01); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 180px; background: linear-gradient(transparent, rgba(7,24,36,.9)); }
.hero-content { position: relative; z-index: 2; width: 100%; padding-top: 78px; }
.hero-copy { max-width: 640px; margin-right: 0; }
.eyebrow, .kicker { display: inline-flex; align-items: center; gap: .5rem; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 850; color: var(--green); }
.eyebrow { color: #b5f6d6; padding: .45rem .7rem; border: 1px solid rgba(181,246,214,.22); background: rgba(7,24,36,.25); border-radius: 999px; backdrop-filter: blur(8px); }
.live-dot, .status-orb { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #97a3ac; }
.live-dot, .status-orb.online { background: #52df98; box-shadow: 0 0 0 5px rgba(82,223,152,.13); }
.status-orb.offline { background: var(--danger); box-shadow: 0 0 0 5px rgba(219,91,103,.13); }
.hero h1 { margin: 1.25rem 0 1rem; font-size: clamp(3rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.055em; font-weight: 900; }
.hero h1 span { color: var(--gold); }
.hero-copy > p { max-width: 590px; font-size: 1.18rem; color: rgba(255,255,255,.78); }
.hero-actions { display: flex; gap: .8rem; margin: 2rem 0; }
.server-pill { display: inline-flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-radius: 999px; background: rgba(4,19,30,.58); border: 1px solid rgba(255,255,255,.13); backdrop-filter: blur(10px); }
.server-pill span:last-child { color: rgba(255,255,255,.62); padding-right: .8rem; border-right: 1px solid rgba(255,255,255,.16); }
.server-pill.compact { padding: .55rem .85rem; color: #fff; }

.stats-strip { position: relative; z-index: 3; margin-top: -72px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.96); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.stat-grid > div { padding: 1.45rem 1.8rem; border-left: 1px solid var(--line); }
.stat-grid > div:last-child { border-left: 0; }
.stat-grid span, .metric-grid span, .download-meta span { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat-grid strong { display: block; margin-top: .2rem; font-size: 1.25rem; }

.section { padding: 110px 0; }
.section-light { background: var(--surface); }
.section-dark { background: var(--navy); color: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 3rem; margin-bottom: 2.5rem; }
.section-heading.compact { margin-bottom: 1.4rem; }
.section-heading h2 { margin: .35rem 0 0; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 850; letter-spacing: -.04em; }
.section-heading > p { max-width: 480px; color: var(--muted); margin: 0; }
.section-dark .section-heading > p { color: rgba(255,255,255,.6); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature-card { padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.76); box-shadow: 0 10px 40px rgba(7,24,36,.06); }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; background: #e7f8f0; color: var(--green-2); border-radius: 16px; font-size: 1.35rem; }
.feature-card h3 { margin: 1.25rem 0 .5rem; font-size: 1.25rem; font-weight: 800; }
.feature-card p { color: var(--muted); margin: 0; }
.two-column { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; }
.ranking-card, .news-card, .table-card, .form-card, .info-card, .download-card, .download-meta, .steps, .prose-card, .panel-card { border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.ranking-card { padding: 1rem 1.35rem; color: var(--ink); }
.rank-row { display: grid; grid-template-columns: 55px 1fr 95px 90px; align-items: center; gap: .7rem; padding: .9rem .25rem; border-bottom: 1px solid var(--line); }
.rank-no { color: var(--green-2); font-weight: 850; }
.job { color: var(--muted); font-size: .84rem; }
.text-link { display: inline-block; margin: 1rem .25rem .2rem; color: var(--green-2); font-weight: 750; }
.news-list { display: grid; gap: .8rem; }
.news-card { padding: 1.35rem 1.5rem; color: var(--ink); box-shadow: none; border: 1px solid rgba(255,255,255,.08); }
.news-card time { color: var(--green-2); font-size: .78rem; font-weight: 800; }
.news-card h3 { margin: .3rem 0; font-size: 1.08rem; }
.news-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); text-align: center; padding: 1.5rem; }
.cta-section { padding: 70px 0; background: linear-gradient(120deg, #e3f8ee, #f7efce); }
.cta-section .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-section span { color: var(--green-2); font-weight: 800; }
.cta-section h2 { margin: .15rem 0; font-size: 2.3rem; font-weight: 850; }

.page-hero { padding: 165px 0 70px; background: radial-gradient(circle at 18% 20%, rgba(65,184,131,.22), transparent 30%), linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.page-hero h1 { margin: .45rem 0; font-weight: 900; letter-spacing: -.04em; font-size: clamp(2.5rem, 6vw, 4rem); }
.page-hero p { margin: 0; color: rgba(255,255,255,.65); }
.form-layout { display: grid; grid-template-columns: 1.45fr .75fr; gap: 1.4rem; align-items: start; }
.form-card, .info-card, .prose-card { padding: 2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .38rem; }
.field label { font-size: .82rem; font-weight: 800; color: #354b5e; }
.field input, .field select, .field textarea, .admin-search input, .inline-form input, .inline-form select { width: 100%; border: 1px solid #d9e1e4; background: #fbfcfb; color: var(--ink); border-radius: 11px; padding: .75rem .85rem; outline: none; transition: border .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus, .admin-search input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(65,184,131,.12); }
.field small { color: var(--muted); font-size: .72rem; }
.field span, .validation-summary, span[data-valmsg-for] { color: var(--danger); font-size: .78rem; }
.check-row { display: flex; align-items: center; gap: .6rem; margin: 1.15rem 0; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green-2); }
.honeypot { position: absolute; right: -10000px; width: 1px; height: 1px; overflow: hidden; }
.info-card { background: var(--navy); color: #fff; }
.info-card h2 { margin: .45rem 0 1rem; font-weight: 850; }
.info-card ul { padding-right: 1.2rem; color: rgba(255,255,255,.7); }
.info-card li { margin: .7rem 0; }
.alert { border: 0; border-radius: 13px; padding: .9rem 1rem; }
.alert-success { background: #dff7eb; color: #176143; }
.alert-danger { background: #fde8ea; color: #8e2d37; }
.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 1rem; background: #edf3f3; color: #536475; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.data-table td { padding: 1rem; border-bottom: 1px solid var(--line); }
.data-table td small { display: block; color: var(--muted); }
.rank-badge, .tag, .version-tag { display: inline-flex; align-items: center; padding: .26rem .55rem; border-radius: 999px; background: #e7f8f0; color: var(--green-2); font-size: .75rem; font-weight: 850; }
.download-layout { display: grid; gap: 1.2rem; }
.download-card { padding: 2rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.4rem; }
.download-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 20px; background: #e7f8f0; color: var(--green-2); font-size: 2rem; font-weight: 900; }
.download-card h2 { margin: .4rem 0 .2rem; font-weight: 850; }
.download-card p { margin: 0; color: var(--muted); }
.download-meta { display: grid; grid-template-columns: .5fr .7fr 2fr; overflow: hidden; }
.download-meta > div { padding: 1.2rem 1.5rem; border-left: 1px solid var(--line); }
.download-meta .hash { min-width: 0; }
.download-meta code { display: block; direction: ltr; overflow-wrap: anywhere; color: #30495d; }
.steps { padding: 2rem; }
.steps h2 { font-weight: 850; }
.steps ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; counter-reset: step; }
.steps li { position: relative; padding: 1.2rem 3.8rem 1.2rem 1rem; background: #f3f7f5; border-radius: 15px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; right: 1rem; top: 1rem; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: #fff; font-weight: 900; }
.steps li span { display: block; color: var(--muted); font-size: .88rem; }
.security-note { padding: 1rem 1.2rem; border: 1px solid #efd997; background: #fff9e5; border-radius: 13px; color: #624d12; }
.prose-card { max-width: 880px; }
.prose-card h2 { font-weight: 850; margin-top: 1.7rem; }

.site-footer { padding: 2rem 0; background: #04111a; color: rgba(255,255,255,.58); font-size: .85rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 1rem; }
.footer-grid > div:nth-child(2) { text-align: center; }
.footer-grid > div:last-child { text-align: left; }
.site-footer a { color: #fff; }

.admin-login-section { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 20% 10%, rgba(65,184,131,.25), transparent 32%), var(--navy); }
.admin-login-card { width: min(460px, 100%); padding: 2.2rem; background: #fff; border-radius: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.admin-login-card h1 { font-size: 1.8rem; font-weight: 900; margin: .5rem 0; }
.admin-login-card > p { color: var(--muted); }
.admin-login-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.admin-brand { margin-bottom: 1.4rem; color: var(--ink) !important; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; background: #eef2f2; direction: rtl; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 1.5rem; display: flex; flex-direction: column; background: var(--navy); color: #fff; }
.admin-sidebar .admin-brand { color: #fff !important; }
.admin-sidebar nav { display: grid; gap: .35rem; margin: 1.2rem 0 auto; }
.admin-sidebar nav a { padding: .7rem .9rem; border-radius: 10px; color: rgba(255,255,255,.68); font-weight: 650; }
.admin-sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-main { min-width: 0; padding: 2rem; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.admin-top h1 { font-weight: 900; margin: .2rem 0; }
.admin-section { margin-bottom: 1.3rem; scroll-margin-top: 1rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.metric-grid article { padding: 1.4rem; background: #fff; border-radius: 18px; border: 1px solid var(--line); }
.metric-grid strong { display: block; font-size: 1.8rem; letter-spacing: -.04em; margin-top: .2rem; }
.metric-grid small { color: var(--muted); }
.panel-card { padding: 1.4rem; box-shadow: 0 12px 34px rgba(7,24,36,.07); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: .15rem 0; font-size: 1.45rem; font-weight: 850; }
.panel-heading > span { color: var(--muted); font-size: .85rem; }
.server-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.config-grid { display: grid; grid-template-columns: repeat(6,1fr) auto; gap: .7rem; align-items: end; padding-top: 1rem; }
.admin-search { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; padding: .8rem; background: #fff; border-radius: 15px; }
.admin-table { min-width: 1100px; }
.inline-form { display: flex; align-items: center; gap: .35rem; min-width: 250px; }
.inline-form input { min-width: 80px; padding: .45rem .55rem; font-size: .78rem; }
.inline-form select { min-width: 100px; padding: .45rem; }
.tag { margin: .15rem; background: #e9eef0; color: #596977; }
.tag-online { background: #dff7eb; color: #176143; }
.tag-danger { background: #fde8ea; color: #8e2d37; }
.news-form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.full-span { grid-column: 1 / -1; }
.news-admin-list { display: grid; gap: .5rem; margin-top: 1rem; }
.news-admin-list > div { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .7rem; padding: .65rem; background: #f4f7f6; border-radius: 11px; }
.news-admin-list time { color: var(--muted); font-size: .78rem; }
.log-view { margin: 0; max-height: 520px; overflow: auto; padding: 1rem; border-radius: 14px; background: #031019; color: #a9e6c8; font: 12px/1.55 Consolas, monospace; white-space: pre-wrap; direction: ltr; text-align: left; }

.reveal { animation: enter .7s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 992px) {
  .site-header { background: rgba(4,17,27,.9); }
  .navbar-collapse { padding: 1rem 0; }
  .nav-cta { margin: .5rem 0 0; }
  .hero { min-height: 700px; }
  .hero-backdrop { background-position: 42% center; }
  .feature-grid, .stat-grid, .metric-grid { grid-template-columns: repeat(2,1fr); }
  .two-column, .form-layout { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: repeat(3,1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; margin: .5rem 0 1rem; }
  .admin-sidebar form { max-width: 180px; }
}

@media (max-width: 680px) {
  html { font-size: 15px; }
  .section { padding: 72px 0; }
  .hero { min-height: 730px; align-items: flex-end; padding-bottom: 100px; }
  .hero-backdrop { background-image: linear-gradient(180deg, rgba(2,15,25,.12), rgba(2,15,25,.92) 75%), url('/images/hero-landscape.png'); background-position: 35% center; }
  .hero h1 { font-size: 3rem; }
  .hero-actions, .cta-section .container { align-items: stretch; flex-direction: column; }
  .server-pill { align-items: flex-start; border-radius: 18px; flex-wrap: wrap; }
  .server-pill span:last-child { border: 0; padding: 0; width: 100%; }
  .stats-strip { margin-top: -50px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid > div { padding: 1rem; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 1rem; }
  .feature-grid, .form-grid, .steps ol, .footer-grid, .metric-grid { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 45px 1fr 70px; }
  .rank-row .job { display: none; }
  .download-card { grid-template-columns: auto 1fr; }
  .download-card .btn { grid-column: 1 / -1; }
  .download-meta { grid-template-columns: 1fr; }
  .download-meta > div { border-left: 0; border-bottom: 1px solid var(--line); }
  .footer-grid > div, .footer-grid > div:nth-child(2), .footer-grid > div:last-child { text-align: center; }
  .admin-main { padding: 1rem; }
  .admin-top { align-items: flex-start; gap: 1rem; }
  .config-grid, .news-form { grid-template-columns: 1fr 1fr; }
  .config-grid .btn, .full-span { grid-column: 1 / -1; }
  .news-admin-list > div { grid-template-columns: auto 1fr; }
}
