
/* =========================================
   AYO NGAJI PWA v2
   Desain utama
   Warna: Teal, Putih, dan Emas
========================================= */

:root {
  --teal: #008F7A;
  --teal-dark: #006F60;
  --teal-light: #E7F5F1;

  --white: #FFFFFF;
  --gold: #D6AD45;
  --gold-light: #F8F0D9;

  --text-main: #23483B;
  --text-secondary: #687D75;
  --border: #E4ECE8;
  --background: #F7FAF8;

  --success: #21834A;
  --danger: #B3261E;

  --radius-card: 18px;
  --radius-button: 12px;

  --shadow-card:
    0 4px 18px rgba(0, 80, 65, 0.06);
}

/* RESET */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;

  background: var(--background);
  color: var(--text-main);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;

  font-size: 15px;
  line-height: 1.6;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* HEADER */

.app-header {
  width: 100%;
  background: var(--teal);
  color: var(--white);

  border-bottom: 3px solid var(--gold);
}

.header-inner {
  width: min(100% - 32px, 960px);
  min-height: 76px;
  margin: 0 auto;

  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-name {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.brand-subtitle {
  font-size: 12px;
  opacity: 0.88;
}

/* MAIN LAYOUT */

.app-main {
  width: min(100% - 32px, 760px);
  margin: 28px auto 48px;
}

section {
  margin-bottom: 28px;
}

/* WELCOME */

.welcome-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-card);

  padding: 22px 24px;
  box-shadow: var(--shadow-card);

  animation: fade-slide-in 0.45s ease both;
}

.welcome-label {
  margin: 0 0 3px;
  color: var(--teal);
  font-size: 17px;
  font-weight: 600;
}

.welcome-card h1 {
  margin: 0;
  color: var(--teal-dark);

  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;

  overflow-wrap: anywhere;
}

.welcome-message {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* SECTION HEADINGS */

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  color: var(--text-main);

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

.section-heading p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* LEVEL LIST */

.level-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.level-card {
  width: 100%;
  min-height: 90px;

  display: flex;
  align-items: center;
  gap: 14px;

  padding: 16px;
  text-align: left;

  color: var(--text-main);
  background: var(--white);

  border: 1px solid var(--border);
  border-radius: var(--radius-card);

  box-shadow: var(--shadow-card);
  cursor: pointer;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.level-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.level-card:active {
  transform: scale(0.985);
}

.level-number {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  display: grid;
  place-items: center;

  color: var(--teal-dark);
  background: var(--gold-light);

  border: 1px solid var(--gold);
  border-radius: 13px;

  font-size: 15px;
  font-weight: 750;
}

.level-info {
  min-width: 0;
}

.level-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

.level-description {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

/* THEME LIST */

.theme-list {
  display: grid;
  gap: 10px;
}

.theme-card {
  width: 100%;
  min-height: 66px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 14px 16px;

  color: var(--text-main);
  background: var(--white);

  border: 1px solid var(--border);
  border-radius: 14px;

  text-align: left;
  cursor: pointer;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.theme-card:hover {
  background: var(--teal-light);
  border-color: var(--teal);
}

.theme-card:active {
  transform: scale(0.99);
}

.theme-name {
  font-size: 14px;
  font-weight: 650;
}

.theme-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

.theme-arrow {
  color: var(--teal);
  font-size: 20px;
}

/* AUDIO SECTION */

.audio-list {
  display: grid;
  gap: 12px;
}

.audio-card {
  padding: 16px;
  background: var(--white);

  border: 1px solid var(--border);
  border-radius: var(--radius-card);

  box-shadow: var(--shadow-card);
}

.audio-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.audio-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.audio-status {
  color: var(--text-secondary);
  font-size: 12px;
}

.audio-button {
  width: 100%;
  min-height: 46px;

  padding: 11px 14px;

  border: 1px solid var(--teal);
  border-radius: var(--radius-button);

  color: var(--white);
  background: var(--teal);

  font-weight: 650;
  cursor: pointer;

  transition:
    background 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.audio-button:hover:not(:disabled) {
  background: var(--teal-dark);
}

.audio-button:active:not(:disabled) {
  transform: scale(0.985);
}

.audio-button:disabled {
  color: #84918C;
  background: #E9EEEB;
  border-color: #DCE4DF;
  cursor: not-allowed;
}

/* DOWNLOAD BUTTON */

.download-button {
  width: 100%;
  min-height: 48px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;

  margin-top: 14px;
  padding: 12px 16px;

  color: var(--teal-dark);
  background: var(--gold-light);

  border: 1px solid var(--gold);
  border-radius: var(--radius-button);

  font-weight: 700;
  cursor: pointer;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.download-button:hover:not(:disabled) {
  background: #F3E4B9;
}

.download-button:active:not(:disabled) {
  transform: scale(0.985);
}

.download-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* PROGRESS */

.progress-container {
  margin-top: 14px;
}

.progress-track {
  width: 100%;
  height: 9px;

  overflow: hidden;

  background: #E7EDE9;
  border-radius: 20px;
}

.progress-fill {
  width: 0;
  height: 100%;

  background: var(--teal);
  border-radius: inherit;

  transition: width 0.25s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  margin-top: 7px;

  color: var(--text-secondary);
  font-size: 12px;
}

/* STATUS MESSAGES */

.loading-message,
.empty-message {
  padding: 20px;
  color: var(--text-secondary);
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.success-message {
  padding: 12px 14px;
  color: var(--success);
  background: #E8F5EC;
  border-radius: 12px;
  font-size: 13px;
}

.error-message {
  padding: 12px 14px;
  color: var(--danger);
  background: #FCE8E6;
  border-radius: 12px;
  font-size: 13px;
}

/* FOOTER */

.app-footer {
  padding: 20px 16px;
  text-align: center;

  color: var(--text-secondary);
  font-size: 12px;

  border-top: 1px solid var(--border);
}

/* ANIMATIONS */

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MOBILE */

@media (max-width: 480px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-name {
    font-size: 19px;
  }

  .app-main {
    width: calc(100% - 24px);
    margin-top: 20px;
  }

  .welcome-card {
    padding: 18px;
  }

  .welcome-label {
    font-size: 16px;
  }

  .welcome-card h1 {
    font-size: 19px;
  }

  .welcome-message {
    font-size: 13px;
  }

  .level-list {
    grid-template-columns: 1fr;
  }

  .level-card {
    min-height: 78px;
  }

  .section-heading h2 {
    font-size: 18px;
  }
}

/* REDUCE MOTION */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
