/* ===== DASAR (Mobile First) ===== */
:root {
  --bg-color-main-header: #000000;
  --border-color: #e9e9e9;
  --lead-text-color: #e9e9e9;
  --nav-logo: url("../../img/LC/umm2.png");
  --img-windows: url("../../img/LC/app/Windows.png");
  --img-macos: url("../../img/LC/app/macOS-dark.png");
  --img-android: url("../../img/LC/app/Android.png");
  --img-ios: url("../../img/LC/app/iOS-dark.png");
  --img-linux: url("../../img/LC/app/Linux.png");
}

@media (prefers-color-scheme: dark) {
  :root {
    --nav-logo: url("../../img/LC/umm2.png");
    --img-macos: url("../../img/LC/app/macOS-dark.png");
    --img-ios: url("../../img/LC/app/iOS-dark.png");
    --bg-color-main-header: #000000;
    --border-color: #e9e9e9;
    --lead-text-color: #e9e9e9;
  }
}

body {
  background-color: #000000 !important;
  color: #ffffff;
  margin: 0;
  font-family: sans-serif;
}

.main {
  background-color: #000000 !important;
  color: #ffffff;
  padding: 1rem;
}

/* ===== NAVBAR (Mobile First) ===== */
nav {
  background-image: var(--nav-logo);
  background-repeat: no-repeat;
  background-size: 140px 35px;
  background-position: 10px 50%;
  height: 60px;
  background-color: #d32f2f !important;
  border-bottom: 3px solid #710000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  position: relative;
  z-index: 1000;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.5rem;
  height: 100%;
  align-items: center;
  margin-left: auto;
}

nav ul li {
  margin: 0 5px;
  display: flex;
  align-items: center;
}

nav a,
nav ul li a,
nav ul li form button {
  color: white !important;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: normal;
  white-space: nowrap;
}

nav a:hover,
nav ul li form button:hover {
  text-decoration: underline;
}

/* ===== HEADER ===== */
header.main h1 {
  background-color: var(--bg-color-main-header) !important;
  color: white !important;
}

/* ===== TEKS ===== */
p.lead {
  color: var(--lead-text-color);
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  margin: 1rem 0 0.5rem;
}

p {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== APPS ===== */
ul.apps {
  list-style: none;
  padding: 0;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

ul.apps li {
  display: block;
  padding: 0.5rem;
  transition: transform 0.2s ease;
  flex: 0 1 auto;
}

ul.apps li:hover {
  transform: translateY(-6px);
}

ul.apps li a {
  display: block;
  background-repeat: no-repeat;
  background-size: 48px 48px;
  background-position: 50% 0;
  min-height: calc(48px + 2rem);
  padding: calc(48px + 0.5rem) 0 0 0;
  min-width: 48px;
  color: #e9e9e9;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}

ul.apps li a.Windows { background-image: var(--img-windows); }
ul.apps li a.macOS   { background-image: var(--img-macos); }
ul.apps li a.Android { background-image: var(--img-android); }
ul.apps li a.iOS     { background-image: var(--img-ios); }
ul.apps li a.Linux   { background-image: var(--img-linux); }

ul.apps h5 {
  width: 100%;
  margin: 1rem 0 0;
  font-size: 14px;
  color: #ddd;
}
ul.apps h5 a {
  color: #fff;
  text-decoration: underline;
  background: none;
  padding: 0;
  min-height: auto;
  display: inline;
  font-size: inherit;
}

/* ===== TABLET (min-width: 600px) ===== */
@media screen and (min-width: 600px) {
  nav {
    background-size: 180px 45px;
    background-position: 20px 50%;
    height: 70px;
    padding: 0 20px;
  }
  nav ul {
    margin-left: calc(180px + 40px);
  }
  nav a,
  nav ul li a,
  nav ul li form button {
    font-size: 16px;
  }

  p.lead {
    font-size: 24px;
  }
  p {
    font-size: 18px;
  }

  ul.apps li a {
    background-size: 64px 64px;
    min-height: calc(64px + 2em);
    padding: calc(64px + 0.5em) 0 0 0;
    min-width: 64px;
    font-size: 16px;
  }
  ul.apps li {
    padding: 1em;
  }
}

/* ===== DESKTOP (min-width: 800px) ===== */
@media screen and (min-width: 800px) {
  nav ul {
    margin-left: calc(180px + 40px);
  }
  ul.apps {
    gap: 1.5rem;
  }
  ul.apps li {
    padding: 2em;
  }
}

/* ===== PERBAIKAN TAMPILAN MOBILE (≤600px) ===== */
@media screen and (max-width: 600px) {
  /* Navbar: logo di atas, menu di bawah */
  nav {
    flex-direction: column;
    height: auto;
    background-position: center 10px;
    background-size: 120px 30px;
    padding: 45px 5px 5px 5px;
    justify-content: center;
    align-items: stretch;
  }

  nav ul {
    margin-left: 0;
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 5px 0;
  }

  nav ul li {
    margin: 0 3px;
  }

  nav a,
  nav ul li a,
  nav ul li form button {
    font-size: 12px;
    padding: 0 2px;
  }

  /* Teks sambutan */
  p.lead {
    font-size: 18px;
    line-height: 1.3;
    margin: 0.5rem 0 0.2rem;
    padding: 0 10px;
  }

  p {
    font-size: 14px;
    line-height: 1.4;
    padding: 0 10px;
  }

  /* Daftar aplikasi menjadi grid 2 kolom */
  ul.apps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0 10px;
  }

  ul.apps li {
    padding: 0;
    transform: none;
  }

  ul.apps li a {
    background-size: 40px 40px;
    min-height: calc(40px + 2rem);
    padding: calc(40px + 0.5rem) 0 0 0;
    font-size: 12px;
    word-break: break-word;
  }

  /* Link eksternal - pastikan di tengah */
  ul.apps h5 {
    grid-column: span 2;
    margin: 0.5rem 0 0;
    font-size: 12px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
  }
}