/* Material 3 Expressive Global Custom Tokens */
:root {
  /* Default fallbacks - overwritten dynamically by theme script */
  --primary: #0061A4;
  --on-primary: #FFFFFF;
  --primary-container: #D1E4FF;
  --on-primary-container: #001D36;
  --secondary: #535F70;
  --background: #F8F9FF;
  --surface: #FFFFFF;
  --on-surface: #191C20;
  --outline: #73777F;
  --glow: rgba(0, 97, 164, 0.15);

  /* Shape tokens */
  --shape-small: 8px;
  --shape-medium: 16px;
  --shape-large: 24px;
  --shape-extra-large: 28px;
  --shape-pill: 9999px;

  /* Animation tokens */
  --transition-snappy: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-short: 150ms;
  --duration-medium: 300ms;
  --duration-long: 500ms;
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--on-surface);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and Info/Edge */
  user-select: none; /* Standard syntax */
  transition: background-color var(--duration-long) var(--transition-snappy);
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Global Buttons (Material 3 Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--shape-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-medium) var(--transition-snappy);
  white-space: nowrap;
}

.btn .material-icons-outlined {
  font-size: 20px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 2px 8px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--glow);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  filter: brightness(0.96);
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--on-surface);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 60px;
  min-height: 70vh;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.badge {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--primary-container);
  color: var(--on-primary-container);
  padding: 6px 16px;
  border-radius: var(--shape-pill);
  display: inline-block;
  transition: all var(--duration-long) var(--transition-snappy);
}

.hero-title {
  font-size: 4.2rem;
  line-height: 1.1;
  color: var(--on-surface);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Logo Container (Material 3 Card) */
.logo-container {
  width: 280px;
  height: 280px;
  border-radius: var(--shape-extra-large); /* M3 Extra Large: 28px */
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 16px 48px 2px var(--glow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform var(--duration-medium) var(--transition-snappy), box-shadow var(--duration-medium) var(--transition-snappy);
}

.logo-container:hover {
  transform: scale(1.06);
  box-shadow: 0 32px 96px 16px var(--glow);
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24%;
}

/* Screenshots Gallery Section */
.screenshots-section {
  padding: 80px 0;
  background-color: rgba(0, 0, 0, 0.02);
}

.gallery-wrapper {
  overflow-x: auto;
  padding: 24px;
  scroll-snap-type: x mandatory;
}

.gallery-wrapper::-webkit-scrollbar {
  height: 8px;
}

.gallery-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.1);
  border-radius: 4px;
}

.gallery {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  scroll-snap-align: center;
}

.gallery-item img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform var(--duration-medium) var(--transition-snappy);
}

.gallery-item img:hover {
  transform: scale(1.05);
}

.gallery-item span {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
}

/* Feature Section */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 2.8rem;
  color: var(--on-surface);
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--secondary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* Card components using Material 3 outline & fill concepts */
.card {
  background-color: var(--surface);
  border-radius: var(--shape-large);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all var(--duration-medium) var(--transition-snappy);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

.card-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  flex-shrink: 0;
  border-radius: var(--shape-medium);
  background-color: var(--primary-container);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-long) var(--transition-snappy);
}

.card-icon .material-icons-outlined {
  font-size: 28px;
}

.card-title {
  font-size: 1.6rem;
  color: var(--on-surface);
}

.card-text {
  color: var(--secondary);
  font-size: 1.05rem;
}

/* Detailed Info Row Section */
.details-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.detail-row.reverse {
  flex-direction: row-reverse;
}

.detail-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-text h2 {
  font-size: 2.2rem;
  color: var(--on-surface);
}

.detail-text p {
  font-size: 1.1rem;
  color: var(--secondary);
}

.detail-text ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-text ul li {
  font-size: 1.05rem;
  color: var(--secondary);
  position: relative;
  padding-left: 24px;
}

.detail-text ul li::before {
  content: "•";
  color: var(--primary);
  font-size: 1.5rem;
  position: absolute;
  left: 4px;
  top: -4px;
}

