@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
/* @import url("wii-pointer.cur"); */

/* html {
  cursor: url("https://upload.wikimedia.org/wikipedia/commons/e/e5/Redsquare.png"),
    auto;
} */

* {
  cursor: inherit;
  /* overflow: hidden; */
}

:root {
  --bg-color: #e5e5e5;
  --channel-bg: #ffffff;
  --channel-shadow: rgba(0, 0, 0, 0.1);
  --text-color: #333;
  --accent-color: #00bfff; /* Deep sky blue, reminiscent of Wii UI */
  --wave-height: 15vh;
}

/* --- General Styles --- */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  /* overflow: hidden; */ /* Prevents scrollbars during animations */
  /* display: flex; */
  /* flex-direction: column; */
  /* justify-content: center; */
  /* align-items: center; */
  height: 100vh;
  position: relative;
  cursor: none;
  /* cursor: grab; */
}

/* --- Background Pattern --- */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-image: linear-gradient(0deg, #f0f0f0 20%, transparent 40%);
  background-size: 12px 12px; */
  opacity: 0.5;
  z-index: -1;
}

/* a,
button,
div,
.clickable-div {
  cursor: none !important;
} */

#custom-cursor {
  /* Critical properties: */
  position: fixed; /* Keeps it locked to the viewport */
  pointer-events: none; /* Allows clicks to go THROUGH the image to elements underneath */
  z-index: 9000; /* Ensures it stays on top of everything */

  /* Styling for your image: */
  width: 18vh;
  height: 18vh;

  /* Initially hide it, we'll show it with JS */
  display: none;
}

/* --- Channel Grid --- */
.channel-grid-wrapper {
  overflow: hidden;
  width: max-content;
  height: 75vh;
  top: 0px;
  padding-top: 3vh;
  padding-bottom: 3vh;
  /* margin-left: 16vh; */
}

.channel-grid {
  display: flex;
}

