/* RESET + BASICS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
  background-color: rgba(0, 0, 0, 0.1);
}

/* BACKGROUND VIDEO */
#background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  opacity: 0.8;
}

/* MAIN LAYOUT WRAPPER */
.content-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.layout-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  width: 90vw;
  height: 90vh;
  gap: 1vw;
}

/* LEFT SECTION WITH WHITE BORDER */
.left-section {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid white;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* PANELS INSIDE LEFT SECTION */
.video-panel,
.headline-bar,
.ticker-panel,
.word-ticker {
  width: 100%;
  overflow: hidden;
}

/* VIDEO PANEL */
.video-panel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* HEADLINE BAR */
.headline-bar {
  background: rgb(200, 0, 0);
  color: white;
  text-align: center;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1rem;
  padding: 0.4rem;
}

/* IMAGE TICKER */
.ticker-panel {
  background: rgba(0, 0, 0, 0.3);
}
.ticker-track {
  display: flex;
  gap: 1rem;
  animation: scrollTicker 10s linear infinite;
}
.ticker-track img {
  height: 12vh;
  width: auto;
  object-fit: contain;
}
@keyframes scrollTicker {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

/* WORD TICKER */
.word-ticker {
  height: 5vh;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}
/* In style.css */
#ticker-text {
  display: inline-block;
  padding-left: 100%; /* This pushes the text to start at the right edge */
  /* The animation now starts from 0, not 100% */
  animation: scrollWords 150s linear infinite; 
}

@keyframes scrollWords {
  from {
    transform: translateX(0); /* Start from its padded position */
  }
  to {
    /* This transform needs to move the text by its full width + the 100% padding */
    /* A simple -100% might not be enough if the text is long. */
    /* A safer bet is to move it by a very large negative amount */
    transform: translateX(-150%); /* Adjust as needed */
  }
}
/* ============================= */
/* RIGHT PANEL (GRID BOXES) */
/* ============================= */
.right-panel-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background-color: rgba(255, 255, 255, 0.02);
  gap: 1vh;
  z-index: 5;
  overflow: hidden;
 
}

.horizontal-slider {
  overflow: hidden;
  border: 2px solid white;
  background: rgba(0, 0, 0, 0.145);
  position: relative;
}

.horizontal-set {
  display: flex;
  animation: scrollHorizontal 10s linear infinite;
  gap: 1rem;
  will-change: transform;
}

.horizontal-set:hover {
  animation-play-state: paused; /* pauses entire slider when hovering over the set */
}

.horizontal-set img {
  height: 35vh;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.4s ease, filter 0.3s ease;
  cursor: pointer;
}

.horizontal-set img:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
  z-index: 10;
}

@keyframes scrollHorizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-300%);
  }
}


.bottom-video { 
   display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  border: 2px solid white;
  overflow: hidden;
}

.bottomvid video {
  height: auto;
  object-fit: contain;
  width: fit-content;
  max-width: 100%;
  
}

/* ===== HOVER SIGN AREA ===== */
.hoversign {
  height: 20%;
  border: 2px solid white;
  overflow: visible; /* allow large preview images to extend beyond boundary */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: none;
  z-index: 10; /* ensures it stays above its surroundings */
}

.hover-sign {
  background: rgb(200, 0, 0);
  color: white;
  text-align: center;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1rem;
  padding: 10%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  /* Glow + Shake animations */
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.6);
  animation:
    glowPulse 2.5s ease-in-out infinite alternate,
    shake 1.2s ease-in-out infinite;
  transform-origin: center;
}

/* ===== HOVER SIGN IMAGE PREVIEW ===== */
.hover-sign {
   position: relative;
  overflow: visible; /* let images grow beyond the box vertically */
}

#hover-preview {
   position: absolute;
  top: 50%;
  left: 50%;
  width: 140%; /* wider than the hover-sign box */
  height: 400%; /* taller than the hover-sign box */
  transform: translate(-50%, -50%) scale(0.95);
  object-fit: cover;
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.5s ease;
  z-index: 2;
  pointer-events: none;
}

.hover-sign.show-preview #hover-preview {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 50;
  animation: expandPop 0.8s ease forwards;
}






/* Fade text out when image preview is shown */
.hover-sign.show-preview h1 {
  opacity: 0;
  transition: opacity 0.3s ease;
}



