:root {
  /* Matches app/src/main/res/values/colors.xml */
  --color-primary: #100a0e;
  --color-primary-dark: #0a080c;
  --color-primary-mid: #16101a;
  --app-black: #09090f;
  --app-accent: #f64136;
  --app-accent-stroke: #a9201c;
  --app-accent-soft: rgba(246, 65, 54, 0.12);
  --text: #dddddd;
  --text-muted: #7a7a7d;
  --text-white: #ffffff;
  --card-bg: rgba(22, 22, 29, 0.7);
  --card-border: rgba(255, 255, 255, 0.2);
  --input-bg: #16161d;
  --input-border: #3e3e43;
  --danger: #ff7b7b;
  --success: #7dffb0;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font: "Outfit", system-ui, sans-serif;

  /* Typography — matches GitaText* styles (sp ≈ px on web) */
  --text-screen-title: 2rem;
  --text-section-title: 1.125rem;
  --text-body: 0.875rem;
  --text-button: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(246, 65, 54, 0.1) 0%, rgba(246, 65, 54, 0) 42%),
    linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 45%, var(--color-primary-mid) 100%);
  background-color: var(--color-primary);
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--app-accent);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Typography utilities */
.text-screen-title {
  font-size: clamp(1.75rem, 4vw, var(--text-screen-title));
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

.text-section-title {
  font-size: var(--text-section-title);
  font-weight: 600;
  color: var(--text);
}

.text-body {
  font-size: var(--text-body);
  color: var(--text-muted);
  line-height: 1.65;
}

.text-button {
  font-size: var(--text-button);
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(16, 10, 14, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: env(safe-area-inset-top);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.brand-mark-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  line-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  padding: 0;
  margin: 0;
  border: none;
  background: #000;
}

.logo-tile {
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  line-height: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-tile-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.logo-tile-md {
  width: 48px;
  height: 48px;
}

.logo-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  padding: 0;
  margin: 0;
  border: none;
  background: #000;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 999px;
}

.nav-link:hover {
  color: var(--app-accent);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.hero-features {
  margin-top: 28px;
}

.feature-item-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.feature-item-desc {
  margin: 4px 0 0;
}

.section-heading {
  font-size: clamp(1.5rem, 4vw, 1.75rem);
}

.btn-block-sm {
  min-height: 48px;
}

.cta-copy {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cta-band p.text-body {
  margin: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  border-radius: 999px;
  padding: 12px 20px;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--app-accent);
  color: var(--text-white);
  font-weight: 600;
  font-size: var(--text-button);
  box-shadow: 0 8px 24px rgba(246, 65, 54, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: var(--text-white);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 500;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.btn-danger {
  background: rgba(255, 123, 123, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 123, 123, 0.35);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
}

.phone-showcase {
  grid-column: 2;
  grid-row: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(22, 22, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--app-accent);
  box-shadow: 0 0 10px rgba(246, 65, 54, 0.55);
  flex-shrink: 0;
}

.hero h1 {
  margin: 0 0 16px;
}

.hero p.lead {
  margin: 0 0 28px;
  max-width: 52ch;
}

.hero-actions-desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.header-download-btn {
  display: none;
}

.btn-download-highlight {
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(246, 65, 54, 0.38);
}

/* Phone mockup — hero */
.phone-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.device-frame {
  position: relative;
  width: min(280px, 78vw);
  padding: 12px;
  border-radius: 36px;
  background: linear-gradient(160deg, rgba(22, 22, 29, 0.95), rgba(9, 9, 15, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow), 0 0 0 1px rgba(246, 65, 54, 0.08);
}

.device-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  border-radius: 999px;
  background: var(--app-black);
  z-index: 2;
}

.device-screen {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: var(--app-black);
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.35s ease;
}

.device-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.device-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.2s, transform 0.2s;
}

.device-dot.active {
  background: var(--app-accent);
  transform: scale(1.15);
}

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

.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  flex-shrink: 0;
  font-size: 0.9rem;
}

.section {
  padding: 24px 0 56px;
}

.section-title {
  margin: 0 0 10px;
}

.section-subtitle {
  margin: 0 0 28px;
  max-width: 60ch;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: var(--text-section-title);
  font-weight: 600;
  color: var(--text-white);
}

.feature-card p {
  margin: 0;
}

/* Screenshot gallery */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.screenshot-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.screenshot-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 65, 54, 0.35);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
}

.cta-band {
  margin: 12px 0 72px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(246, 65, 54, 0.14), rgba(22, 22, 29, 0.6));
  border: 1px solid rgba(246, 65, 54, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-band h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-white);
}

