* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #111827;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1150px;
  margin: auto;
  min-height: 70px;
  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #111827;
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand span {
  display: block;
  color: #6b7280;
  font-size: 11px;
}

.menu-button {
  border: 0;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
}

.nav {
  display: none;
}

.nav a {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.nav a:hover {
  color: #111827;
}


/* HERO */

.hero {
  background: #111827;
  color: white;
  padding: 75px 20px 80px;
}

.hero-content {
  max-width: 850px;
  margin: auto;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 12px;

  border: 1px solid #374151;
  border-radius: 999px;

  color: #d1d5db;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(36px, 9vw, 68px);
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero h1 span {
  display: block;
  color: #9ca3af;
}

.hero p {
  max-width: 600px;
  margin: 24px 0;
  color: #d1d5db;
  font-size: 16px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;

  padding: 13px 19px;

  border-radius: 10px;
  background: white;
  color: #111827;

  font-size: 14px;
  font-weight: 700;
}

.hero-button span {
  font-size: 20px;
}


/* SECTION */

.section {
  max-width: 1150px;
  margin: auto;
  padding: 60px 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.section-label {
  display: block;
  margin-bottom: 6px;

  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.section h2 {
  font-size: 30px;
  line-height: 1.15;
}

.camera-count {
  color: #6b7280;
  font-size: 12px;
}


/* CAMERA */

.camera-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.camera-card {
  overflow: hidden;

  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;

  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.06);
}

.camera-preview {
  min-height: 190px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #1f2937;
  color: #9ca3af;

  position: relative;
}

.camera-placeholder {
  text-align: center;
}

.camera-placeholder-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.camera-placeholder p {
  font-size: 13px;
}

.camera-status {
  position: absolute;
  top: 12px;
  left: 12px;

  padding: 5px 9px;

  border-radius: 999px;

  background: #374151;
  color: white;

  font-size: 10px;
  font-weight: 700;
}

.camera-info {
  padding: 18px;
}

.camera-name {
  font-size: 19px;
  font-weight: 800;
}

.camera-location {
  margin-top: 3px;
  color: #6b7280;
  font-size: 13px;
}

.camera-actions {
  margin-top: 16px;

  display: flex;
  gap: 8px;
}

.camera-button {
  flex: 1;

  border: 1px solid #d1d5db;
  border-radius: 9px;

  padding: 10px;

  background: white;
  color: #111827;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

.camera-button.primary {
  background: #111827;
  color: white;
  border-color: #111827;
}


/* LOADING */

.loading-card {
  min-height: 180px;

  grid-column: 1 / -1;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;

  color: #6b7280;
}

.loading-spinner {
  width: 30px;
  height: 30px;

  margin-bottom: 12px;

  border: 3px solid #e5e7eb;
  border-top-color: #111827;
  border-radius: 50%;

  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* LOCATION */

.location-section {
  padding-top: 20px;
}

.location-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;

  padding: 22px;

  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}

.location-icon {
  font-size: 30px;
}

.location-card h3 {
  font-size: 18px;
}

.location-card p {
  margin-top: 5px;
  color: #6b7280;
  font-size: 14px;
}


/* ABOUT */

.about-section {
  padding-top: 25px;
}

.about-section p {
  max-width: 700px;
  margin-top: 12px;
  color: #6b7280;
}


/* FOOTER */

.footer {
  margin-top: 20px;
  padding: 35px 18px;

  background: #111827;
  color: white;

  text-align: center;
}

.footer p {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 13px;
}

.footer small {
  display: block;
  margin-top: 18px;
  color: #6b7280;
}


/* DESKTOP */

@media (min-width: 768px) {

  .menu-button {
    display: none;
  }

  .nav {
    display: flex;
    gap: 28px;
  }

  .hero {
    padding: 110px 30px 120px;
  }

  .section {
    padding: 80px 25px;
  }

  .camera-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (min-width: 1050px) {

  .camera-grid {
    grid-template-columns: repeat(3, 1fr);
  }

}

/* =========================================
   LIVE CCTV HLS
   ========================================= */

.live-camera-card {
  overflow: hidden;
}

.camera-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1220;
  overflow: hidden;
}

.camera-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1220;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: rgba(11, 18, 32, 0.75);
  color: #ffffff;
  font-size: 13px;
  z-index: 2;
}

.video-overlay .loading-spinner {
  width: 28px;
  height: 28px;
}

.status-live {
  background: #16803c !important;
}

.status-offline {
  background: #b42318 !important;
}

.camera-live-button {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .camera-video-wrapper {
    aspect-ratio: 16 / 9;
  }

  .camera-live-button {
    min-height: 44px;
  }
}
