/*
 * Windows 95/98 theme - solid navy titlebars, silver #c0c0c0 faces,
 * authentic double-bevel controls via inset box-shadows. Teal desktop.
 */
:root {
  --bg: #008080;
  --panel: #c0c0c0;
  --panel-2: #ffffff;
  --border: #808080;
  --text: #000000;
  --muted: #404040;
  --accent: #000080;
  --accent-2: #1084d0;
  --ok: #008000;
  --warn: #808000;
  --danger: #800000;
}

* { box-sizing: border-box; border-radius: 0 !important; box-shadow: none; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 12px/1.45 Tahoma, "MS Sans Serif", sans-serif;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 10px; }
a { color: #0000ff; }

/* classic raised bevel (buttons, windows) and sunken bevel (fields) */
.raised-bevel {
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.sunken-bevel {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a,
              inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

/* ---------- nav: taskbar ---------- */
.topnav {
  background: var(--panel);
  border-bottom: 1px solid #ffffff;
  box-shadow: inset 0 1px #dfdfdf, inset -1px 0 #808080, 0 -1px #0a0a0a;
  position: sticky; top: 0; z-index: 10;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 3px 6px; gap: 8px; flex-wrap: wrap; }
.brand {
  font-weight: bold; font-size: 13px; color: #000; text-decoration: none;
  padding: 3px 12px;
}
.topnav nav { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.topnav nav a { color: #000; text-decoration: none; padding: 2px 6px; }
.topnav nav a:hover { background: var(--accent); color: #fff; }
.topnav nav a.on { background: #1084d0; color: #fff; outline: 1px dotted #fff; outline-offset: -3px; }
.admin-link { font-weight: bold; color: #800000 !important; }
.credits-badge { color: #008000; font-weight: bold; }
.nav-sep { width: 1px; height: 16px; background: #808080; display: inline-block; }

/* ---------- language + theme switcher ---------- */
.lang-switch { position: relative; }
.lang-switch > summary {
  list-style: none; cursor: pointer; user-select: none;
  color: #000; background: var(--panel); padding: 3px 10px; font-size: 11px; font-weight: bold;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch[open] > summary {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a,
              inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 2px);
  background: var(--panel); padding: 2px; min-width: 150px;
  display: flex; flex-direction: column; gap: 0; z-index: 200;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080;
}
.lang-menu a { padding: 3px 18px !important; font-size: 11px; color: #000; text-decoration: none; }
.lang-menu a:hover { background: var(--accent); color: #fff; }
.lang-menu a.on::before { content: "\2713\00a0"; }

/* ---------- layout blocks ---------- */
main.wrap { padding-top: 18px; padding-bottom: 38px; min-height: calc(100vh - 120px); }
.card {
  background: var(--panel);
  padding: 10px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.card.wide { width: 100%; margin-bottom: 16px; }
.hero { text-align: center; padding: 42px 0 28px; }
.hero h1 { font-size: 24px; font-weight: bold; margin: 0 0 10px; }
.lead { color: var(--text); max-width: 600px; margin: 0 auto 20px; font-size: 13px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { text-align: center; display: flex; flex-direction: column; gap: 3px; }
.stat .num { font-size: 22px; font-weight: bold; color: var(--accent); }
.cta-row { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 20px 0; flex-wrap: wrap; }
.auth-box { max-width: 420px; margin: 40px auto; }
.auth-box.card > h2 { font-size: 13px; font-weight: bold; margin: -10px -10px 10px; padding: 4px 8px;
  background: var(--accent); color: #fff; }
.big-pad { padding: 50px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
h2 { font-size: 15px; font-weight: bold; }

/* ---------- forms ---------- */
label { display: block; margin-bottom: 10px; color: var(--text); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: none;
  padding: 4px 5px;
  font-size: 12px;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  margin-top: 2px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a,
              inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
input:focus, select:focus { outline: 1px dotted #000; outline-offset: -4px; }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-row input, .form-row select { width: auto; flex: 1 1 180px; margin: 0; }
.inline-form { display: inline-flex; gap: 5px; align-items: center; margin: 0; }
.inline { display: inline-flex; gap: 5px; align-items: center; margin: 0; color: var(--text); }
.tiny { width: 70px !important; }

.btn {
  background: var(--panel);
  color: #000;
  border: none;
  padding: 4px 14px;
  font-size: 12px;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.btn:hover { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
             inset -2px -2px #808080, inset 2px 2px #dfdfdf, 0 0 0 1px #00000033; }
.btn:active { box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a,
              inset -2px -2px #dfdfdf, inset 2px 2px #808080; }
.btn-sm { padding: 2px 8px; font-size: 11px; }
.btn-lg { padding: 6px 20px; font-size: 13px; font-weight: bold; }
.btn-block { width: 100%; margin-top: 6px; }
.btn-ghost { background: var(--panel); }
.btn-danger { color: #800000; font-weight: bold; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; margin-bottom: 18px; background: #fff;
        border: 1px solid #808080; }
th, td { text-align: left; padding: 4px 7px; border-right: 1px solid #d0cfc0; border-bottom: 1px solid #d0cfc0; vertical-align: middle; font-size: 12px; }
th { background: var(--panel); font-weight: bold; color: #000;
     box-shadow: inset 1px 1px #ffffff, inset -1px 0 #808080; }
td:last-child, th:last-child { border-right: none; }
tr:hover td { background: #000080; color: #fff; }
tr:hover td a { color: #fff; }
.url-cell a { word-break: break-all; color: #0000ff; }
.row-banned td { color: #808080; text-decoration: line-through; }

.status { padding: 1px 6px; font-size: 11px; font-weight: bold; background: #fff; border: 1px solid #808080; }
.status-active { color: #008000; }
.status-paused { color: #808000; }
.tag { background: #d8d0bf; border: 1px solid #808080; padding: 0 5px; font-size: 10.5px; color: #000; }
.tag-admin { color: #800000; font-weight: bold; }

/* ---------- site list: thumbs + options editor ---------- */
.site-thumb { border: 1px solid #808080; object-fit: cover; background: #fff; display: block; }
.tags-line { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.opt-details summary { cursor: pointer; color: #0000ff; font-size: 12px; text-decoration: underline; }
.opt-details[open] summary { margin-bottom: 8px; font-weight: bold; }
.opt-body {
  display: flex; flex-direction: column; gap: 11px;
  width: 460px; max-width: 92vw;
  background: var(--panel); padding: 10px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.opt-body label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text); }

/* ---------- structured site forms ---------- */
.site-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.frow { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.frow.tight { gap: 9px; margin-bottom: 0; }
.frow.end { justify-content: flex-end; margin-bottom: 0; }
.site-form label, .frow > label {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1 1 170px; min-width: 0;
  font-size: 11px; color: var(--text); margin: 0;
}
.site-form .fgrow2 { flex: 2 1 300px; }
.fgrow3 { flex: 3 1 240px !important; }
.frow label.check {
  flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text);
  border: 1px dotted #808080; padding: 5px 9px;
}
.frow label.check input { width: auto; margin: 0; }

/* ---------- geo target grid: strictly aligned columns ---------- */
.geo-wrap summary { cursor: pointer; color: #0000ff; font-size: 12px; text-decoration: underline; user-select: none; }
.geo-wrap[open] > summary { margin-bottom: 6px; }
.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px 16px;
  max-height: 240px; overflow-y: auto;
  background: #fff; border: 1px solid #808080;
  padding: 8px 12px; margin-top: 5px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a,
              inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
.geo-grid label {
  display: flex; align-items: center; gap: 7px;
  margin: 0; padding: 2px 0;
  font-size: 12px; color: var(--text); cursor: pointer;
  border-bottom: 1px dotted #ccc;
  min-width: 0;
}
.geo-grid label:hover { background: var(--accent); color: #fff; }
.geo-grid input { width: auto; margin: 0; flex: 0 0 auto; }
.geo-grid label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- alerts / lists / chart ---------- */
.alert { padding: 7px 11px; margin-bottom: 12px; border: 1px solid #808080; background: #ffffe1; color: #000; }
.alert-info    { background: #ffffe1; }
.alert-success { border-color: #008000; background: #e6ffe6; }
.alert-error   { border-color: #800000; background: #ffdddd; }
.ticks { list-style: square; padding-left: 20px; }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col span { font-size: 10px; color: var(--muted); margin-top: 3px; }
.bar { width: 100%; background: var(--accent); min-height: 2px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid #ffffff; padding: 9px 0;
  color: var(--muted); font-size: 11px;
  background: var(--panel);
  box-shadow: inset 0 1px #dfdfdf, inset -1px 0 #808080, 0 -1px #0a0a0a;
}
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- surf controller ---------- */
.surf-body { background: var(--bg); }
.surf-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  background: var(--panel);
  border-bottom: 1px solid #ffffff;
  box-shadow: inset 0 1px #dfdfdf, inset -1px 0 #808080, 0 -1px #0a0a0a, 0 3px 6px rgba(0,0,0,.35);
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px; z-index: 100;
}
.surf-timer { font-size: 19px; font-weight: bold; min-width: 52px; text-align: center; color: var(--accent); }
.surf-progress { flex: none; width: 210px; height: 14px; background: #fff;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; overflow: hidden; }
.ad-slot { flex: none; width: 234px; height: 60px; overflow: hidden; background: #fff; border: 1px solid #808080; }
.ad-slot img { display: block; height: 60px; width: auto; max-width: 100%; }
#timer-bar { height: 100%; width: 100%; background: var(--accent); transition: width 1s linear; }
.surf-site { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.surf-credits b { color: #008000; white-space: nowrap; }
#surf-msg { color: #008000; opacity: 0; transition: opacity .3s; white-space: nowrap; font-weight: bold; }
#surf-msg.show { opacity: 1; }
#surf-msg.warn { color: #800000; }
.surf-start { max-width: 540px; margin: 0 auto; padding-top: 90px; text-align: center; }
.surf-start .card h3 { margin-top: 4px; }
