/* ===========================
   Base Reset
=========================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===========================
   Variables
=========================== */
:root {
  --bg1: #0b1424;
  --bg2: #162846;
  --bg3: #2a4b7c;
  --bg4: #3b5fa6;

  --panelTop: #2f5ca8;
  --panelBot: #0f2d5b;

  --line: rgba(255,255,255,.20);
  --text: #f4f7fb;
  --muted: #eaf2ff;
  --accent: #7fb2ff;

  --btn1: #003366;
  --btn2: #0055aa;
}

/* ===========================
   Center Column Stack (Prod Parity)
=========================== */
.center-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===========================
   Layout
=========================== */
body {
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: radial-gradient(
    circle at 50% 50%,
    #4c7edc 0%,
    var(--bg4) 20%,
    var(--bg3) 45%,
    var(--bg2) 75%,
    var(--bg1) 100%
  ) fixed;
  display: flex;
  flex-direction: column;
}

.grid {
  width: 100%;
  max-width: 1300px;
  margin: 18px auto;
  padding: 0 16px 28px;
  display: grid;
  grid-template-columns: 1fr minmax(340px,560px) 1fr;
  gap: 18px;
}

/*Critical fix: allow grid columns to shrink */
.grid > aside,
.grid > section {
  min-width: 0;
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
}

/* ===========================
   Header
=========================== */
header.flag {
  width: 100%;
  text-align: center;
  padding: clamp(40px,8vw,72px) 20px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: url("/assets/us_flag.jpg") center/cover no-repeat;
}

header.flag h1 {
  font-style: italic;
  font-weight: 1000;
  font-size: clamp(56px,8vw,120px);
  letter-spacing: .06em;
  text-shadow: 0 3px 8px rgba(0,0,0,.7);
}

header.flag p {
  margin-top: 16px;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(20px,3.5vw,32px);
  color: #D6E4F0; /* light steel blue for contrast on navy */
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}

/* ===========================
   Main Navigation
=========================== */
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;

  background: rgba(10,25,55,.8);
  padding: 10px 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.main-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.main-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.accu-logo {
  height: 20px;
  width: auto;
}

/* ===========================
   Column Vertical Rhythm
=========================== */
.grid > aside,
.grid > section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===========================
   Panels
=========================== */
.panel {
  background: linear-gradient(180deg,var(--panelTop),var(--panelBot));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);

  display: flex;
  flex-direction: column;

  min-height: 420px;
  max-height: 420px;

  min-width: 0;   /* ðŸ”¥ Prevent horizontal overflow */
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(255,255,255,.18);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* === Force All Feed Images To Behave === */
.panel .scrollbox img {
  max-width: 72px;
  max-height: 72px;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.scrollbox {
  flex: 1 1 auto;
  overflow-y: auto;

  height: 0;              /* 🔥 THIS is the key */
  max-height: 358px;

  min-width: 0;
}

#af-scroll .list li {
  min-height: 85px;
}

.item-content {
  display: flex;
  flex-direction: column;
}

.time {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

/* ===========================
   Clock Panel
=========================== */
.panel.clock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  height: 100%;
  padding: 16px;
}

/* Time */
.time-display {
  font-size: clamp(80px, 7vw, 90px);
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0.04em;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  text-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

/* Date */
.date-display {
  margin-top: 12px;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 600;
  color: var(--muted);
}

/* Zulu / Local */
.time-extra {
  margin-top: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zulu-time,
.local-time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Holidays */
.holiday-heading {
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 800;
  margin-top: 14px;
  display: inline-block;
}

.holiday-heading::after {
  content: ":";
  margin-left: 3px;
}

#holiday-list {
  list-style: none;
  padding: 0;
  margin-top: 6px;
}

#holiday-list li {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* ===========================
   Weather Panel Clean Layout
=========================== */

#weather {
  display: flex;
  flex-direction: column;
  gap: 8px; /* slightly more breathing room */
}

