/* MASTER THEME SYSTEM CONTINUITY */
:root {
  --bg-color: #101726;
  --bg-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  --bg-size: 24px 24px;
  
  --primary: #0062b0;      
  --accent: #e05300;       
  --success: #16a34a;
  
  --card-bg: #161f32;
  --text-main: #cbd5e1;
  --text-title: #ffffff;
  --text-italic: #64748b;
  
  --nav-bg: #101726;
  --border-color: rgba(255, 255, 255, 0.05);
  --input-bg: #0f172a;
  --input-border: rgba(255, 255, 255, 0.1);
  --nav-link: #94a3b8;

  --card-shadow: none;
  --card-border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  --bg-color: #f4f9fd;
  --bg-image: linear-gradient(180deg, #e3f2fd 0%, #f4f9fd 100%);
  --bg-size: auto;
  
  --primary: #0062b0;      
  --accent: #e05300;       
  --success: #2e7d32;
  
  --card-bg: #ffffff;
  --text-main: #526b82;   
  --text-title: #1e354a;  
  --text-italic: #617d98;
  
  --nav-bg: #ffffff;
  --border-color: rgba(0, 98, 176, 0.15);
  --input-bg: #f4f7fa;
  --input-border: rgba(0, 98, 176, 0.15);
  --nav-link: #526b82;

  --card-shadow: 0 12px 32px rgba(30, 53, 74, 0.05);
  --card-border: 1px solid rgba(0, 0, 0, 0.05);
}

/* GLOBAL RESETS */
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  
  background-color: var(--bg-color); 
  transition: background-color 0.3s ease, color 0.3s ease;
}

* {
  max-width: 100%;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  color: var(--text-main);
  background: var(--bg-image);
  background-size: var(--bg-size);
}

/* PREMIUM FLOATING NAVIGATION BAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 10px 24px;
  margin: 0px auto 0 auto;
  width: 92%;
  max-width: 1200px;
  box-shadow: var(--card-shadow); 
  position: sticky;
  top: 10px;
  z-index: 2000;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* LIGHT & DARK NAVBAR OVERRIDES */
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 98, 176, 0.15); 
  box-shadow: 0 8px 32px rgba(30, 53, 74, 0.05);
}

[data-theme="dark"] .navbar {
  background: rgba(16, 23, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.brand .title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--primary);
}

[data-theme="dark"] .brand .title { color: var(--text-title); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navlinks {
  display: flex;
  gap: 20px;
}

.navlinks a {
  text-decoration: none;
  color: var(--nav-link);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
}
.navlinks a.active { color: var(--primary); font-weight: 600; }
[data-theme="dark"] .navlinks a.active { color: var(--text-title); }
.navlinks a:hover { color: var(--primary); }
[data-theme="dark"] .navlinks a:hover { color: var(--text-title); }

/* THEME ICON SHOW/HIDE SYSTEM VIA CSS */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn svg {
  width: 20px; 
  height: 20px;
  transition: transform 0.3s ease;
}

.theme-toggle-btn .custom-light-icon { display: none; }
.theme-toggle-btn .custom-dark-icon { display: block; }

[data-theme="light"] .theme-toggle-btn .custom-dark-icon { display: none; }
[data-theme="light"] .theme-toggle-btn .custom-light-icon { display: block; }

/* VIEWPORT HOUSING FRAMEWORKS */
.viewport-container {
  margin-top: 40px; 
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.card {
  width: 100%;
  max-width: 550px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  padding: 36px 28px;
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

h2 {
  color: var(--text-title);
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.sub-desc {
  color: var(--nav-link);
  font-size: 13.5px;
  margin: 0 0 28px 0;
}

/* FIELD STACK STRUCTURES */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-title);
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-title);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

input:focus {
  border-color: var(--primary);
}

input.input-error {
  border-color: #ef4444;
}

/* GLOBAL IMPLEMENTATION TARGET BUTTONS */
.btn-action {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.2s, transform 0.1s;
}

#fetchBtn {
  background: var(--primary);
  color: #fff;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0, 98, 176, 0.2);
}
#fetchBtn:hover { background: #005294; }
#fetchBtn:active { transform: scale(0.99); }
#fetchBtn:disabled { background: var(--input-border); color: var(--nav-link); cursor: not-allowed; box-shadow: none; }

/* DROP-DOWN EXTENSION SYSTEM */
.guide-dropdown {
  margin-top: 32px;
  text-align: left;
  border-top: 1px dashed var(--input-border);
  padding-top: 24px;
}

.guide-dropdown details {
  width: 100%;
  outline: none;
}

.guide-dropdown summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #ef4444; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.guide-dropdown summary::-webkit-details-marker {
  display: none;
}

.guide-dropdown summary::after {
  content: "▼";
  font-size: 12px;
  color: var(--nav-link);
  transition: transform 0.2s ease;
}

.guide-dropdown details[open] summary::after {
  transform: rotate(-180deg);
}

.guide-panel-content {
  margin-top: 20px;
  animation: expandFade 0.25s ease-out;
}

@keyframes expandFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.device-box {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.device-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-title);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-list {
  padding-left: 18px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.guide-list li {
  margin-bottom: 6px;
}

.image-frame {
  background: #ffffff;
  padding: 8px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  margin-top: 12px;
  text-align: center;
}

.image-frame img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.image-caption {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  font-style: italic;
  text-align: center;
}

.pro-tip {
  background: rgba(224, 83, 0, 0.08);
  border-left: 4px solid var(--accent);
  padding: 12px;
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-main);
}

