/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #050a07;
}

a {
  text-decoration: none;
}

.custom-header {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* --- 1. Top Bar --- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffb900;
  padding: 8px 30px;
  font-size: 12px;
  border-bottom: 2px solid #000;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.text-gray { color: #8a9c90; }
.text-white { color: #e6f0ea; }
.fw-bold { font-weight: bold; }
.divider { color: #2a3d31; margin: 0 5px; }

.top-bar-left a:hover {
  color: #00ff66; 
}

/* Toggle Switch */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #314d3d;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 2px; bottom: 2px;
  background-color: #a8c4b2;
  transition: .4s;
}
input:checked + .slider { background-color: #00e65c; }
input:checked + .slider:before { transform: translateX(16px); background-color: #000; }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Custom Selects */
.custom-select {
  background-color: #1a2e22;
  color: #a8c4b2;
  border: 1px solid #2d4f3b;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* --- PANEL MEKANIK --- */
.mechanical-panel {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 3px solid #000;
}

/* Baut (Screws) */
.screw {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a4b5ad 0%, #6e8076 50%, #3e4a43 100%);
  box-shadow: 
    inset 1px 1px 2px rgba(255,255,255,0.6), 
    inset -1px -1px 2px rgba(0,0,0,0.6), 
    1px 1px 3px rgba(0,0,0,0.9);
  z-index: 10;
}
.screw::after, .screw::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  background: rgba(0,0,0,0.7);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.screw::after {
  width: 8px; height: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.screw::before {
  width: 2px; height: 8px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.top-left { top: 8px; left: 15px; }
.top-right { top: 8px; right: 15px; }
.bottom-left { bottom: 8px; left: 15px; }
.bottom-right { bottom: 8px; right: 15px; }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  color: #ff9900;
  font-size: 24px;
  cursor: pointer;
}

/* --- 2. Main Header --- */
.main-header {
  background: linear-gradient(180deg, #ffdb00, #ffdb00, #ffdb00);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 45px;
  gap: 20px;
}

.logo-text {
  font-size: 24px;
  color: #ff9900;
  font-style: italic;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 219, 0, 0.5);
  white-space: nowrap;
}
.logo-accent {
  color: #00ff40;
}

.search-area {
  display: flex;
  flex: 1;
  max-width: 600px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 1px 1px rgba(255,255,255,0.1);
}
.search-input {
  width: 100%;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-size: 14px;
  background-color: #1e3326;
  color: #e6f0ea;
}
.search-input::placeholder { color: #6b8a77; }

.search-btn {
  background: linear-gradient(180deg, #00b33c 0%, #00802b 100%);
  border: none;
  border-left: 1px solid #004d1a;
  color: white;
  padding: 0 20px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.2s;
}
.search-btn:hover {
  background: linear-gradient(180deg, #00e64d 0%, #00b33c 100%);
}

.user-actions {
  display: flex;
  gap: 25px;
  color: #a8c4b2;
}
.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 5px;
  font-size: 10px;
  font-weight: bold;
}
.action-item:hover {
  color: #00ff66;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}
.text-2xl { font-size: 20px; }
.text-xs { font-size: 10px; margin-left: 3px; }

/* --- 3. Navigation Bar --- */
.nav-bar {
  background: linear-gradient(90deg, #0b7d35, #34d399);
  display: flex;
  align-items: center;
  padding: 15px 45px;
}

.nav-brand {
  color: #00ff40;
  font-weight: 900;
  font-size: 16px;
  margin-right: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #8bb39b;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 255, 64, 0.8), 0 1px 2px #000;
}

/* --- 4. Subtitle / Marquee --- */
.subtitle-marquee {
  background: linear-gradient(90deg, #ff8c00, #ffb300);
  border-top: 1px solid #1a3b25;
  border-bottom: 2px solid #000;
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  color: #000000;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.marquee-container {
  display: flex;
  width: 100%;
}
.marquee-text {
  display: flex;
  padding-left: 100%;
  animation: marquee 30s linear infinite;
}
.marquee-text span {
  padding-right: 50px; 
}
.marquee-container:hover .marquee-text {
  animation-play-state: paused;
}
@keyframes marquee {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* =========================================
   RESPONSIVE (MOBILE) - LAYAR < 768px
========================================= */
@media screen and (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .top-bar {
    padding: 8px 15px;
  }

  .main-header {
    flex-wrap: wrap; /* Izinkan elemen turun ke baris baru */
    padding: 15px;
    gap: 15px;
  }

  /* Munculkan Tombol Menu Hamburger */
  .mobile-menu-btn {
    display: block;
    order: 1; /* Posisi paling kiri */
  }

  /* Logo ditengah di mobile */
  .logo-area {
    order: 2;
    flex-grow: 1;
    text-align: center;
  }

  /* Kotak pencarian turun ke baris baru dan full width */
  .search-area {
    order: 3;
    flex-basis: 100%;
    margin-top: 5px;
  }

  /* Menyembunyikan Navbar dan membuatnya tampil ke bawah (Dropdown) */
  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    display: none; /* Sembunyikan secara default di HP */
    transition: max-height 0.3s ease-in-out;
  }
  
  /* Class tambahan untuk memunculkan navbar lewat JavaScript */
  .nav-bar.active-mobile {
    display: block;
    padding: 15px;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }
  
  .nav-links a {
      display: block;
      padding: 5px 0;
      border-bottom: 1px solid rgba(0,0,0,0.2);
  }

  .screw {
    display: none; /* Sembunyikan baut di layar kecil agar tidak menimpa elemen */
  }
}