.channel-grid.channel-grid-transition {
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.channel-page {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1vh;
  padding: 1vh;
  width: 168vh;
  /* width: 80vw; */
  box-sizing: border-box;
  flex-shrink: 0; /* Prevents pages from shrinking */
}

.test-channel {
  width: 97.5%;
  height: 95.5%;
  background-color: transparent;
  transition: all 0.3s ease;
  display: block;
  object-fit: cover;
  clip-path: url(#unique-shape-clip);
  -webkit-clip-path: url(#unique-shape-clip);
  position: relative;

  /* 1. Apply the Fading Mask */
  -webkit-mask-image: url(#fading-mask);
  mask-image: url(#fading-mask);
}

.test-channel-border {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #c7c7c7;
  transition: all 0.5s ease;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  clip-path: url(#channel-clip-path);
}

.test-channel-border.set:hover {
  background-color: #a0e3fa;
}

.test-channel.empty {
  background-image: linear-gradient(0deg, #ced0cd 40%, #c3c6c3 10%);
  background-size: 1vh 1vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 8vh;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.1);
}

.channel-border {
  position: absolute;
  aspect-ratio: 16 / 9;
  background-color: #c7c7c7;
  clip-path: url(#channel-clip-path);
}

/* --- Individual Channels --- */
.channel {
  aspect-ratio: 16 / 9;
  background-color: transparent;
  cursor: pointer;
  margin: 10px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;

  opacity: 1; /* Changed from 0 to 1 to remove initial fade-in */
  transform: translateY(
    0
  ); /* Changed from 30px to 0 to remove initial slide-up */
  clip-path: url(#channel-clip-path);
  /* animation: channelEntrance 0.6s ease-out forwards; */
  /* animation-delay: calc(var(--channel-index, 0) * 0.1s); */
}

.channel::before {
  content: ""; /* Required for pseudo-elements */
  position: absolute;

  /* This creates the border thickness */
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  /* A more modern way is to use: inset: 5px; */
  filter: blur(10px);

  background-color: var(--channel-bg); /* This is your BORDER color */

  /* The same clip-path is inherited, but we re-declare for clarity/safety */
  -webkit-clip-path: url(#channel-clip-path);
  clip-path: url(#channel-clip-path);

  /* Place the border behind the main element's content */
  z-index: -1;
}

.channel:hover {
  background-color: #a0e3fa;
}

.channel.empty {
  cursor: default;
  background-color: #b4b7b3; /* Outer border color */
  position: relative;
  overflow: hidden;
  clip-path: url(#channel-clip-path);
  z-index: 0; /* Base layer */
}

.channel.empty:hover {
  transform: none; /* No hover effects on the main element */
}

/* Clear out previous pseudo-element rules for .channel.empty */
/* .channel.empty::before { ... } */
/* .channel.empty::after { ... } */

/* Re-define pseudo-elements below */

.channel.empty::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background-color: #b4b7b3; /* Blurred inner background color */
  filter: blur(10px);
  z-index: 1;
  -webkit-clip-path: url(#channel-clip-path);
  clip-path: url(#channel-clip-path);
}

.channel.empty::after {
  content: "Wii"; /* Now contains the Wii text */
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background-image: linear-gradient(0deg, #ced0cd 40%, #c3c6c3 10%);
  background-size: 10px 10px;
  font-size: 5rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  filter: none; /* Ensure text and scanlines are not blurred */
  -webkit-clip-path: url(#channel-clip-path);
  clip-path: url(#channel-clip-path);
}

.channel-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* --- Wii Channel View --- */
.wii-channel-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  font-family: "Arial", sans-serif;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.1);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
  transform-origin: center center;
}

.wii-channel-view.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

.wii-channel-view.closing {
  opacity: 0;
  transform: scale(0.1);
  pointer-events: none;
}

/* Channel content animations */
.channel-content {
  transition: all 0.3s ease 0.2s;
}

/* Channel Header */
.channel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
  border-bottom: 1px solid #d0d0d0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.channel-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.channel-close {
  width: 50px;
  height: 50px;
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.channel-close:hover {
  background: #e8e8e8;
  transform: scale(1.05);
}

/* Channel Content Area */
.channel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.channel-button {
  background: linear-gradient(to bottom, #ffffff, #f0f0f0);
  border: 1px solid #d0d0d0;
  border-radius: 25px;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.channel-button:hover {
  background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.2);
}

.channel-button:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Scanline Effect */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1vh,
    rgba(0, 0, 0, 0.03) 1vh,
    rgba(0, 0, 0, 0.03) 1vh
  );
  pointer-events: none;
  z-index: 5;
}

/* Regular Channel Content */
.regular-channel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.regular-channel-content h1 {
  font-size: 3rem;
  color: #333;
  margin-bottom: 30px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.regular-channel-content p {
  font-size: 1.3rem;
  line-height: 1.6;
  color: #666;
  max-width: 600px;
  margin-bottom: 20px;
}

.regular-channel-content ul {
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #666;
}

.main-content {
  overflow: hidden;
  background-image: linear-gradient(0deg, #f0f0f0 20%, transparent 40%);
  background-size: 12px 12px;
  height: calc(
    100vh - (var(--wave-height) - 5vh)
  ); /* Adjust height to account for fixed bottom bar */
}

/* --- Bottom Bar --- */
#main-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--wave-height) + 0.6vh); /* Slightly taller for border */
  background-color: #4bc0e3; /* Border color */
  z-index: 5; /* Border on top of other content, but behind the actual bar */
  clip-path: url(#bottom-bar-clip-path);
  /* -webkit-clip-path: url(#bottom-bar-clip-path); */
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

#main-bottom-bar::before {
  content: ""; /* Add content property for pseudo-element to display */
  position: absolute; /* Changed to absolute to be relative to parent */
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--wave-height); /* Original height for the main bar */
  background-color: #d5d6dc; /* Main bar color */
  z-index: 6; /* Main bar on top of its border */
  clip-path: url(#bottom-bar-clip-path);
  /* -webkit-clip-path: url(#bottom-bar-clip-path); */
}

.bottom-bar-button {
  width: 10vh;
  height: 10vh;
  background: linear-gradient(to bottom, #d4d4d4, #e0e0e0);
  border-radius: 50%;
  border: 0.5vh solid #4bc0e3;
  box-shadow: 0 0.2vh 0.5vh rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Orbitron", sans-serif;
  font-size: 4vh;
  color: #8b8b8b;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 0.5vh 1.5vh #4bc0e3;
}

.bottom-bar-button:hover {
  transform: scale(1.1);
}

.bottom-bar-button.left-button {
  margin-top: 2vh;
  margin-left: 4vw;
  /* Text styling controls */
  font-family: "Orbitron", sans-serif; /* Change font family */
  font-size: 5vh; /* Change font size */
  font-weight: bold; /* Make text bold */
  color: #9c9c9c; /* Change text color */
  /* Position controls - adjust as needed */
  /* position: relative; */ /* Uncomment if you need more precise positioning */
  /* top: 0; */ /* Adjust vertical positions */
  /* left: 0; */ /* Adjust horizontal position */
  /* transform: translate(0, 0); */ /* Fine-tune position with transform */
}

.bottom-bar-button-middle-button {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.8vh; /* Moved down */
  margin-left: 4vw; /* Moved to the right */
  z-index: 10;
  transition: all 0.2s ease;
  /* Text styling controls */
  font-family: "Orbitron", sans-serif; /* Change font family */
  font-size: 7vh; /* Change font size */
  color: #9c9c9c; /* Change text color */
}

.bottom-bar-button-middle-button:hover {
  transform: scale(1.2);
}

.bottom-bar-button.right-button {
  margin-top: 2vh;
  margin-right: 4vw;
  margin-left: auto; /* Push to the right */
  /* Text styling controls */
  font-family: "Orbitron", sans-serif; /* Change font family */
  font-size: 7vh; /* Change font size */
  color: #9c9c9c; /* Change text color */
  /* Position controls - adjust as needed */
  justify-content: center; /* Change to flex-start, flex-end, or center */
  align-items: flex-start; /* Change to flex-start, flex-end, or center */
  padding-top: 0; /* Increase to move text down, decrease to move text up */
  padding-bottom: 0; /* Increase to move text up, decrease to move text down */
  padding-left: 0; /* Increase to move text right, decrease to move text left */
  padding-right: 0; /* Increase to move text left, decrease to move text right */
  line-height: 1.4; /* Adjust to fine-tune vertical text position */
}

.time-display {
  position: absolute;
  bottom: 2.5vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #666;
  z-index: 20;
}

.date-text {
  font-family: "Arial", sans-serif;
  font-size: 6vh;
  font-weight: 400;
  color: #666;
  letter-spacing: 0.5px;
  margin-top: 3%;
}

.time-text {
  font-family: "Orbitron", "Courier New", monospace;
  font-size: 6vh;
  font-weight: 400;
  color: #999;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(153, 153, 153, 0.3);
}

/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000; /* Black background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Ensure it's on top of everything */
  transition: opacity 1s ease-out; /* Fade out animation */
}

#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none; /* Disable interaction after fading */
}

/* Spinner Animation */
.spinner {
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-top: 8px solid #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

body.loading {
  overflow: hidden; /* Prevent scrolling while loading */
}

.unique-arrow-btn {
  /* Set size for the overall SVG container */
  position: absolute;
  top: 35%;
  width: 5vh;
  z-index: 100;
  transition: transform 0.2s ease-in-out;
}

.unique-arrow-btn.right {
  right: 1vw;
}

.unique-arrow-btn.left {
  left: 1vw;
  transform: rotate(180deg);
}

.unique-arrow-btn.hidden {
  display: none;
}

.arrow-shape {
  /* Default Styles */
  stroke: #2579d3; /* White border */
  stroke-width: 0.03; /* Border thickness (relative to 100 viewBox) */
}

/* Hover state for visual feedback */
.unique-arrow-btn.right.child-hovered {
  transform: scale(1.2);
}

.arrow-shape-left {
  /* Default Styles */
  stroke: #2579d3; /* White border */
  stroke-width: 0.03; /* Border thickness (relative to 100 viewBox) */
}

/* Hover state for visual feedback */
.unique-arrow-btn.left.child-hovered {
  transform: scale(1.2) rotate(180deg);
}
