:root {
  --bg-color: #0f172a;
  --container-bg: rgba(30, 41, 59, 0.75);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --row-hover: rgba(255,255,255,0.05);
  --border-color: rgba(255,255,255,0.1);
}
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a, #020617);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  z-index: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/fancy/texture.png") repeat;
background-size: cover;
background-position: center;
  opacity: 0.02;
  pointer-events: none;
  z-index: -1;
}

body.light {
  background: linear-gradient(135deg, #e2e8f0, #f8fafc, #e2e8f0);
  --container-bg: rgba(255,255,255,0.95);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #2563eb;
  --row-hover: rgba(0,0,0,0.04);
  --border-color: rgba(0,0,0,0.08);
}

body.light::before {
  opacity: 0.15;
}



.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px;
  background: var(--container-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 14px 25px -12px rgba(0,0,0,0.5);
}

/* ================= HEADER ================= */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.search-input {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
}

.search-input::placeholder {
  color: var(--text-muted);
}
/* ================= TOGGLE ================= */
input {
  display: none;
}

label {
  width: 70px;
  height: 34px;
  background: #222;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
  transition: background 0.3s ease;
}

label i {
  font-size: 16px;
  transition: 0.3s ease;
}

.fa-sun {
  color: gold;
}

.fa-moon {
  color: #222;
  opacity: 0;
}

.ball {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: 0.3s ease;
}

/* CHECKED STATE */
input:checked + label {
  background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
}

input:checked + label .ball {
  transform: translateX(41px);
  background: #222;
}

input:checked + label .fa-sun {
  opacity: 0;
  transform: rotate(160deg);
}

input:checked + label .fa-moon {
  opacity: 1;
}


/* ================= TABLE ================= */
table {
  width: 100%;
  border-collapse: collapse;
}
table a {
  color: #38bdf8;
  font-weight: 500;
}

table a:hover {
  color: #7dd3fc;
  text-decoration: underline;
  
}

th {
  padding: 12px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
}

tr:hover td {
  background: var(--row-hover);
}

/* ================= BREADCRUMB ================= */
.breadcrumb {
  font-size: 14px;
  margin-bottom: 15px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.badge {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
}
table a {
  color: var(--accent);
  font-weight: 500;
}

table a:hover {
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
}
.file-icon {
  margin-right: 8px;
  font-size: 16px;
}

.ext-iso { color: #f97316; }
.ext-exe, .ext-msi { color: #22c55e; }
.ext-deb { color: #ef4444; }
.ext-zip, .ext-7z, .ext-rar, .ext-z, .ext-tar { color: #38bdf8; }
/* ================= SPEEDTEST PANEL ================= */
.speedtest-panel {
  margin: 25px 0;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
}

.speedtest-header h2 {
  margin: 0;
  font-size: 18px;
}

.speedtest-header small {
  color: var(--text-muted);
}

.speedtest-actions {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-local {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.btn-public {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: white;
}

.btn:hover {
  opacity: 0.9;
}

.local-test {
  margin-top: 20px;
}

.local-test iframe {
  width: 100%;
  height: 600px;
  border: 0;
  border-radius: 14px;
}

.hidden {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;              /* DEFAULT HIDDEN */
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.show {
  display: flex;
}


.modal-box {
  background: var(--container-bg);
  padding: 25px;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}


/* ================= RESPONSIVE ================= */
@media (max-width: 640px) {
  .container {
    margin: 20px 12px;
    padding: 20px;
    border-radius: 16px;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    width: 100%;
    justify-content: space-between;
  }
}
