/* ============================================================
   PORTAL — cyberpunk 2077 style
   Structure preserved: all original class names & IDs intact
   so weather.js and the data-link handler keep working.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Share+Tech+Mono&display=swap");

:root {
  --bg: #05060a;
  --panel: #0d0f14;
  --panel-2: #14171f;
  --ink: #e6faff;
  --ink-dim: #5a6b78;
  --yellow: #fcee0a; /* 2077 signature */
  --cyan: #00f0ff;
  --magenta: #ff003c;
  --line: #1c222c;
  --line-hot: #223b44;
}

html {
  overflow-y: scroll;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  /* ambient corner glows instead of a busy grid */
  background-image:
    radial-gradient(
      600px circle at 12% -5%,
      rgba(0, 240, 255, 0.1),
      transparent 55%
    ),
    radial-gradient(
      700px circle at 100% 8%,
      rgba(252, 238, 10, 0.07),
      transparent 55%
    ),
    radial-gradient(
      500px circle at 50% 120%,
      rgba(255, 0, 60, 0.08),
      transparent 60%
    );
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
}

.complete_container {
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  margin-bottom: 20px;
  padding-top: 24px;
}

/* --- masthead: clipped yellow ID bar --- */
.complete_container::before {
  content: "PORTAL // NIGHT CITY NET";
  display: block;
  color: var(--bg);
  background: var(--yellow);
  font-family: "Share Tech Mono", monospace;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 9px 16px;
  margin-bottom: 18px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 12px));
}

.complete_container .complete_container_top {
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin-top: 0;
  gap: 12px;
}

/* ============================= WEATHER ============================= */
.complete_container .complete_container_top .weather {
  border-radius: 0;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-hot);
  border-left: 3px solid var(--cyan);
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  padding: 22px;
  color: var(--ink);
  position: relative;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 18px),
    calc(100% - 18px) 100%,
    0 100%
  );
  box-shadow:
    0 0 24px rgba(0, 240, 255, 0.08),
    inset 0 0 40px rgba(0, 240, 255, 0.03);
}

/* scanline overlay — CRT feel, very subtle */
.complete_container .complete_container_top .weather::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 240, 255, 0.03) 0px,
    rgba(0, 240, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.complete_container .complete_container_top .weather .weather_location {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 20px 5px 0;
  position: relative;
  z-index: 1;
}
.complete_container
  .complete_container_top
  .weather
  .weather_location
  .location_inner {
  display: flex;
  align-items: center;
}
.complete_container
  .complete_container_top
  .weather
  .weather_location
  .location_inner
  h3 {
  margin: 0;
  margin-left: 10px;
  padding: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.complete_container
  .complete_container_top
  .weather
  .weather_location
  .location_inner
  img {
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(72%) sepia(93%) saturate(1352%)
    hue-rotate(140deg) brightness(101%) contrast(101%);
}
.complete_container .complete_container_top .weather .weather_location h1 {
  margin: 0;
  padding: 4px 0;
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(252, 238, 10, 0.35);
}
.complete_container .complete_container_top .weather .weather_location h4 {
  margin: 0;
  padding: 2px 0 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--magenta);
}
.complete_container .complete_container_top .weather .weather_icon {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}
.complete_container .complete_container_top .weather .weather_icon img {
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

/* --------------------------- forecast --------------------------- */
.complete_container .complete_container_top .weather_forecast {
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  max-height: 100px;
  transition: max-height 0.5s ease;
}
.complete_container .complete_container_top .weather_forecast.show-all {
  max-height: 1000px;
}
.complete_container .complete_container_top .weather_forecast .forecast_item {
  display: none;
  position: relative;
  justify-content: space-between;
  text-align: left;
  align-items: center;
  color: var(--ink);
  background-color: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 40px;
  margin: 6px 0;
  border-radius: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 8px));
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}
.complete_container
  .complete_container_top
  .weather_forecast
  .forecast_item:first-child {
  display: flex;
  cursor: pointer;
  border-color: var(--line-hot);
  border-left: 3px solid var(--yellow);
}
.complete_container
  .complete_container_top
  .weather_forecast
  .forecast_item:first-child:hover {
  background-color: var(--panel-2);
  border-color: var(--cyan);
}
.complete_container
  .complete_container_top
  .weather_forecast.show-all
  .forecast_item {
  display: flex;
}
.complete_container
  .complete_container_top
  .weather_forecast
  .forecast_item
  span {
  width: 160px;
  align-items: center;
}
.complete_container
  .complete_container_top
  .weather_forecast
  .forecast_item
  img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.35));
}
.complete_container
  .complete_container_top
  .weather_forecast
  .forecast_item
  .toggle_indicator {
  position: absolute;
  right: 40px;
  text-align: right;
  font-weight: 700;
  color: var(--yellow);
}

