/*
 * Windows XP "Luna" theme - Bliss sky, cream windows with blue title bars,
 * taskbar navigation, Tahoma type. Same selectors as all other themes.
 */
:root {
  --bg: #3a6ea5;
  --panel: #ece9d8;
  --panel-2: #ffffff;
  --border: #7f9db9;
  --text: #000000;
  --muted: #444444;
  --accent: #0046d5;
  --accent-2: #0055ea;
  --ok: #107c10;
  --warn: #cc6600;
  --danger: #cc0000;
}

* { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; padding: 0; }
body {
  /* Bliss: green hill over blue sky, pure CSS */
  background:
    radial-gradient(ellipse 150% 58% at 50% 115%, #7ec850 0%, #5aa02c 48%, #4a8f24 55%, transparent 56%),
    linear-gradient(180deg, #1e5799 0%, #2989d8 40%, #7db9e8 72%, #b8ddf5 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 12px/1.5 Tahoma, "Segoe UI", sans-serif;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 12px; }

/* ---------- nav: the taskbar ---------- */
.topnav {
  background: linear-gradient(180deg, #3168d5 0%, #4993e6 8%, #215dc9 55%, #1941a5 100%);
  border-bottom: 1px solid #0f2f7a;
  position: sticky; top: 0; z-index: 10;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: auto; min-height: 42px; padding: 4px 0; }
.brand {
  background: linear-gradient(180deg, #5eac56 0%, #379a37 45%, #2f7a2c 55%, #256b23 100%);
  border: 1px solid #1e5c1e;
  border-radius: 0 0 10px 10px;
  color: #fff !important; text-decoration: none;
  font: bold 15px "Trebuchet MS", Tahoma, sans-serif;
  padding: 8px 18px 9px;
  text-shadow: 1px 1px 2px rgba(0, 40, 0, .7);
}
.topnav nav { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.topnav nav a { color: #fff; text-decoration: none; padding: 3px 2px; text-shadow: 1px 1px 1px rgba(0, 20, 80, .6); }
.topnav nav a:hover, .topnav nav a.on { text-decoration: underline; color: #ffe07a; }
.admin-link { color: #ffe07a !important; font-weight: bold; }
.credits-badge { color: #b5ffb5; font-weight: bold; }
.nav-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .45); 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);
  border: 1px solid var(--border); padding: 2px 8px; font-size: 11px; font-weight: bold;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch[open] > summary { background: #ffffe1; border-color: #003c74; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--panel); border: 1px solid #003c74;
  padding: 2px; min-width: 150px;
  display: flex; flex-direction: column; gap: 0; z-index: 200;
}
.lang-menu a { padding: 4px 20px 4px 10px !important; font-size: 11px; color: #000; text-decoration: none; }
.lang-menu a:hover { background: #316ac5; color: #fff !important; }
.lang-menu a.on::before { content: "\2713\00a0"; }

/* ---------- layout blocks ---------- */
main.wrap { padding-top: 18px; padding-bottom: 40px; min-height: calc(100vh - 130px); }
.card {
  background: var(--panel);
  border: 1px solid #0831d9;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 2px 2px 7px rgba(0, 0, 60, .35);
  padding: 12px 14px;
}
.card.wide { width: 100%; margin-bottom: 18px; }
.card > h3:first-child {
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 10%, #0050ee 45%, #026afe 85%, #003dd7 100%);
  margin: -12px -14px 10px;
  padding: 5px 12px;
  color: #fff;
  font: bold 12px "Trebuchet MS", Tahoma, sans-serif;
  text-shadow: 1px 1px 1px rgba(0, 0, 90, .65);
  border-radius: 7px 7px 0 0;
}
.hero { text-align: center; padding: 46px 0 32px; }
.hero h1 {
  font: bold 34px "Trebuchet MS", Tahoma, sans-serif;
  margin: 0 0 10px; color: #fff;
  text-shadow: 0 2px 6px rgba(0, 30, 90, .75);
}
.lead { color: #f0f8ff; max-width: 620px; margin: 0 auto 20px; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 30, 90, .8); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 13px; margin-bottom: 22px; }
.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; border: 1px solid var(--border); padding: 8px; background: var(--panel); }
.stat .num { font-size: 23px; font-weight: bold; color: var(--accent); font-family: "Trebuchet MS", Tahoma, sans-serif; }
.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 {
  background: linear-gradient(180deg, #0997ff, #0053ee 12%, #0050ee 50%, #003dd7);
  margin: -12px -14px 12px; padding: 6px 12px;
  color: #fff; font: bold 13px "Trebuchet MS", Tahoma, sans-serif;
  border-radius: 7px 7px 0 0;
}
.big-pad { padding: 50px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
h2 { font: bold 18px "Trebuchet MS", Tahoma, sans-serif; color: #00238f; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }

/* ---------- forms ---------- */
label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 6px;
  font-size: 12px;
  font-family: Tahoma, sans-serif;
  margin-top: 2px;
}
input:hover, select:hover { border-color: #e59700; }
input:focus, select:focus { outline: none; border-color: #003c74; background: #fdfdf5; }
.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: 6px; align-items: center; margin: 0; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; color: var(--muted); }
.tiny { width: 70px !important; }

.btn {
  background: linear-gradient(180deg, #ffffff 0%, #ecebe5 86%, #d8d0bf 100%);
  color: #000;
  border: 1px solid #003c74;
  border-radius: 3px;
  padding: 4px 14px;
  font-size: 12px;
  font-family: Tahoma, sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { border-color: #e59700; box-shadow: inset 0 0 0 1px #fff3c4, inset 0 0 6px #ffe6a0; }
.btn:active { border-color: #003c74; background: #d8d0bf; }
.btn-sm { padding: 2px 9px; font-size: 11px; }
.btn-lg { padding: 7px 22px; font-size: 14px; font-weight: bold; }
.btn-block { width: 100%; margin-top: 6px; }
.btn-ghost { background: var(--panel); }
.btn-danger { color: var(--danger); border-color: var(--danger); font-weight: bold; }
.btn-danger:hover { background: #ffdddd; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; margin-bottom: 16px; background: var(--panel-2); border: 1px solid var(--border); }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid #d0cfc0; vertical-align: middle; font-size: 12px; }
th {
  background: linear-gradient(180deg, #ffffff, #ece9d8);
  border-bottom: 1px solid var(--border); border-right: 1px solid #d0cfc0;
  font-weight: bold; font-size: 11px; color: #000;
}
td { border-right: 1px solid #e4e1d3; }
tr:hover td { background: #316ac5; color: #fff; }
tr:hover td a { color: #fff; }
.url-cell a { word-break: break-all; color: var(--accent); }
.row-banned td { color: #808080; text-decoration: line-through; }

.status { padding: 1px 7px; border: 1px solid; font-size: 11px; font-weight: bold; background: #fff; }
.status-active { color: var(--ok); border-color: var(--ok); }
.status-paused { color: var(--warn); border-color: var(--warn); }
.tag { background: #ffffe1; border: 1px solid var(--border); padding: 1px 5px; font-size: 10.5px; color: #333; }
.tag-admin { color: #800000; border-color: #800000; font-weight: bold; }

/* ---------- site list: thumbs + options editor ---------- */
.site-thumb { border: 1px solid var(--border); 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: var(--accent); 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); border: 1px solid #0831d9;
  border-radius: 6px; padding: 12px;
  box-shadow: 2px 2px 6px rgba(0, 0, 60, .3);
}
.opt-body label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }

/* ---------- 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(--muted); 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 var(--border); padding: 5px 9px;
}
.frow label.check input { width: auto; margin: 0; }

/* ---------- geo target grid: strictly aligned columns ---------- */
.geo-wrap summary { cursor: pointer; color: var(--accent); 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: var(--panel-2); border: 1px solid var(--border);
  padding: 8px 12px; margin-top: 5px;
}
.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: #316ac5; 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 #000; background: #ffffe1; color: #000; }
.alert-info    { background: #ffffe1; }
.alert-success { border-color: var(--ok); background: #e6ffe6; }
.alert-error   { border-color: var(--danger); 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: linear-gradient(180deg, #4a90d9, #215dc9); border: 1px solid #1941a5; border-bottom: none; min-height: 2px; }

/* ---------- footer: taskbar strip ---------- */
.footer {
  border-top: 1px solid #0f2f7a; padding: 10px 0;
  color: #dbeafc; font-size: 11px;
  background: linear-gradient(180deg, #4993e6 0%, #215dc9 40%, #1941a5 100%);
  text-shadow: 1px 1px 1px rgba(0, 20, 80, .6);
}
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer a { color: #ffe07a; }

/* ---------- surf controller ---------- */
.surf-body { background: var(--bg); }
.surf-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  background: linear-gradient(180deg, #3168d5 0%, #4993e6 8%, #215dc9 55%, #1941a5 100%);
  border-bottom: 1px solid #0f2f7a;
  display: flex; align-items: center; gap: 13px;
  padding: 0 14px; z-index: 100;
}
.surf-bar .brand { font-size: 13px; padding: 5px 12px 6px; border-radius: 0 0 8px 8px; }
.surf-timer {
  font-size: 20px; font-weight: bold; min-width: 52px; text-align: center;
  color: #fff; font-family: "Trebuchet MS", Tahoma, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 20, 80, .7);
}
.surf-progress { flex: none; width: 210px; height: 13px; background: #fff; border: 1px solid var(--border); overflow: hidden; }
.ad-slot { flex: none; width: 234px; height: 60px; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.ad-slot img { display: block; height: 60px; width: auto; max-width: 100%; }
#timer-bar { height: 100%; width: 100%; background: repeating-linear-gradient(90deg, #2a70d7 0 8px, #4a90d9 8px 12px); transition: width 1s linear; }
.surf-site { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dbeafc; }
.surf-credits b { color: #b5ffb5; white-space: nowrap; }
#surf-msg { color: #b5ffb5; opacity: 0; transition: opacity .3s; white-space: nowrap; font-weight: bold; }
#surf-msg.show { opacity: 1; }
#surf-msg.warn { color: #ffe07a; }
.surf-start { max-width: 540px; margin: 0 auto; padding-top: 95px; text-align: center; }
.surf-start .card h3 { margin-top: 4px; }

/* ---------- XP-flavored scrollbars (WebKit) ---------- */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #f1efe2; border-left: 1px solid #d0cfc0; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #cbd9f0, #9eb6e0); border: 1px solid var(--border); }