/* DYNAMIC DATA RESULT GRID AREA */
.result-area {
  margin-top: 28px;
  display: none;
  text-align: left;
}

.result-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.voucher-item {
  background: var(--input-bg);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v-img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.dl-btn {
  width: 100%;
  padding: 10px;
  background: var(--success);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: opacity 0.2s, transform 0.1s;
}
.dl-btn:hover { opacity: 0.9; }
.dl-btn:active { transform: scale(0.97); }

/* SERVER RESPONSIVE DECORATIVE INTERFACES */
.error-msg {
  color: #ef4444;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
  text-align: center;
  display: none;
}

.inline-loader {
  margin-top: 18px;
  display: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

.back-home-link {
  margin-top: 28px;
  display: block;
  text-align: center;
}
.back-home-link a {
  color: var(--nav-link);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s;
}
.back-home-link a:hover { color: var(--primary); }

/* LOADER COMPONENT FRAMEWORKS */
#globalLoader {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: background-color 0.3s;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--card-bg);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE MEDIA QUERIES & VIEWPORTS */
@media (max-width: 768px) {
  .navbar {
    width: 92%;
    max-width: 480px;
    margin: 10px auto; 
    border-radius: 28px; 
    padding: 12px 16px;
    position: sticky;
    top: 10px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    position: relative;
  }

  /* PERFECT CIRCLE THEME TOGGLE FOR MOBILE 🔵 */
  .theme-toggle-btn {
    position: absolute;
    right: 30px; 
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    padding: 0; 
    border-radius: 50% !important; 
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
  }
  
  .theme-toggle-btn:active {
    transform: translateY(-50%) scale(0.92); /* Bouncy press animation */
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }

  .navlinks {
    width: 100%;
    justify-content: center;
    gap: 24px;
  }

  .viewport-container {
    margin-top: 20px;
    padding: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

:root {
  --footer-bg: #161f32; /* Matches your --card-bg for seamless entry */
  --footer-text-muted: #64748b;
  --footer-giant: rgba(255, 255, 255, 0.03);
}
[data-theme="light"] {
  --footer-bg: #0062b0; /* Vibrant primary wash for light mode visibility */
  --footer-text-muted: #e3f2fd;
  --footer-giant: rgba(255, 255, 255, 0.08);
}
/* --- CORE FOOTER LAYOUT ENGINE --- */
.site-footer {
  width: 100%;
  background: transparent;
  margin-top: 80px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.footer-wave-container {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.footer-wave-container svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.footer-inner {
  background-color: var(--footer-bg);
  padding: 40px 40px 20px 40px;
  transition: background-color 0.3s ease;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px 0;
  letter-spacing: -0.3px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--nav-link);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
[data-theme="light"] .footer-links a { color: #f4f9fd; }
.footer-links a:hover { color: var(--accent); }

/* CENTER COLUMN CTA */
.footer-cta-center {
  align-items: center;
  text-align: center;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-main);
  margin: 0 0 20px 0;
  max-width: 280px;
}
[data-theme="light"] .footer-desc { color: #e3f2fd; }

.footer-btn {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  padding: 12px 32px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s;
}
.footer-btn:hover { background: #ff6307; transform: translateY(-2px); }
.footer-btn:active { transform: translateY(0); }

/* RIGHT COLUMN STATS & LIVE CHANNELS */
.footer-right {
  align-items: flex-end;
  text-align: right;
}

.footer-socials {
  display: flex !important;
  gap: 14px !important;
  margin-bottom: 16px;
  align-items: center !important;
}

/* Strict bounding dimensions for the icon anchor footprint */
.footer-icon-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.footer-icon-link:hover { transform: scale(1.15); }

/* Hard-lock on actual image sizes to bypass global theme overrides */
.footer-icon-link img.footer-icon {
  width: 100% !important;
  height: 100% !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  display: block !important;
}


[data-theme="light"] .footer-email-link { color: #e3f2fd; }
.footer-email-link:hover { color: var(--accent); text-decoration: underline; }

.footer-copy {
  font-size: 12px;
  color: var(--footer-text-muted);
  margin: 0;
  line-height: 1.4;
}

.footer-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 10px;
}

.footer-attribution {
  font-size: 9px;
  color: var(--footer-text-muted);
  margin-top: 8px;
  opacity: 0.5;
}
.footer-attribution a { color: inherit; text-decoration: underline; }

/* GIANT TYPOGRAPHY BACKGROUND MARK */
.footer-giant-brand {
  font-size: 8vw;
  font-weight: 900;
  text-align: center;
  color: var(--footer-giant);
  letter-spacing: -2px;
  user-select: none;
  pointer-events: none;
  line-height: 1;
  margin-top: 20px;
  text-transform: uppercase;
}

/* --- MOBILE STACK BREAKPOINT COMPLIANCE --- */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
    align-items: center;
    padding-bottom: 32px;
  }
  .footer-col {
    align-items: center;
    text-align: center;
  }
  .footer-right {
    align-items: center;
    text-align: center;
  }
  .footer-socials {
    justify-content: center !important;
    margin-bottom: 12px;
  }
  .footer-icon-link {
    width: 36px !important;
    height: 36px !important;
  }
  .footer-icon-link img.footer-icon {
    max-width: 36px !important;
    max-height: 36px !important;
  }
  .footer-giant-brand {
    font-size: 25vw;
    margin-top: 24px;
  }}