/* ================================
   RESET
================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================================
   BODY / BACKGROUND
================================ */
body {
  font-family: 'Nunito', 'Arial Rounded MT Bold', Arial, sans-serif;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #c8c8c8;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0px,
    rgba(255, 255, 255, 0.06) 1px,
    transparent               1px,
    transparent               4px
  );
}

/* ================================
   ANIMATIONS
================================ */

/*
  Blog tile: a gentle, slow float.
  Uses ease-in-out so it reads as a soft breath/pulse — the same
  kind of idle animation the real Wii channels use.
*/
@keyframes wii-float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}


/* ================================
   MAIN AREA
================================ */
.wii-main {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  padding: 10px 0 4px;
}

/* ================================
   DISC STRIP (left)
================================ */
.wii-disc-strip {
  width: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
}

.wii-disc-slot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dcdcdc 0%, #b8b8b8 100%);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0  1px 0   rgba(255, 255, 255, 0.8),
    inset 0 -1px 4px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.disc-inner {
  width: 14px;
  height: 3px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 2px;
}

/* ================================
   CHANNEL GRID
================================ */
.wii-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  min-width: 0;
}

/* ================================
   RIGHT ARROW STRIP
================================ */
.wii-right-strip {
  width: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wii-page-arrow {
  font-size: 1rem;
  color: rgba(80, 80, 80, 0.65);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(200, 200, 200, 0.55) 100%
  );
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: background 0.12s ease;
  padding: 0;
  line-height: 1;
}

.wii-page-arrow:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(220, 220, 220, 0.85) 100%
  );
}

/* ================================
   TILE BASE
================================ */
.wii-tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  text-decoration: none;
  background: linear-gradient(
    180deg,
    #f2f2f2  0%,
    #e4e4e4 45%,
    #d4d4d4 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.9);
  outline: 1px solid rgba(160, 160, 160, 0.4);
  outline-offset: -1px;
  box-shadow:
    0 3px 8px  rgba(0, 0, 0, 0.18),
    0 1px 2px  rgba(0, 0, 0, 0.10),
    inset 0  2px 0   rgba(255, 255, 255, 0.85),
    inset 0 -2px 5px rgba(0, 0, 0, 0.08);
}

/* ================================
   TILE GLOSS
================================ */
.tile-gloss {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92)  0%,
    rgba(255, 255, 255, 0.65) 45%,
    rgba(255, 255, 255, 0.10) 85%,
    rgba(255, 255, 255, 0.00) 100%
  );
  border-radius: 9px 9px 60% 60% / 9px 9px 22px 22px;
}

/* ================================
   STATIC NOISE LAYER
   Sits between the tile background and the gloss.
   The SVG uses feTurbulence to generate grain; rapid position
   shifts via wii-static make it read as flickering TV static.
================================ */
canvas.tile-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 8px;
  opacity: 0.18;
  pointer-events: none;
}


/* ================================
   EMPTY TILE — "Wii" watermark
================================ */
.wii-watermark {
  position: relative;
  z-index: 3;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 900;
  font-style: italic;
  color: rgba(170, 170, 170, 0.55);
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  margin-top: 36%;
}

/* ================================
   TILE CONTENT (live tiles)
================================ */
.tile-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 0 6px 12%;
  gap: 4px;
}

.tile-icon {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.tile-label {
  font-size: clamp(0.58rem, 1vw, 0.78rem);
  font-weight: 800;
  color: #444;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  line-height: 1.2;
}

/* ================================
   BLOG TILE
================================ */
.wii-tile--blog {
  background: linear-gradient(
    145deg,
    #5ab0e8  0%,
    #2a7ec8 50%,
    #1a5aa8 100%
  );
  border-color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  
  transition: transform 0.12s ease, box-shadow 0.12s ease, outline 0.12s ease;
}

 /* Float lives on the CONTENT inside the tile, not the tile itself */
 .wii-tile--blog .tile-content {
   animation: wii-float 2.8s ease-in-out infinite both;
 }

 /* Pause float on hover so it doesn't fight the scale */
 .wii-tile--blog:hover .tile-content {
   animation-play-state: paused;
 }

/* Pause float on hover so the scale/ring effect feels stable */
.wii-tile--blog:hover {
  animation-play-state: paused;
  transform: scale(1.035) translateY(-1px);
  outline: 2.5px solid rgba(255, 255, 255, 0.9);
  outline-offset: 1px;
  box-shadow:
    0 0 0 4px  rgba(255, 255, 255, 0.75),
    0 0 0 7px  rgba(100, 170, 240, 0.45),
    0 0 0 10px rgba(80,  150, 220, 0.18),
    0 6px 20px rgba(0, 0, 0, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.wii-tile--blog:active {
  transform: scale(0.975);
  transition-duration: 0.06s;
}

.wii-tile--blog .tile-label {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Blue-tinted gloss for the blog tile */
.wii-tile--blog .tile-gloss {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.30) 50%,
    rgba(255, 255, 255, 0.00) 100%
  );
}

/* ================================
   BOTTOM BAR WRAPPER
================================ */
.wii-bar-wrap {
  position: relative;
  flex-shrink: 0;
}

.wii-wave {
  display: block;
  width: 100%;
  height: 38px;
  margin-bottom: -2px;
}

/* ================================
   BOTTOM BAR
================================ */
.wii-bar {
  background: #c0c0c0;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.wii-bar-left,
.wii-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 130px;
}

.wii-bar-right {
  justify-content: flex-end;
}

/* ================================
   CLOCK + DATE
================================ */
.wii-bar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.wii-clock {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
  color: #555;
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.wii-date {
  font-size: clamp(0.65rem, 1.2vw, 0.82rem);
  font-weight: 700;
  color: #777;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ================================
   ROUND BUTTONS (Wii + Mail)
================================ */
.wii-round-btn {
  width: 52px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 100%);
  box-shadow:
    0 2px 6px  rgba(0, 0, 0, 0.2),
    inset 0  1px 0   rgba(255, 255, 255, 0.9),
    inset 0 -1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease;
}

.wii-round-btn:hover {
  background: linear-gradient(180deg, #f4f4f4 0%, #d8d8d8 100%);
  transform: translateY(-1px);
}

.wii-round-btn:active {
  transform: translateY(0);
}

.wii-round-label {
  font-size: 0.95rem;
  font-weight: 900;
  font-style: italic;
  color: #5a9ad8;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ================================
   SD / OPTIONS SQUARE BUTTON
================================ */
.wii-sq-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, #e4e4e4 0%, #c4c4c4 100%);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease;
}

.wii-sq-btn:hover {
  background: linear-gradient(180deg, #f0f0f0 0%, #d0d0d0 100%);
}