/* =====================================================
   RCAC Maintenance Page — Stylesheet
   Follows RCAC2024 theme design tokens
   ===================================================== */

/* --- Custom Properties (Light Mode) --- */
:root {
  --pu-gold: #b5904c;
  --pu-black: #1c1c1c;
  --pu-gray: #9d9795;

  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --border: rgba(0, 0, 0, 0.12);
  --text-primary: #000000;
  --link: #426b9e;
  --link-hover: #2d4f7a;

  --header-bg: #1c1c1c;
  --header-text: #ffffff;
  --footer-text: rgba(255, 255, 255, 0.7);
  --banner-subtext: rgba(28, 28, 28, 0.75);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --max-width: 860px;
}

/* --- Dark Mode Variable Overrides --- */
html[data-mode="dark"] {
  --bg: #1c1b21;
  --surface: #26262d;
  --surface-2: #2d2d32;
  --border: rgba(225, 231, 255, 0.12);
  --text-primary: #ffffff;
  --link: #7aacdf;
  --link-hover: #9ec3ea;
  --header-bg: #0f0e16;
  --text-primary: #ffffff;
  --banner-subtext: rgba(255, 255, 255, 0.75);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s, color 0.2s;
}

#site-header,
#site-footer,
.card,
#status-banner {
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:hover {
  color: var(--link-hover);
}

/* --- Header --- */
#site-header {
  background-color: var(--header-bg);
  border-bottom: 3px solid var(--pu-gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* --- Purdue Co-branding --- */
.purdue-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.navbar-logo .logo-link {
  display: flex;
  align-items: center;
}

.pu-logo {
  display: block;
  height: 33px;
  width: auto;
}

/* The maintenance page header is always dark — always show the white-text logo.
   logo-light (gray text) is for white backgrounds; not used here. */
.pu-logo.logo-light {
  display: none;
}

.department {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 1rem;
}

html[data-mode="dark"] .department {
  border-left-color: rgba(255, 255, 255, 0.2);
}

.dept-link {
  color: var(--header-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0.9;
}

.dept-link:hover {
  color: var(--pu-gold);
  opacity: 1;
}

.dept-link .tagline {
  display: block;
}

/* --- Dark Mode Toggle Button --- */
#site-mode-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  color: var(--header-text);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  display: flex;
  align-items: center;
  transition: border-color 0.2s, background-color 0.2s;
}

#site-mode-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.icon-sun,
.icon-moon {
  display: flex;
  align-items: center;
}

/* Light mode: show moon (to offer dark), hide sun */
html:not([data-mode="dark"]) #site-mode-toggle .icon-sun {
  display: none;
}

/* Dark mode: show sun (to offer light), hide moon */
html[data-mode="dark"] #site-mode-toggle .icon-moon {
  display: none;
}

/* --- Status Banner --- */
#status-banner {
  color: var(--text-primary);
  text-align: center;
  padding: 1rem 1.5rem;
}

.banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.banner-icon {
  color: var(--pu-gold);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

#banner-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.countdown {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--pu-gold);
  margin-bottom: 0.5rem;
  min-height: 2rem;
}

.countdown.state-complete {
  color: #5cb85c;
}

.downtime-window {
  font-size: 0.7rem;
  color: var(--banner-subtext);
}

.banner-message {
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Content Wrapper --- */
.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

/* --- Card --- */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pu-gold);
}

/* --- News Body --- */
#news-body p {
  margin-bottom: 1em;
}

#news-body ul,
#news-body ol {
  margin: 0.5em 0 1em 1.5em;
}

#news-body a {
  color: var(--link);
}

/* --- Contact List --- */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

.contact-list a {
  color: var(--link);
}

.follow-us-heading {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

/* --- Social Links --- */
.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface-2);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.social-links a:hover {
  background-color: var(--pu-gold);
  color: var(--pu-black);
}

/* --- Footer --- */
#site-footer {
  background-color: var(--header-bg);
  border-top: 3px solid var(--pu-gold);
  color: var(--footer-text);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* --- Game Launch Button --- */
#game-launch-bar {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

#game-launch-btn,
#tron-launch-btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--pu-gold);
  color: #1c1c1c;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

#game-launch-btn:hover,
#tron-launch-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

#game-launch-btn:active,
#tron-launch-btn:active {
  transform: translateY(0);
}

/* --- Game Back Bar --- */
#game-back-bar {
  background: #000;
  padding: 1rem;
  border-bottom: 1px solid rgba(207, 185, 145, 0.3);
  box-shadow: 0 2px 10px rgba(207, 185, 145, 0.2);
}

#game-back-btn {
  background-color: #b5904c;
  color: #1c1c1c;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

#game-back-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

#game-back-btn:active {
  transform: translateY(0);
}

/* --- Game Card --- */
.game-card {
  padding: 0;
  overflow: hidden;
  background-color: #000;
  border-color: var(--pu-gold);
  display: flex;
  flex-direction: column;
}

#game-canvas-wrapper {
  width: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #000;
}

#game-canvas-wrapper canvas {
  display: block;
  max-width: 100%;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  #banner-heading {
    font-size: 1.5rem;
  }

  .countdown {
    font-size: 1.1rem;
  }

  .card {
    padding: 1.25rem 1rem;
  }

  .header-inner {
    padding: 0.6rem 1rem;
  }

  .pu-logo {
    height: 26px;
  }

  .dept-link {
    font-size: 0.8rem;
  }
}