.detail-graphic {
  width: 160px;
  height: 160px;
  flex: 0 0 160px;
  flex-shrink: 0;
  border-radius: var(--shape-extra-large);
  background-color: var(--primary-container);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.large-icon {
  font-size: 80px !important;
}

/* Install Steps Section */
.install-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.step-card {
  background-color: var(--surface);
  border-radius: var(--shape-medium);
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: var(--shape-pill);
  background-color: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-card h4 {
  font-size: 1.25rem;
  color: var(--on-surface);
}

.step-card p {
  color: var(--secondary);
}

/* Technical Specifications Table */
.specs-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
}

.specs-table-wrapper {
  background-color: var(--surface);
  border-radius: var(--shape-large);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th, .specs-table td {
  padding: 20px 24px;
  text-align: left;
  font-size: 1.05rem;
}

.specs-table th {
  background-color: rgba(0, 0, 0, 0.01);
  color: var(--on-surface);
  font-weight: 700;
  width: 30%;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.specs-table tr:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.specs-table td {
  color: var(--secondary);
}

/* License Details Section */
.license-info-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
}

.license-card {
  background-color: var(--surface);
  border-radius: var(--shape-extra-large);
  border: 2px solid var(--primary);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
}

.license-icon {
  font-size: 48px !important;
  color: var(--primary);
}

.license-card h2 {
  font-size: 2.2rem;
  color: var(--on-surface);
}

.license-card p {
  font-size: 1.1rem;
  color: var(--secondary);
  max-width: 600px;
  line-height: 1.7;
}

.license-matrix {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 500px;
  margin: 12px 0;
}

.matrix-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--shape-medium);
  font-weight: 600;
  font-size: 1.02rem;
  text-align: left;
}

.matrix-item.yes {
  background-color: #d1e7dd;
  color: #0f5132;
}

.matrix-item.no {
  background-color: #f8d7da;
  color: #842029;
}

.license-contact {
  font-size: 0.95rem !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 20px;
  width: 100%;
}

/* Footer Section */
.footer {
  background-color: rgba(0,0,0,0.03);
  padding: 60px 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--on-surface);
}

.footer-author {
  font-size: 0.85rem;
  color: var(--secondary);
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 0;
    gap: 40px;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-title {
    font-size: 3.2rem;
  }

  .detail-row {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .detail-row.reverse {
    flex-direction: column;
  }

  .detail-text ul {
    align-items: center;
  }

  .license-card {
    padding: 28px;
  }
}

@media (max-width: 600px) {
  /* Material 3 Expressive Carousel for Screenshots */
  .gallery-wrapper {
    padding: 12px 0;
    scroll-padding: 0 24px;
    -webkit-overflow-scrolling: touch;
  }
  
  .gallery-wrapper::-webkit-scrollbar {
    display: none; /* Hide scrollbar for clean M3 look */
  }

  .gallery {
    padding: 0 24px;
    gap: 16px;
  }

  .gallery-item {
    flex: 0 0 72%; /* Multi-browse spec: active item takes 72%, next item peek is visible */
    scroll-snap-align: start;
    align-items: flex-start;
  }

  .gallery-item img {
    border-radius: var(--shape-extra-large); /* M3 Extra Large: 28px */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .gallery-item span {
    font-size: 0.85rem;
    padding-left: 8px;
  }
}

/* KeepAndroidOpen Banner Styles */
.support-banner {
  position: relative;
  z-index: 100;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(to right, #99221B, #C93B32, #B3271F);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  opacity: 0;
  max-height: 0;
  animation: slideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideDown {
  to {
    opacity: 1;
    max-height: 200px;
  }
}

.support-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 120% at 50% -20%, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.support-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
}

@media (min-width: 768px) {
  .support-banner-inner {
    flex-direction: row;
    padding: 14px 24px;
    text-align: left;
    gap: 16px;
  }
}

.support-banner-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

@media (min-width: 600px) {
  .support-banner-left {
    flex-direction: row;
    gap: 12px;
    font-size: 0.9rem;
  }
}

.support-badge-solidarity {
  display: inline-flex;
  height: 20px;
  align-items: center;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0 8px;
  font-family: monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
}

.support-banner-left p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.support-banner-left a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.support-banner-left a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.support-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .support-countdown {
    gap: 8px;
    font-size: 0.95rem;
    padding: 8px 14px;
  }
}

.support-timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 32px;
}

.support-timer-unit span:first-child {
  line-height: 1;
}

.support-timer-unit-label {
  font-size: 7px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-top: 2px;
}

@media (min-width: 768px) {
  .support-timer-unit-label {
    font-size: 8px;
  }
}

.support-timer-divider {
  opacity: 0.5;
  animation: pulse-timer 1s infinite;
}

@keyframes pulse-timer {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

.support-timer-unit.seconds {
  color: #fed7aa; /* Orange-200 */
}

/* Buy Me a Drink Badge Styles */
.bmad-badge-container {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.bmad-badge {
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  transition: transform var(--duration-short) var(--transition-snappy), box-shadow var(--duration-short) var(--transition-snappy);
}

.bmad-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.bmad-badge:active {
  transform: scale(0.95);
}

.bmad-badge img {
  display: block;
  border: none;
  height: 68px;
  width: auto;
}

