/* ============================
   Base styles
   ============================ */

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: #fafafa;
  color: #222;
  line-height: 1.6;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.primary-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================
   Region containers (geometry only)
   ============================ */

.umi-region {
  max-width: 900px;
  margin: 0 auto;
}

.umi-region-wide {
  max-width: 1400px;
  margin: 0 auto;
}

.umi-region-full {
  max-width: none;
  margin: 0;
}

/* ============================
   Spacing containers (interior padding)
   ============================ */

.umi-pad {
  padding: 0 1.5rem;
}

.umi-pad-sm {
  padding: 0 1rem;
}

.umi-pad-lg {
  padding: 0 2rem;
}

/* Narrow screens: reduce horizontal padding */
@media (max-width: 600px) {
  .umi-pad {
    padding: 0 1rem;
  }

  .umi-pad-sm {
    padding: 0 0.75rem;
  }

  .umi-pad-lg {
    padding: 0 1.25rem;
  }
}

/* Extra-narrow screens: reduce even further */
@media (max-width: 400px) {
  .umi-pad {
    padding: 0 0.75rem;
  }

  .umi-pad-sm {
    padding: 0 0.5rem;
  }

  .umi-pad-lg {
    padding: 0 1rem;
  }
}

/* ============================
   Vertical rhythm
   ============================ */

.umi-section {
  margin: 2.5rem 0;
}

.umi-section-sm {
  margin: 1.5rem 0;
}

.umi-section-lg {
  margin: 3.5rem 0;
}

/* ============================
   Header layout
   ============================ */

.umi-header .umi-region {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px;
  border-bottom: 1px solid #ddd;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 600;
}

.logo a {
  text-decoration: none;
  color: #222;
}

.logo-mark {
  font-size: 1.6rem;
  margin-right: 0.4rem;
  background-image: url("../assets/logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  width: 1.6rem;
  height: 1.6rem;
}

.umi-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 1rem;
  margin-top: 5px;
}

.umi-nav a {
  text-decoration: none;
  color: #333;
}

.umi-nav a:hover {
  text-decoration: underline;
}

.umi-live-time {
  margin-left: 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  color: #555;
}

/* ============================
   Footer layout
   ============================ */

.umi-footer {
  background: #111;
  color: #ccc;
  padding: 20px 0;
  font-size: 14px;
}

.umi-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.umi-footer-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.umi-footer-title {
  font-weight: bold;
  margin-bottom: 4px;
  color: #eee;
}

.umi-footer-section a {
  color: #ccc;
  text-decoration: none;
}

.umi-footer-section a:hover {
  color: #fff;
}

.umi-footer-meta {
  text-align: right;
  min-width: 200px;
  flex: 1 1 auto;
}

.umi-footer-meta p {
  margin: 0;
}

.umi-footer-meta a {
  text-decoration: none;
  color: #cde;
}

.umi-footer-meta a:hover {
  color: #fff;
}

/* ============================
   Responsive breakpoints
   ============================ */

/* Tablet and up */
@media (min-width: 600px) {

  .umi-nav {
    gap: 28px;
    font-size: 1.05rem;
  }
}

/* Desktop and up */
@media (min-width: 900px) {
  .umi-header .umi-pad {
    padding: 20px 32px;
  }

  .umi-nav {
    gap: 32px;
  }

  .umi-footer .umi-pad {
    padding: 32px;
    font-size: 1rem;
  }
}

@media (max-width: 500px) {
  .umi-footer-inner {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .umi-footer-meta {
    text-align: center;
  }
}

.mobile-menu-button,
.mobile-nav {
  display: none;
}

.mobile-menu-button {
  display: none;

  width: 2.75rem;
  height: 2.75rem;

  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.75rem;

  background: rgba(255,255,255,0.06);
  color: #000;

  font-size: 1.25rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.mobile-menu-button:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.mobile-menu-button:active {
  transform: scale(0.95);
}

.mobile-menu-button {
  position: relative;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-button.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-button.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  position: absolute;
  top: 25px;
  right: 70px;
  padding: 1rem 0;
  flex-direction: column;
  border-radius: 10px;
  background: #111;
  color: #ccc;
}

.mobile-nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-title {
  font-weight: bold;
  margin-top: 4px;
  color: #eee;
  background: #222;
  padding: 0 1rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 1rem;
}

.mobile-nav-links a {
  color: #ccc;
  text-decoration: none;
}

.mobile-nav-links a:hover {
  color: #def;
}

@media (max-width: 768px) {

  .umi-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
    margin-top: 5px;
  }

  .mobile-nav {
    display: none;
  }

  .mobile-nav.open {
    display: flex;
  }

  .umi-footer-section {
    display: none;
  }
}