/* ========================= SHORTCUT GRID ========================= */
.complete_container .complete_container_middle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.complete_container .complete_container_middle [data-link] {
  cursor: pointer;
}
.complete_container .complete_container_middle .site_shortcut_container {
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  border-radius: 0;
  border: 1px solid var(--line-hot);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  color: var(--ink);
  text-align: center;
  position: relative;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    0 100%
  );
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}
/* cyan notch accent, top-left */
.complete_container
  .complete_container_middle
  .site_shortcut_container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 3px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease,
    width 0.12s ease;
}
.complete_container
  .complete_container_middle
  .site_shortcut_container
  .site_shortcut_image {
  width: 50px;
  height: auto;
}
.complete_container
  .complete_container_middle
  .site_shortcut_container
  .site_shortcut_image
  img {
  width: 50px;
  height: 50px;
  -o-object-fit: scale-down;
  object-fit: scale-down;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.25));
  transition: filter 0.12s ease;
}
.complete_container
  .complete_container_middle
  .site_shortcut_container
  .site_shortcut_title {
  font-size: 0.72rem;
}
.complete_container
  .complete_container_middle
  .site_shortcut_container
  .site_shortcut_title
  h2 {
  margin: 0;
  padding: 12px 0 0;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* hover: yellow edge takeover + lift + glow */
.complete_container .complete_container_middle .site_shortcut_container:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px var(--yellow),
    0 6px 24px rgba(252, 238, 10, 0.18),
    0 0 30px rgba(252, 238, 10, 0.12);
  z-index: 2;
}
.complete_container
  .complete_container_middle
  .site_shortcut_container:hover::before {
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow);
  width: 40px;
}
.complete_container
  .complete_container_middle
  .site_shortcut_container:hover
  .site_shortcut_image
  img {
  filter: drop-shadow(0 0 10px rgba(252, 238, 10, 0.5));
}
.complete_container
  .complete_container_middle
  .site_shortcut_container:hover
  .site_shortcut_title
  h2 {
  color: var(--yellow);
}

/* keyboard focus — accessibility floor */
.complete_container
  .complete_container_middle
  .site_shortcut_container:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -4px;
}

/* ====================== AUDIOBOOK / EXTRAS ====================== */
#last-played {
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 12px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-hot);
  border-left: 3px solid var(--magenta);
  border-radius: 0;
  display: none; /* still controlled by JS */
  flex-wrap: wrap;
  gap: 10px;
}

.last-played-title {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.04em;
}

#last-played button {
  background: transparent;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  border-radius: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 15px;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 6px));
  transition:
    background-color 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}
#last-played button:hover {
  background: var(--yellow);
  color: var(--bg);
  box-shadow: 0 0 18px rgba(252, 238, 10, 0.4);
}

.site_progress_container {
  width: 100%;
}

.site_progress_container h3 {
  color: var(--cyan);
  margin-top: 2rem;
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line-hot);
  padding-bottom: 8px;
}

#progress-items {
  width: 100%;
}

.site_progress_item {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  padding: 12px;
  margin-bottom: 8px;
  background: var(--panel);
}

.site_progress_item div img {
  width: 50px;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.3));
}

.item_title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.03em;
}

.item_title span {
  margin-right: 10px;
}

audio {
  width: 100%;
  margin-top: 8px;
}

#status {
  margin-bottom: 1.2rem;
  color: var(--ink-dim);
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* ============================ RESPONSIVE ============================ */
@media only screen and (max-width: 975px) {
  .complete_container {
    padding: 24px 20px 0;
  }
  #last-played {
    flex-direction: column;
    align-items: flex-start;
  }
  #last-played button {
    align-self: flex-start;
  }
  .complete_container .complete_container_top .weather .weather_location h1 {
    font-size: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ======================= WEATHER CHARTS ======================= */
#weather_charts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart_panel {
  position: relative;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-hot);
  border-left: 3px solid var(--yellow);
  padding: 16px 18px 10px;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    0 100%
  );
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.05);
}

.chart_label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.wx_chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.wx_axis {
  fill: var(--ink-dim);
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.wx_day {
  fill: var(--ink);
  font-weight: 700;
}
.wx_date {
  fill: var(--ink-dim);
  font-size: 10px;
}
.wx_val {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 13px;
}
.wx_hi {
  fill: var(--yellow);
}
.wx_lo {
  fill: var(--cyan);
}

@media only screen and (max-width: 640px) {
  .chart_label {
    font-size: 0.64rem;
    letter-spacing: 0.18em;
  }
  .wx_axis {
    font-size: 13px;
  }
}
