/* =====================================================
   🧼 Base Reset & Typography
===================================================== */
body {
  font-family: 'Courier New', monospace;
  background-color: #0a0a0a;
  color: #eee;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =====================================================
   🔗 Global Links
===================================================== */
a {
  color: #0ff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed #0ff;
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

a:hover {
  color: #f0f;
  border-bottom: 1px solid #f0f;
}

/* =====================================================
   🧭 Header & Navigation
===================================================== */
header, footer {
  background-color: #1a1a1a;
  padding: 1.5em;
  text-align: center;
  border-bottom: 1px solid #333;
}

header h1 {
  margin: 0;
  font-size: 1.8em;
  color: #0ff;
  letter-spacing: 1px;
}

nav {
  margin-top: 0.5em;
}

nav a {
  margin: 0 1em;
  color: #0ff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #0ff;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

/* =====================================================
   🔼 Uplink Highlight
===================================================== */
.uplink {
  color: #f0f;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =====================================================
   🧱 Layout & Containers
===================================================== */
.container {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  background-color: #1a1a1a;
  padding: 2em 1em;
  color: #0ff;
  border-right: 1px solid #333;
}

.sidebar a {
  display: block;
  margin: 0.75em 0;
  color: #0ff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.sidebar a:hover {
  color: #f0f;
}

main {
  padding: 2em;
  background-color: #111;
  animation: fadeIn 0.5s ease;
}

/* =====================================================
   🦶 Footer
===================================================== */
footer {
  border-top: 1px solid #333;
  font-size: 0.9em;
  color: #888;
}

footer a {
  color: #888;
  text-decoration: none;
  border-bottom: 1px dotted #555;
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

footer a:hover {
  color: #ccc;
  border-bottom: 1px solid #ccc;
}

/* =====================================================
   🎞️ Animations
===================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes barrelPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideAway {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

/* =====================================================
   📱 Responsive Adjustments
===================================================== */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid #333;
  }

  .banner-active footer {
    margin-bottom: 120px;
  }
}

/* =====================================================
   🎨 Theme Classes
===================================================== */

/* Default Dark Theme */
body.theme-dark {
  background-color: #0a0a0a;
  color: #eee;
}

/* Light Theme */
body.theme-light {
  background-color: #fff;
  color: #000;
}

body.theme-light a {
  color: #00f;
  border-bottom: 1px dashed #00f;
}

body.theme-light a:hover {
  color: #f00;
  border-bottom: 1px solid #f00;
}

body.theme-light header,
body.theme-light footer,
body.theme-light .sidebar {
  background-color: #f0f0f0;
  color: #000;
  border-color: #ccc;
}

body.theme-light main {
  background-color: #fff;
}

body.theme-light footer a {
  color: #555;
  border-bottom: 1px dotted #aaa;
}

body.theme-light footer a:hover {
  color: #000;
  border-bottom: 1px solid #000;
}

/* Rejection Theme (JammieDodger) */
body.theme-reject {
  background-color: #ffe4e1;
  color: #800000;
  filter: saturate(120%) contrast(110%);
}

/* Minimal Dark Theme (Bourbon) */
body.theme-bourbon {
  background-color: #1f1f1f;
  color: #ccc;
}

/* =====================================================
   🍪 GDPR Banner & Biscuit Barrel
===================================================== */
.biscuit-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff8dc;
  color: #000;
  padding: 16px;
  border-top: 2px solid #a0522d;
  font-family: sans-serif;
  z-index: 10000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.biscuit-banner.dismissed {
  animation: slideAway 0.4s ease forwards;
}

.banner-active main {
  padding-bottom: 100px;
}

.banner-active footer {
  margin-bottom: 70px;
  transition: margin-bottom 0.3s ease;
}

/* GDPR Buttons */
#accept-light {
  background: #f5deb3;
  color: #000;
}

#accept-dark {
  background: #3a2a2a;
  color: #fff;
}

#accept-minimal-light {
  background: #fdfdfd;
  color: #333;
}

#accept-minimal-dark {
  background: #1f1f1f;
  color: #ccc;
}

#reject-biscuits {
  background: #ffe4e1;
  color: #800000;
}

#accept-light,
#accept-dark,
#accept-minimal-light,
#accept-minimal-dark,
#reject-biscuits {
  padding: 6px 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

#show-barrel-btn {
  background-color: #fff8dc;
  color: #a0522d;
  border: 2px solid #a0522d;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: bold;
}

.reconsider-link {
  color: #800000;
  text-decoration: underline;
  margin-left: 10px;
}

/* =====================================================
   🍪 Biscuit Table — Theme-Aware Styling
===================================================== */

#biscuit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: monospace;
  font-size: 0.95em;
  background-color: transparent;
  color: inherit;
}

/* Default (inherits from body) */
#biscuit-table th,
#biscuit-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #444;
}

#biscuit-table thead {
  background-color: #1a1a1a;
  color: #0ff;
}

#biscuit-table tbody tr:hover {
  background-color: rgba(160, 82, 45, 0.1);
}

#biscuit-table td.status {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 🌙 Dark Theme */
body.theme-dark #biscuit-table thead {
  background-color: #2a2a2a;
  color: #eee;
}

body.theme-dark #biscuit-table th,
body.theme-dark #biscuit-table td {
  border-bottom: 1px solid #555;
}

body.theme-dark #biscuit-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* ☀️ Light Theme */
body.theme-light #biscuit-table thead {
  background-color: #f0f0f0;
  color: #000;
}

body.theme-light #biscuit-table th,
body.theme-light #biscuit-table td {
  border-bottom: 1px solid #ccc;
}

body.theme-light #biscuit-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* 🚫 Rejection Theme */
body.theme-reject #biscuit-table thead {
  background-color: #800000;
  color: #fff0f0;
}

body.theme-reject #biscuit-table th,
body.theme-reject #biscuit-table td {
  border-bottom: 1px solid #a00;
}

body.theme-reject #biscuit-table tbody tr:hover {
  background-color: rgba(128, 0, 0, 0.1);
}

/* =====================================================
   🔐 Tokkie Schema Table
===================================================== */

.tokkie-schema {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-family: monospace;
  font-size: 0.95em;
  background-color: transparent;
  color: inherit;
}

.tokkie-schema thead {
  background-color: #222;
  color: #0ff;
}

body.theme-light .tokkie-schema thead {
  background-color: #e0e0e0;
  color: #000;
}

body.theme-reject .tokkie-schema thead {
  background-color: #800000;
  color: #fff0f0;
}

.tokkie-schema th,
.tokkie-schema td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #444;
}

body.theme-light .tokkie-schema th,
body.theme-light .tokkie-schema td {
  border-bottom: 1px solid #ccc;
}

body.theme-reject .tokkie-schema th,
body.theme-reject .tokkie-schema td {
  border-bottom: 1px solid #a00;
}

.tokkie-schema tbody tr:hover {
  background-color: rgba(160, 82, 45, 0.1);
}

body.theme-light .tokkie-schema tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

body.theme-reject .tokkie-schema tbody tr:hover {
  background-color: rgba(128, 0, 0, 0.1);
}