/*
 * Windows 7 "Aero" theme - translucent glossy surfaces over a blue desktop
 * gradient, Segoe UI type, soft glows. Same selectors as all other themes.
 */
:root {
  --bg: #1e3c60;
  --panel: rgba(240, 247, 255, 0.62);
  --panel-2: rgba(255, 255, 255, 0.55);
  --border: #9db8d4;
  --text: #14283c;
  --muted: #4a6076;
  --accent: #1c5fbe;
  --accent-2: #3f8ae0;
  --ok: #1a7f37;
  --warn: #b06000;
  --danger: #b91d1d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(160, 205, 255, .55), transparent 55%),
    linear-gradient(180deg, #5a8ac2 0%, #33639c 45%, #16304f 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 13.5px/1.5 "Segoe UI", Tahoma, Verdana, sans-serif;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- nav ---------- */
.topnav {
  background: linear-gradient(180deg, rgba(30, 48, 76, .92), rgba(15, 27, 44, .92));
  border-bottom: 1px solid rgba(140, 180, 220, .5);
  box-shadow: 0 2px 12px rgba(0, 10, 25, .5);
  position: sticky; top: 0; z-index: 10;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand {
  font-weight: 600; font-size: 19px; letter-spacing: .3px;
  color: #eaf4ff; text-decoration: none;
  text-shadow: 0 0 8px rgba(120, 190, 255, .9), 0 1px 2px rgba(0, 20, 50, .8);
}
.topnav nav { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.topnav nav a { color: #cfe4fa; text-decoration: none; padding: 4px 2px; text-shadow: 0 1px 2px rgba(0, 10, 30, .7); }
.topnav nav a:hover, .topnav nav a.on { color: #fff; text-shadow: 0 0 10px rgba(130, 200, 255, 1); }
.admin-link { color: #ffd28a !important; }
.credits-badge { color: #a8f0b8; font-weight: 600; text-shadow: 0 0 6px rgba(80, 220, 120, .6); }
.nav-sep { width: 1px; height: 20px; background: rgba(150, 190, 230, .4); display: inline-block; }

/* ---------- language + theme switcher ---------- */
.lang-switch { position: relative; }
.lang-switch > summary {
  list-style: none; cursor: pointer; user-select: none;
  color: #dbeafc;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06));
  border: 1px solid rgba(170, 205, 240, .55);
  border-radius: 4px; padding: 3px 10px; font-size: 13px;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch[open] > summary { background: rgba(90, 167, 239, .45); color: #fff; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: rgba(245, 250, 255, .96);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 5px; min-width: 160px;
  display: flex; flex-direction: column; gap: 1px; z-index: 200;
  box-shadow: 0 6px 18px rgba(10, 30, 60, .35);
}
.lang-menu a { padding: 5px 10px !important; border-radius: 4px; font-size: 13.5px; color: var(--text); text-decoration: none; }
.lang-menu a:hover { background: linear-gradient(180deg, #6cb0f2, #2f7ad6); color: #fff; }
.lang-menu a.on { color: var(--accent); font-weight: 600; }

/* ---------- layout blocks ---------- */
main.wrap { padding-top: 24px; padding-bottom: 46px; min-height: calc(100vh - 130px); }
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .65);
  outline: 1px solid rgba(110, 150, 195, .45);
  border-radius: 8px;
  padding: 16px 18px;
  backdrop-filter: blur(8px) saturate(1.25);
  -webkit-backdrop-filter: blur(8px) saturate(1.25);
}
.card.wide { width: 100%; margin-bottom: 20px; }
.hero { text-align: center; padding: 56px 0 36px; }
.hero h1 {
  font-size: 38px; margin: 0 0 12px; font-weight: 600; color: #fff;
  text-shadow: 0 0 14px rgba(140, 200, 255, .95), 0 2px 4px rgba(0, 20, 50, .8);
}
.lead { color: #eaf3fd; max-width: 640px; margin: 0 auto 22px; font-size: 16.5px; text-shadow: 0 1px 3px rgba(0, 20, 50, .7); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat .num {
  font-size: 26px; font-weight: 600; color: #fff;
  text-shadow: 0 0 12px rgba(140, 200, 255, .95), 0 1px 2px rgba(0, 20, 50, .8);
}
.cta-row { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 22px 0; flex-wrap: wrap; }
.auth-box { max-width: 420px; margin: 48px auto; }
.big-pad { padding: 60px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- forms ---------- */
label { display: block; margin-bottom: 13px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 8px 11px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 4px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(63, 138, 224, .25);
}
.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, #6db3f2 0%, #3487d8 48%, #1c5fbe 52%, #4a9ae8 100%);
  color: #fff;
  border: 1px solid #1a4f96;
  border-radius: 4px;
  padding: 8px 17px;
  font-size: 14.5px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-shadow: 0 1px 2px rgba(10, 40, 90, .6);
}
.btn:hover { background: linear-gradient(180deg, #85c2f5 0%, #4a97e2 48%, #2a6fc8 52%, #5ba9ec 100%); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-lg { padding: 12px 26px; font-size: 16.5px; }
.btn-block { width: 100%; margin-top: 6px; }
.btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(210, 230, 250, .35));
  border: 1px solid var(--border); color: var(--text); text-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent); }
.btn-danger {
  background: linear-gradient(180deg, #f2b3b3, #d84a4a 52%, #b91d1d);
  border-color: #8f1414; color: #fff; text-shadow: 0 1px 2px rgba(80, 0, 0, .6);
}

/* ---------- tables ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 20px; }
th, td { text-align: left; padding: 8px 10px; vertical-align: middle; }
th {
  color: var(--accent); font-weight: 600; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(214, 231, 248, .55));
  border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid rgba(157, 184, 212, .45); background: rgba(255, 255, 255, .38); }
tr:nth-child(even) td { background: rgba(255, 255, 255, .55); }
tr:hover td { background: rgba(147, 197, 253, .35); }
.url-cell a { word-break: break-all; color: var(--accent); }
.row-banned td { opacity: .5; text-decoration: line-through; }

.status { padding: 2px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; border: 1px solid; background: rgba(255, 255, 255, .6); }
.status-active { color: var(--ok); border-color: var(--ok); }
.status-paused { color: var(--warn); border-color: var(--warn); }
.tag { background: rgba(255, 255, 255, .6); border: 1px solid var(--border); border-radius: 9px; padding: 1px 7px; font-size: 11.5px; color: var(--muted); }
.tag-admin { color: var(--warn); border-color: var(--warn); }

/* ---------- 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: 5px; }
.opt-details summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.opt-details[open] summary { margin-bottom: 8px; }
.opt-body {
  display: flex; flex-direction: column; gap: 12px;
  width: 460px; max-width: 92vw;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .65);
  outline: 1px solid rgba(110, 150, 195, .45);
  border-radius: 8px; padding: 14px;
  backdrop-filter: blur(8px) saturate(1.25);
  -webkit-backdrop-filter: blur(8px) saturate(1.25);
}
.opt-body label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

/* ---------- structured site forms ---------- */
.site-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.frow { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.frow.tight { gap: 10px; margin-bottom: 0; }
.frow.end { justify-content: flex-end; margin-bottom: 0; }
.site-form label, .frow > label {
  display: flex; flex-direction: column; gap: 5px;
  flex: 1 1 170px; min-width: 0;
  font-size: 12.5px; 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: 7px;
  font-size: 14px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 9px 13px;
}
.frow label.check input { width: auto; margin: 0; }

/* ---------- geo target grid: strictly aligned columns ---------- */
.geo-wrap summary { cursor: pointer; color: var(--accent); font-size: 13.5px; user-select: none; }
.geo-wrap[open] > summary { margin-bottom: 8px; }
.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px 18px;
  max-height: 260px; overflow-y: auto;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 12px 14px; margin-top: 8px;
}
.geo-grid label {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 3px 0;
  font-size: 13px; color: var(--text); cursor: pointer;
  border-bottom: 1px dotted rgba(110, 150, 195, .35);
  min-width: 0;
}
.geo-grid label:hover { color: var(--accent); }
.geo-grid input { width: auto; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.geo-grid label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- alerts / lists / chart ---------- */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid; background: rgba(255, 255, 255, .8); }
.alert-info    { border-color: var(--accent-2); color: #144a86; background: rgba(224, 240, 255, .85); }
.alert-success { border-color: var(--ok); color: var(--ok); background: rgba(230, 255, 236, .85); }
.alert-error   { border-color: var(--danger); color: var(--danger); background: rgba(255, 235, 235, .85); }
.ticks { list-style: none; padding-left: 0; }
.ticks li::before { content: "\2714"; color: var(--accent-2); margin-right: 9px; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; 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: 11px; color: var(--muted); margin-top: 4px; }
.bar {
  width: 100%;
  background: linear-gradient(180deg, #9ccdf7 0%, #3f8ae0 60%, #1c5fbe 100%);
  border: 1px solid #1a4f96; border-bottom: none;
  border-radius: 4px 4px 0 0; min-height: 2px;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid rgba(140, 180, 220, .5);
  padding: 14px 0; color: #dbeafc; font-size: 12.5px;
  background: rgba(15, 27, 44, .55);
  text-shadow: 0 1px 2px rgba(0, 10, 30, .6);
}
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer a { color: #cfe4fa; }

/* ---------- surf controller ---------- */
.surf-body { background: var(--bg); }
.surf-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  background: linear-gradient(180deg, rgba(28, 46, 72, .94), rgba(13, 24, 40, .94));
  border-bottom: 1px solid rgba(140, 180, 220, .5);
  box-shadow: 0 2px 14px rgba(0, 10, 25, .5);
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px; z-index: 100;
}
.surf-bar .brand { font-size: 17px; }
.surf-timer {
  font-size: 21px; font-weight: 600; min-width: 52px; text-align: center;
  color: #fff; text-shadow: 0 0 10px rgba(120, 200, 255, .9);
}
.surf-progress { flex: none; width: 220px; height: 9px; background: rgba(255, 255, 255, .25); border: 1px solid rgba(170, 205, 240, .5); border-radius: 5px; overflow: hidden; }
.ad-slot { flex: none; width: 234px; height: 60px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .85); }
.ad-slot img { display: block; height: 60px; width: auto; max-width: 100%; }
#timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, #79c0ff, #00e0a8); transition: width 1s linear; }
.surf-site { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cfe4fa; }
.surf-credits b { color: #a8f0b8; white-space: nowrap; }
#surf-msg { color: #a8f0b8; opacity: 0; transition: opacity .3s; white-space: nowrap; font-weight: 600; }
#surf-msg.show { opacity: 1; }
#surf-msg.warn { color: #ffd28a; }
.surf-start { max-width: 540px; margin: 0 auto; padding-top: 105px; text-align: center; }
.surf-start .card h3 { margin-top: 4px; }
