/* =======================
   BASE RESET
   ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', monospace;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

/* =======================
   VIDEO BACKGROUND
   ======================= */
.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent);
  background-size: 50px 50px;
  animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

/* =======================
   HEADER
   ======================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: '●';
  color: #00ff00;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

nav a:hover {
  color: #00ff00;
}

.time {
  font-size: 14px;
  font-weight: bold;
}

/* =======================
   SIDEBAR
   ======================= */
.sidebar {
  position: fixed;
  left: 20px;
  top: 100px;
  z-index: 100;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s;
}

.sidebar-item:hover {
  transform: translateX(3px);
}

.checkbox {
  width: 14px;
  height: 14px;
  border: 2px solid #00ff00;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: -3px;
  left: 1px;
  color: #00ff00;
  font-size: 12px;
}

/* =======================
   WINDOWS
   ======================= */
.window-container {
  position: relative;
  width: 100%;
  height: 100vh;
}

.mac-window {
  position: absolute;
  min-width: 300px;
  min-height: 200px;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
  transition: box-shadow 0.3s ease;
}

.mac-window:hover {
  box-shadow: 0 20px 80px rgba(0, 255, 0, 0.2);
}

.mac-window.active {
  display: block;
}

.window-header {
  background: rgba(50, 50, 50, 0.9);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px 10px 0 0;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.control-btn.close { background: #ff5f57; }
.control-btn.minimize { background: #ffbd2e; }
.control-btn.maximize { background: #28c840; }

.window-title {
  font-size: 12px;
  color: #999;
  margin: 0 auto;
}

.window-body {
  padding: 30px;
  overflow: auto;
}

.window-body h3 {
  font-size: 18px;
  margin-bottom: 15px;
}

.window-body p {
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 15px;
}

/* =======================
   RESIZE HANDLES
   ======================= */
.resize-handle {
  position: absolute;
  background: transparent;
}

.resize-n { top: 0; left: 0; right: 0; height: 5px; cursor: n-resize; }
.resize-s { bottom: 0; left: 0; right: 0; height: 5px; cursor: s-resize; }
.resize-e { right: 0; top: 0; bottom: 0; width: 5px; cursor: e-resize; }
.resize-w { left: 0; top: 0; bottom: 0; width: 5px; cursor: w-resize; }
.resize-ne { top: 0; right: 0; width: 10px; height: 10px; cursor: ne-resize; }
.resize-nw { top: 0; left: 0; width: 10px; height: 10px; cursor: nw-resize; }
.resize-se { bottom: 0; right: 0; width: 10px; height: 10px; cursor: se-resize; }
.resize-sw { bottom: 0; left: 0; width: 10px; height: 10px; cursor: sw-resize; }

/* =======================
   GALLERY
   ======================= */
.gallery-slider {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  overflow: hidden;
}

.gallery-title {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
}

.gallery-track {
  display: flex;
  gap: 15px;
  padding: 45px 20px 20px;
  animation: slideGallery 30s linear infinite;
}

@keyframes slideGallery {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gallery-item {
  width: 220px;          /* Fixed uniform box width */
  height: 120px;         /* Fixed uniform box height */
  background: rgba(50, 50, 50, 0.8);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* Keeps video within box */
  display: block;
}

/* =======================
   SHADER BACKGROUND
   ======================= */
#shader-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
}

/* =======================
   RESPONSIVE FIXES
   ======================= */
@media (max-width: 1024px) {
  header {
    padding: 15px 25px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  nav {
    gap: 20px;
  }

  .window-body {
    padding: 20px;
  }

  .gallery-slider {
    height: 130px;
  }
}

@media (max-width: 768px) {
  /* Hide sidebar, make windows centered */
  .sidebar {
    display: none;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    height: auto;
    background: rgba(0, 0, 0, 0.6);
  }

  nav {
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
    gap: 0;
  }

  nav a {
    font-size: 13px;
    padding: 6px 8px;
  }

  .time {
    align-self: flex-end;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 6px;
  }

  /* Window behavior */
  .mac-window {
    position: fixed !important;
    top: 80px !important;
    left: 50% !important;
    transform: translateX(-50%) scale(1);
    width: 90% !important;
    height: auto !important;
    max-height: 70vh;
    overflow: hidden;
  }

  .window-body {
    max-height: 55vh;
    overflow-y: auto;
    padding: 20px;
  }

  .window-body h3 {
    font-size: 16px;
  }

  .window-body p {
    font-size: 12px;
    line-height: 1.5;
  }

  /* Gallery */
  .gallery-slider {
    height: auto;
    padding: 20px 10px 10px;
    overflow-x: auto;
  }

  .gallery-title {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 10px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 1px;
  }

  .gallery-track {
    animation: none;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: scroll;
    scroll-behavior: smooth;
    padding: 0 10px;
  }

  .gallery-item {
    width: 140px;
    height: 80px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px 14px;
  }

  .logo {
    font-size: 12px;
  }

  nav a {
    font-size: 12px;
  }

  .mac-window {
    width: 95% !important;
    top: 70px !important;
  }

  .window-body {
    padding: 15px;
  }

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
}