/* MyCourtStats — Shared dark theme for legal pages */

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

:root {
  --primary: #F5A623;
  --primary-dark: #D4891A;
  --primary-end: #FF6B35;
  --bg: #0A0E1A;
  --bg-mid: #162040;
  --bg-card: #141B2D;
  --bg-elevated: #1E2840;
  --text: #FFFFFF;
  --text-secondary: #9AA5BD;
  --text-muted: #6B7A94;
  --border: #1E2840;
  --border-light: #2E3E5A;
}

html, body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter',
    system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2.5rem 1.25rem 3rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

/* ============ INDEX HERO ============ */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-icon {
  display: inline-block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(245, 166, 35, 0.2),
    0 8px 24px rgba(245, 166, 35, 0.25),
    0 16px 48px rgba(255, 107, 53, 0.15);
  margin-bottom: 1.5rem;
  animation: float 4s ease-in-out infinite;
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ============ LINK LIST (index) ============ */
.section {
  background: var(--bg-card);
  border: 1px solid rgba(46, 62, 90, 0.4);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
  padding: 0.25rem 0.6rem;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 6px;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(46, 62, 90, 0.5);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.link-list a::after {
  content: '→';
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-list a:hover {
  border-color: var(--primary);
  background: rgba(245, 166, 35, 0.08);
  transform: translateX(2px);
}

.link-list a:hover::after {
  color: var(--primary);
  transform: translateX(3px);
}

/* ============ CONTENT PAGES ============ */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid rgba(46, 62, 90, 0.5);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-2px);
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(46, 62, 90, 0.5);
}

.page-header .app-name {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 0.25rem 0.6rem;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.page-header .updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.content {
  background: var(--bg-card);
  border: 1px solid rgba(46, 62, 90, 0.4);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.75rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.content h2:first-child {
  margin-top: 0;
}

.content p {
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.content p strong {
  color: var(--text);
  font-weight: 600;
}

.content ul {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding-left: 0.25rem;
}

.content ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.content ul li::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: var(--primary);
  font-weight: 700;
}

.content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(245, 166, 35, 0.35);
  transition: border-color 0.2s ease;
}

.content a:hover {
  border-bottom-color: var(--primary);
}

.content .info-block {
  background: var(--bg-elevated);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.content .info-block p {
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.content .info-block p:last-child {
  margin-bottom: 0;
}

.content .info-block strong {
  color: var(--text);
}

/* ============ FOOTER ============ */
footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(46, 62, 90, 0.4);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

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

footer a:hover {
  text-decoration: underline;
}

/* ============ LANDING PAGE ============ */

/* Language toggle */
.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.15rem;
  background: var(--bg-card);
  border: 1px solid rgba(46, 62, 90, 0.6);
  border-radius: 10px;
  padding: 0.25rem;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-toggle button.active {
  background: rgba(245, 166, 35, 0.15);
  color: var(--primary);
}

.lang-toggle button:hover:not(.active) {
  color: var(--text);
}

/* Download buttons (coming soon) */
.download-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid rgba(46, 62, 90, 0.6);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  user-select: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.download-btn:hover {
  border-color: var(--accent, #ff7e3a);
  transform: translateY(-1px);
}

.download-btn[aria-disabled="true"] {
  opacity: 0.75;
  cursor: not-allowed;
}

.download-btn .store-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.download-btn .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  gap: 1px;
}

.download-btn .store-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.download-btn .store-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.soon-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-end) 100%);
  color: #000;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4);
}

/* Sections */
.landing-section {
  margin-top: 4rem;
}

.landing-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(46, 62, 90, 0.4);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  transition: all 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(245, 166, 35, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.feature-icon {
  font-size: 1.9rem;
  margin-bottom: 0.65rem;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Screenshots horizontal scroll */
.screenshots {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.screenshots::-webkit-scrollbar {
  height: 6px;
}

.screenshots::-webkit-scrollbar-track {
  background: rgba(30, 40, 64, 0.3);
  border-radius: 3px;
}

.screenshots::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 200px;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(46, 62, 90, 0.6);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 2px 4px rgba(245, 166, 35, 0.08);
}

.screenshot-item p {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* ============ MOBILE ============ */
@media (max-width: 480px) {
  body {
    padding: 2rem 1rem 2.5rem;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero-icon {
    width: 84px;
    height: 84px;
    border-radius: 20px;
  }
  .section, .content {
    padding: 1.25rem;
  }
  .page-header h1 {
    font-size: 1.55rem;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .screenshot-item {
    width: 170px;
  }
  .lang-toggle {
    top: 0.75rem;
    right: 0.75rem;
  }
  .landing-section h2 {
    font-size: 1.3rem;
  }
  .download-btn {
    padding: 0.75rem 1.15rem;
  }
}