@keyframes expandPop {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

/* Glowing animation */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.6), 0 0 25px rgba(255, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.9), 0 0 55px rgba(255, 0, 0, 0.7);
  }
}


/* Shaky motion to make the sign feel alive */
@keyframes shake {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  10%  { transform: translate(-1px, 1px) rotate(-1deg); }
  20%  { transform: translate(1px, -1px) rotate(1deg); }
  30%  { transform: translate(-1px, 2px) rotate(-0.5deg); }
  40%  { transform: translate(1px, -1px) rotate(0.5deg); }
  50%  { transform: translate(-2px, 1px) rotate(-1deg); }
  60%  { transform: translate(1px, -2px) rotate(1deg); }
  70%  { transform: translate(-1px, 1px) rotate(-0.5deg); }
  80%  { transform: translate(1px, 1px) rotate(0.5deg); }
  90%  { transform: translate(-1px, -1px) rotate(0deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}


/* ===== CUSTOM GREEN CURSOR EFFECT ===== */
.hoversign::before {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: rgba(0, 255, 0, 0.8);
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  transition: transform 0.15s ease, background-color 0.2s ease;
  z-index: 10;
}

/* Cursor grows when hovering */
.hoversign:hover::before {
  transform: scale(2.5);
  background-color: rgba(0, 255, 0, 1);
}

/* Track cursor movement */
.hoversign {
  position: relative;
}

/* Optional: make the hover-sign text brighten slightly when hovered */
.hoversign:hover .hover-sign {
  filter: brightness(1.3);
}

/* Green expanding cursor */
.hover-cursor {
  position: absolute;
  width: 25px;
  height: 25px;
  background: rgba(0, 255, 0, 0.8);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease, background-color 0.3s ease;
  mix-blend-mode: screen;
}

/* ===== CUSTOM BLUE CURSOR FOR TOGGLE BUTTON ===== */
.toggle-button-container {
  position: relative;
  cursor: none; /* Hide system cursor when inside */
}

.toggle-cursor {
  position: absolute;
  width: 25px;
  height: 25px;
  background: rgba(0, 150, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease, background-color 0.3s ease;
  mix-blend-mode: screen;
  z-index: 100;
}

/* When hovering, enlarge and brighten the blue cursor */
.toggle-button-container:hover .toggle-cursor {
  transform: translate(-50%, -50%) scale(2.5);
  background-color: rgba(0, 180, 255, 1);
}

/* Optional: make the toggle button slightly glow when hovered */
.toggle-button-container:hover .toggle-button {
  box-shadow: 0 0 10px rgba(0, 180, 255, 0.8), 0 0 20px rgba(0, 180, 255, 0.5);
}




.hoversign:hover .hover-cursor {
  transform: translate(-50%, -50%) scale(2.5);
  background-color: rgba(0, 255, 0, 1);
}








/* TOGGLE BUTTON (inside image panel) */
.toggle-button-container {
  position: absolute;
  bottom: 0%;
  left: 80%;
  transform: translateX(-165%);
  z-index: 50;
}

.toggle-button {
  display: inline-block;
  background-color: rgb(200, 0, 0);
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1rem;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid white;
  transition: all 0.3s ease-in-out;
}

.toggle-button:hover {
  background-color: rgb(255, 50, 50);}



/* ===== DRAGGING ===== */
.right-box {
  position: relative;
  flex: 0 0 auto;
  min-height: 100px;
  border: 2px solid white;
  background: rgba(0, 0, 0, 0.15);
  overflow: visible;
}

.right-box.dragging {
  opacity: 0.8;
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  z-index: 100;
}

.drag-handle {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 1.2rem;
  color: white;
  cursor: grab;
  user-select: none;
  z-index: 20;
  opacity: 0.7;
}
.drag-handle:hover {
  opacity: 1;
}

/* ===== RESIZING ===== */
.resize-handle {
   position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px; /* slightly thicker for easier grabbing */
  background: rgba(255, 255, 255, 0.3);
  cursor: ns-resize;
  z-index: 10; /* keeps it above the video */
  transition: background 0.2s ease;
  
}

.resize-handle:hover {
   background: rgba(0, 255, 255, 0.6); /* teal glow for clarity */
}


.right-box:hover {
  outline: 1px dashed rgba(255, 255, 255, 0.3);
}



.drag-handle {
  font-family: monospace;
  letter-spacing: 2px;
  font-weight: bold;
}


