:root {
  --bg-page: #000;
  --bg-inner: #fff;
  --bg-meta: #0a4a26;
  --bg-nav: #002311;
  --green: #0a9a4a;
  --green-light: #13b75a;
  --text-primary: #ffffff;
  --text-meta: #ffffff;
  --placeholder-bg: #e8e8e8;
  --placeholder-text: #b5b5b5;
  --frame-width: 430px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  -webkit-font-smoothing: antialiased;
}

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

.app {
  max-width: var(--frame-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
}

/* ===== Top Header ===== */
.top-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--bg-page);
  color: var(--text-primary);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-primary);
  border-radius: 6px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  background: var(--green);
  color: var(--text-primary);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transition: background 150ms ease;
  white-space: nowrap;
}

.register-btn:hover {
  background: var(--green-light);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 48px;
  text-align: center;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: 60vw;
  object-fit: contain;
  display: block;
  background: transparent;
}

.logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  color: #777;
  border: 1px dashed #555;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 1px;
}

/* ===== Section Header (All Promotions) ===== */
.section-header {
  position: relative;
  background: var(--bg-page);
}

.section-toggle {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--green);
  color: var(--text-primary);
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.section-toggle .arrow {
  transition: transform 200ms ease;
}

.section-header.open .section-toggle .arrow {
  transform: rotate(180deg);
}

.dropdown {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
}

.section-header.open .dropdown {
  max-height: 200px;
}

.dropdown li a {
  display: block;
  padding: 14px 22px;
  color: var(--text-primary);
  font-size: 15px;
  border-bottom: 1px solid #1a1a1a;
}

.dropdown li:last-child a {
  border-bottom: none;
}

.dropdown li a:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ===== Content / Promo Cards ===== */
.content {
  flex: 1;
  background: #000;
}

.promo-list {
  background: #000;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-card {
  background: var(--bg-inner);
  border-radius: 4px;
  overflow: hidden;
}

.banner-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 220;
  object-fit: cover;
  background: var(--placeholder-bg);
}

.banner-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  font-size: 28px;
  letter-spacing: 1px;
  width: 100%;
  aspect-ratio: 1000 / 220;
}

.promo-meta {
  background: var(--bg-meta);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  min-height: 44px;
}

.promo-title {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-meta);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  word-break: break-word;
}

.detail-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-meta);
  background: transparent;
  border: 1px solid var(--green-light);
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.detail-btn:hover {
  background: var(--green);
  color: #fff;
}

/* ===== Detail Expand Block ===== */
.detail {
  background: #000;
  color: #fff;
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease;
}

.detail[hidden] {
  display: none;
}

.promo-card.expanded .detail {
  max-height: 900px;
}

.detail-heading {
  margin: 0;
  padding: 14px 16px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.2px;
}

.detail-list {
  margin: 0;
  padding: 4px 16px 16px 32px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #fff;
}

.detail-list li {
  margin-bottom: 6px;
}

.detail-list li:last-child {
  margin-bottom: 0;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  background: var(--bg-nav);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px 0;
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1;
  min-height: 56px;
}

.nav-item:hover {
  color: var(--green-light);
}

.nav-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav-item-raised {
  position: relative;
  z-index: 11;
}

.nav-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-nav);
}

.nav-item-raised .nav-icon-circle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
}

.masuk-icon {
  width: 48px;
  height: 48px;
  filter: brightness(0) invert(1);
}

.nav-item-raised .nav-label {
  margin-top: 27px;
}

.nav-label {
  font-size: 11px;
  letter-spacing: 0.1px;
}

/* ===== Desktop / Wide View (>= 768px) ===== */
@media (min-width: 768px) {
  .app {
    max-width: 1200px;
    margin: 0 auto;
  }
  .bottom-nav {
    display: none;
  }

  .content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
  }

  .section-header {
    grid-column: 1;
    position: sticky;
    top: 16px;
    align-self: start;
  }
  .section-toggle {
    display: none;
  }

  .dropdown {
    max-height: none;
    overflow: visible;
    background: #000;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
    padding: 6px 0;
    margin: 16px 12px 0 16px;
  }
  .dropdown li a {
    padding: 12px 18px;
    font-size: 14px;
    border-bottom: 1px solid #1a1a1a;
    color: var(--text-primary);
  }
  .dropdown li:last-child a {
    border-bottom: none;
  }
  .dropdown li a:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  .dropdown li a.active {
    color: var(--green-light);
    font-weight: 600;
  }

  .promo-list {
    grid-column: 2;
    padding: 16px 24px;
    gap: 16px;
  }
  .promo-card {
    border-radius: 6px;
  }
  .promo-meta {
    padding: 14px 16px;
    min-height: 52px;
  }
  .promo-title {
    font-size: 15px;
  }
  .detail-btn {
    height: 32px;
    font-size: 13px;
  }
}