/* Current Conditions */
.weather-now {
  display: flex;
  align-items: center;
  gap: 10px; /* slightly more spacing */
}

.weather-temp {
  font-size: 1.65rem; /* slightly larger */
  font-weight: 900;
  line-height: 1;
}

.weather-desc {
  font-size: 1rem; /* slightly larger */
  opacity: 0.9;
}

/* Forecast */
.weather-forecast {
  list-style: none;
  padding: 0;
  margin: 6px 0; /* more spacing */
}

.weather-forecast li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  font-size: 0.95rem; /* slightly larger */
  padding: 4px 0;
}

/* Icons */
.weather-forecast img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Updated line */
#w-updated {
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.8;
  margin-top: 8px;
}

/* ===========================
   Header Layout Lock
=========================== */

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.panel-title #w-loc {
  width: 135px;
  flex: 0 0 135px;
}

.panel-title #w-free {
  width: 60px;
  flex: 0 0 60px;
  text-align: center;
}

.panel-title #w-go {
  flex: 0 0 auto;
}

.weather-location-inline {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* ===========================
   Lists
=========================== */
.list { list-style: none; }

.list li {
  margin: 8px 0;
  line-height: 1.35;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.list a,
.list a:visited {
  color: var(--text);
  text-decoration: none;
}

.list a:hover {
  text-decoration: underline;
}

/* Force feed panel links to stay white */
.panel .list a,
.panel .list a:visited {
  color: var(--text);
}

/* ===========================
   Forum Link Button
=========================== */
.forum-link {
  margin-top: 18px;
  text-align: center;
}

.forum-link a {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;

  background: linear-gradient(135deg, var(--btn1), var(--btn2));
  color: #fff;
  text-decoration: none;

  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);

  transition: background .25s ease, transform .2s ease;
}

.forum-link a:hover {
  background: linear-gradient(135deg, #0055aa, #0077dd);
  transform: translateY(-2px);
}

/* ========================================
   LATEST HEADLINES PANEL — FINAL SPEC
======================================== */

/* Span full grid width */
.latest-headlines-panel {
  grid-column: 1 / -1;
}

/* Exact 50% of standard panel height (420px / 2) */
.latest-headlines-panel.panel {
  min-height: 210px;
  max-height: 210px;
}

/* Scrollbox now fills full panel (no inner height restriction) */
.latest-headlines-panel .scrollbox {
  height: 100%;
  max-height: none;
  overflow: hidden;
}

/* Larger images than standard feed panels */
.latest-headlines-panel .scrollbox img {
  width: 110px;
  height: 110px;
  max-width: 110px;
  max-height: 110px;
  object-fit: cover;
}

/* Ensure grid div items shrink properly */
.grid > div {
  min-width: 0;
}

/* ===========================
   Footer
=========================== */
footer {
  margin: 8px 0 16px;
  font-size: .9rem;
  color: #ccc;
  text-align: center;
}

/* ========================================
   RETIREMENT PAGE - UNIFORM PANEL WIDTH
======================================== */

.retirement-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.retirement-page .page-header {
  width: 1200px;
  max-width: 95%;
  margin: 25px 0 10px;
  box-sizing: border-box;
}

.retirement-page .panel {
  width: 1200px;
  max-width: 95%;
  margin: 25px 0;
  padding: 20px;
  box-sizing: border-box;
}

/* ===== Magic Layout ===== */

.magic-center {
  display: flex;
  justify-content: center;
  margin: 120px 0 80px;
}

/* ===== Magic Orb ===== */

.magic-orb {
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #243e66 0%, #0a1626 75%);
  box-shadow:
    0 0 50px rgba(30, 80, 160, 0.25),
    0 50px 120px rgba(0,0,0,0.7),
    inset 0 12px 50px rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px;
}

.magic-content {
  width: 100%;
}

.magic-content h1 {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.magic-answer {
  font-weight: 700;
  font-size: 1rem;
  margin: 20px 0;
  min-height: 40px;
}

.magic-form {
  margin-top: 10px;
}

.magic-form input {
  width: 100%;
  margin-bottom: 10px;
}

.magic-actions {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Magic Orb Content Scaling ===== */

.magic-content h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.magic-answer {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 30px 0;
  min-height: 60px;
}

.magic-form input {
  width: 100%;
  font-size: 1.1rem;
  padding: 12px 14px;
  border-radius: 8px;
}

.magic-form .btn {
  font-size: 1.05rem;
  padding: 10px 18px;
}

.magic-actions .btn {
  font-size: 0.95rem;
  padding: 8px 14px;
}

/* ===========================
   728x90 Banner Ads
=========================== */

.grid-ad{
  grid-column: 1 / -1;      /* span entire grid width */
  display: flex;
  justify-content: center;  /* center the ad horizontally */
  margin: 10px 0 18px;
}

.banner-ad{
  width: 728px;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== Leaderboard Ad (Fixed 728x90) ===== */

.magic-ad {
  margin: 80px auto 100px;
  text-align: center;
}

.banner-ad ins.adsbygoogle{
  display:inline-block;
  width:728px;
  height:90px;
}

/* ===== Magic SEO Section ===== */

.magic-seo {
  max-width: 760px;
  margin: 80px auto;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ========================================
   FLIGHT TRACKER PANEL
======================================== */

.flight-panel{
  min-height:120px;
  overflow:visible;
}

/* ========================================
   FLIGHT MAP SIZE
======================================== */

.map-container{
  width:100%;
  max-width:1100px;
  margin:20px auto;
  aspect-ratio:1/1;
  border-radius:10px;
  overflow:hidden;
}

.map-container iframe{
  width:100%;
  height:100%;
  border:0;
}

/* ========================================
   DOMAIN SCANNER TOOL (SAFE ADDITION)
   ======================================== */

.domain-scan-container {
  margin-top: 10px;
}

.domain-scan-input {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.25);
  color: var(--text);
}

.domain-scan-button {
  padding: 8px 14px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg,var(--btn1),var(--btn2));
  color: #fff;
}

.domain-scan-results {
  margin-top: 10px;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

/* ========================================
   TECHNO TOOL OUTPUT CONSTRAINT FIX
======================================== */

.techno-output{
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: auto;
  max-width: 100%;
}

.tool-desc::before{
content:"About this tool:";
display:block;
font-weight:700;
margin-bottom:6px;
color:#8fd3ff;
}

.tool-desc{
margin-top:12px;
font-size:16px;
line-height:1.6;
color:#ffffff;
font-weight:bold;
}

/* ===========================
   ADMIN PANEL - LARGE SQUARE
=========================== */

.admin-panel {
  grid-column: 1 / -1;       /* break out of center column */

  width: 100%;
  max-width: 900px;          /* controls size of square */

  aspect-ratio: 1 / 1;       /* 🔥 makes it a square */

  margin: 60px auto;         /* center in gradient */

  min-height: unset;
  max-height: unset;

  padding: 20px;
}

/* Allow content to scroll inside square */
.admin-panel .scrollbox {
  max-height: none;
}

/* Remove panel height restrictions inside admin */
.admin-panel .panel {
  min-height: auto;
  max-height: none;
}

/* ===========================
   ADMIN FULL LAYOUT FIX
=========================== */

.admin-full {
  grid-column: 1 / -1;         /* span entire grid */

  display: flex;
  justify-content: center;     /* center horizontally */
  align-items: center;         /* center vertically */

  margin-top: 60px;
}

/* Square panel */
.admin-panel {
  width: 900px;
  height: 900px;

  max-width: 90vw;
  max-height: 90vw;

  margin: auto;

  min-height: unset;
  max-height: unset;
}

/* ===========================
   ADMIN SECTIONS (NO NESTED PANELS)
=========================== */

.admin-section {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.15);
}

/* LOG BOX */
.logs {
  margin-top: 10px;
  height: 300px;
  overflow-y: auto;
  background: rgba(0,0,0,.25);
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: pre-wrap;
}
