html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #000, #111);
  overflow: hidden;
  font-family: monospace;
}

.grid-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  gap: 10px;
  padding: 10px;
}

.top-section {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 10px;
}

.left-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.grayscale-cell {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0px -2px 18px 0px #111, 5px -3px 4px -1px #000;
}
.grayscale-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.grayscale-cell img:hover {
  opacity: 1;
}

.channel-label {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 100;
  border-radius: 0;
  z-index: 10;
  margin: -5px;
}

.blue {
  background-color: rgb(22, 57, 75, 0.6);
}
.red {
  background-color: rgb(75, 22, 22, 0.6);
}
.green {
  background-color: rgb(22, 75, 30, 0.6);
}

.extra-label {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgb(255 255 255 / 20%);
  color: #fff;
  font-size: 12px;
  border-radius: 0;
  z-index: 10;
  white-space: pre-line;
  margin-bottom: 0;
  margin-left: 0;
  padding: 0;
  opacity: 0.7;
  text-transform: UPPERCASE;
  line-height: 0.9;
  padding: 2px 20px;
  margin-top: -22px;
}

.extra-label ul{
  padding:0;
  margin-bottom: -10px;
}
.extra-label ul li{
  list-style: none;
  margin:-4px;
}

.right-col {
  width: 100%;
  height: 100%;
}

.ply-viewer {
  background: #000;
  width: 100%;
  height: 100%;
}

.scene-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.scene-item {
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 41px 56px 224px #222;
}
.scene-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.scene-item img:hover {
  opacity: 1;
}

.meta-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  color: #FFF;
  font-family: monospace;
  display: none;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.meta-overlay:hover {
  opacity: 1;
}

.meta-content {
}

.close-button {
  position: fixed;
  top: 10px;
  right: 20px;
  background: #000;
  color: #FFF;
  border: none;
  padding: 5px 10px;
  font-size: 1.2em;
  cursor: pointer;
}

#viewport {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #111;
  padding: 7px 3px;
  border-radius: 0px;
  z-index: 2000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#viewcam {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #111;
  padding: 7px 3px;
  border-radius: 0px;
  z-index: 2000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#sidebar {
  position: fixed;
  top: 10px;
  left: 10px;
  background: #111;
  padding: 7px 3px;
  border-radius: 0px;
  z-index: 2000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#underbar {
  position: fixed;
  top: 64px;
  left: 10px;
  background: #111;
  padding: 7px 3px;
  border-radius: 0px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#upperbar{
    position: fixed;
    top: 64px;
    right: 10px;
    background: #111;
    padding: 7px 3px;
    border-radius: 0px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.grid-A {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 30px;
}

.grid-B {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 24px;
  line-height: 30px;
  color: white;
}

.console-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 25%;
  background:rgba(0, 0, 0, 0.15);
  text-transform: uppercase;  
  color: #fff;
  z-index: 10000;
  font-family: monospace;
  display: none;
  opacity: 0.8;
  overflow: hidden;
  font-size: 0.93em;
  line-height: 1.2;
  box-shadow: -2px 7px 156px #777;
}

.console-overlay .log-content {
  padding: 10px;
}

.console-overlay p {
  margin: 0.2em 0;
  white-space: normal;
  word-break: break-word;
}

.console-overlay .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #333;
  color: #fff;
  border: none;
  font-size: 1em;
  padding: 5px 10px;
  cursor: pointer;
}

.close-button:hover {
  background-color: #888;
}

a{
  color: #eee;
  text-decoration: none;
}

a:hover{
  color: #fff;
  text-decoration: underline;
}

.meta-highlight {
  color: #fefefe;
  font-weight: bold;
}

.meta-success {
  color: #fefefe;
  font-weight: bold;
}

.meta-warning {
  color: #fefefe;
  font-weight: bold;
}

.meta-date{
  font-size: 0.93em;
}

.meta-green{
  color: #f4f4f4;
}
.meta-blue{
  color:#eaeaea;
}
.meta-red{
  color:#fbfbfb;
}

/* Minimized state */
.console-overlay.minimized {
  height: 36px;
  width: 50%;
  overflow: hidden;
  opacity: 0.7;
  padding: 5px;
  transition: height 0.1s ease, width 0.1s ease, opacity 0.3s ease;
}

.console-overlay.minimized .log-content {
  display: none;
}

.console-overlay .log-content {
  padding: 20px;
}

#topbar {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #111;
  padding: 7px 3px;
  border-radius: 0px;
  z-index: 2000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.menu-item {
  width: 30px;
  height: 30px;
  margin: 0 4px;
  background: #000;
  border: 2px solid #222;
  border-radius: 0px;
  color: #fff;
  font-size: 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
}

.menu-item.selected{
  background: #555;
}

.menu-item.sel{
  background: #555;
}

.menu-item:hover {
  background: #888;
}

.grid-container, .top-section, .scene-section {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.grid-container, .top-section, .scene-section {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#multiview {
  width: 100%;
  height: 100vh;
}

.multiview-top, .multiview-center, .multiview-bottom {
  width: 100%;
}

.film-carousel {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px;
  box-sizing: border-box;
}

.film-carousel::-webkit-scrollbar {
  display: none;
}

.film-thumb {
  flex: 0 0 auto;
  margin-right: 16px;
  border: 8px solid #111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease-in-out;
  cursor: pointer;
  opacity: 0.6;
}

.film-thumb:hover {
  border-color: #222;
  border-style: dashed;
  opacity: 1;
}

.carousel-arrow {
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 8px;
  opacity: 0.3;
}

.carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 1;
}

body.view3 .top-section,
body.view3 .scene-section {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}
body.view3 .ply-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
}

.full-screen-ply {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 1000;
  display: none;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  padding: 10px;
  align-items: stretch;
}

.card {
  background: #1e1e1e;
  border-radius: 0;
  text-align: right;
  box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
  opacity: 0.6;

  width: 100%;  
  height: 260px;
  min-height: 260px;
  height: auto; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover{
  opacity: 1;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  border-radius: 1px;
}

.card p {
  font-size: 12px;
  margin: 5px 0;
  color: #fff;
  text-transform: uppercase;
}

.card a {
  color: #fff;
  text-decoration: none;
}

.card a:hover {
  
}

/* Responsive adjustments for scene section */
@media (max-width: 768px) {
  .scene-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .left-col {
    display: grid;
    grid-template-rows: 0fr 1fr;
    gap: 100px;
    position: fixed;
    width: 30%;
    z-index: 99999;
  }
  .right-col{
    position: fixed;
  }
  .console-overlay {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .scene-section {
    grid-template-columns: 1fr;
  }
  .left-col {
    display: grid;
    grid-template-rows: 0fr 1fr;
    gap: 100px;
    position: fixed;
    width: 30%;
  }
}
