/* ==========================================================================
   Material Design 3 Dark Theme & Typography Base
   ========================================================================== */
:root {
  --md-sys-color-background: #121318;
  --md-sys-color-on-background: #e2e2e9;
  --md-sys-color-surface: #1a1b20;
  --md-sys-color-surface-variant: #282a31;
  --md-sys-color-on-surface: #e2e2e9;
  --md-sys-color-on-surface-variant: #c5c6d0;
  --md-sys-color-primary: #adc6ff;
  --md-sys-color-on-primary: #002e69;
  --md-sys-color-primary-container: #1e4480;
  --md-sys-color-on-primary-container: #d9e2ff;
  --md-sys-color-outline: #8f909a;
  --md-sys-color-error: #ffb4ab;
  --md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
  --md-elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  font-family: 'Roboto', 'Segoe UI', 'Tahoma', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  text-align: center;
  padding: 40px 16px 24px;
}

.app-icon {
  width: 120px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  transition: transform 0.2s ease;
}

.app-icon:hover {
  transform: scale(1.05);
}

h1 {
  font-size: 2.5rem;
  font-weight: 500;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
  color: var(--md-sys-color-on-background);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--md-sys-color-primary);
  margin-bottom: 32px;
  font-weight: 400;
}

/* ==========================================================================
   Material Cards & Lists
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--md-elevation-1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--md-elevation-2);
  transform: translateY(-2px);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--md-sys-color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin-bottom: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

li::marker {
  color: var(--md-sys-color-primary);
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

code {
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88em;
  word-break: break-all;
}

/* Google Play Store Button Section */
.store-section {
  text-align: center;
  margin: 40px auto;
}

.store-btn {
  display: inline-block;
  max-width: 180px;
  transition: transform 0.2s ease;
}

.store-btn img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.store-btn:hover {
  transform: scale(1.05);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  margin: 3px 2px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.download-btn:hover {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.github-link {
  display: block;
  text-align: center;
  margin-top: -16px;
  margin-bottom: 48px;
  font-size: 0.95rem;
}

/* ==========================================================================
   Multi-column Features (Chips style for lists)
   ========================================================================== */
.features-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .features-container {
    grid-template-columns: 2fr 1fr;
  }
}

.locale-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0;
  list-style: none;
}

.locale-grid li {
  margin: 0;
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--md-sys-color-surface);
  text-align: left;
}

th {
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-primary);
  font-weight: 500;
  padding: 12px 16px;
  font-size: 0.95rem;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Screenshots Gallery System
   ========================================================================== */
.gallery-section {
  margin-bottom: 48px;
}

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

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: pointer;
  box-shadow: var(--md-elevation-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #000;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--md-elevation-2);
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  line-height: 1;
}

/* Slide controls */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 24px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
  user-select: none;
}

.lightbox-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: -64px;
}

.lightbox-next {
  right: -64px;
}

@media (max-width: 768px) {
  .lightbox-prev { left: 8px; background-color: rgba(0,0,0,0.5); }
  .lightbox-next { right: 8px; background-color: rgba(0,0,0,0.5); }
  .lightbox-close { right: 12px; top: 12px; position: fixed; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  margin-top: 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}

.footer-nav a {
  color: var(--md-sys-color-primary);
}