.site-footer {
  padding: 28px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Admin */
.admin-shell {
  padding: 28px 0 56px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-top h1 {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 600;
}

.admin-user {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.login-panel {
  max-width: 440px;
  margin: 80px auto;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-panel h1 {
  margin: 0 0 10px;
  font-size: 1.625rem;
  font-weight: 600;
}

.login-panel p {
  margin: 0 0 24px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-google:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-google-icon {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--app-accent);
}

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

.panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel.full {
  grid-column: 1 / -1;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: var(--text-section-title);
  font-weight: 600;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.field label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.switch-row:last-child {
  border-bottom: none;
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: rgba(246, 65, 54, 0.55);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.plan-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(16, 10, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(255, 123, 123, 0.45);
  color: var(--danger);
}

.toast.success {
  border-color: rgba(125, 255, 176, 0.35);
  color: var(--success);
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .admin-grid,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .row-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1120px, calc(100% - 24px));
  }

  .site-header .inner {
    flex-wrap: nowrap;
    padding: 14px 0;
    gap: 12px;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .header-download-btn {
    display: inline-flex;
    flex-shrink: 0;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-links {
    display: none !important;
  }

  .hero {
    padding: 8px 0 28px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }

  .phone-showcase {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    margin: 0 auto 12px;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-actions-desktop {
    display: none;
  }

  .hero-badge {
    order: 1;
    margin: 0 auto 14px;
  }

  .hero-copy h1 {
    order: 2;
    font-size: clamp(1.65rem, 6.5vw, 2rem);
    line-height: 1.2;
    max-width: 18ch;
    margin: 0 auto 12px;
  }

  .hero-copy .lead {
    order: 3;
    margin: 0 auto 20px;
    max-width: 34ch;
    font-size: 0.9rem;
  }

  .hero-features {
    order: 4;
    width: 100%;
    text-align: left;
  }

  .device-frame {
    width: min(220px, 68vw);
    padding: 10px;
    border-radius: 32px;
    margin: 0 auto;
  }

  .device-notch {
    width: 72px;
    height: 18px;
    top: 16px;
  }

  .device-screen {
    border-radius: 24px;
  }

  .device-dots {
    margin-top: 12px;
  }

  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }

  .btn-block-sm {
    width: 100%;
  }

  .features-grid,
  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .screenshot-card img {
    max-height: 420px;
  }

  .section {
    padding: 20px 0 40px;
  }

  .section-subtitle {
    margin-bottom: 20px;
  }

  .cta-band {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    margin-bottom: 48px;
    text-align: center;
  }

  .cta-copy {
    flex-direction: column;
    text-align: center;
  }

  .cta-btn {
    width: 100%;
  }

  .device-dot {
    width: 10px;
    height: 10px;
  }

  .admin-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-top {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-top .btn {
    width: 100%;
  }

  .login-panel {
    margin: 40px auto;
    padding: 24px 20px;
  }

  .plan-row {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .brand-name {
    max-width: 130px;
    font-size: 0.95rem;
  }

  .header-download-btn {
    padding: 9px 14px;
    font-size: 0.8rem;
  }

  .text-screen-title {
    font-size: 1.5rem;
  }

  .device-frame {
    width: min(200px, 72vw);
  }
}
