:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent: #38bdf8;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
}

.logo-badge {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-links a:hover {
  color: var(--text-main);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #475569;
  text-decoration: none;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  background: #090d16;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.15), transparent 70%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filter Tabs */
.filter-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.5rem 0 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* App Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-bottom: 5rem;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: #475569;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}

.app-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e293b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.app-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.app-card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* App Detail Hero */
.app-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.1), transparent 60%);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  cursor: pointer;
}

.hero-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .hero-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.app-detail-icon-wrapper {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e293b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.app-detail-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.app-tagline {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.app-spec-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .app-spec-badges {
    justify-content: center;
  }
}

.spec-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-actions {
    justify-content: center;
  }
}

/* Features Section */
.content-section {
  padding: 3.5rem 0;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.feature-icon-bullet {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Legal Box */
.legal-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legal-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Legal Page Styles */
.legal-view-container {
  background-color: #f8f9fa;
  color: #202124;
  flex-grow: 1;
}

.legal-header {
  background-color: #ffffff;
  border-bottom: 1px solid #dadce0;
  padding: 2.2rem 1rem;
  text-align: center;
}

.legal-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.2rem;
  font-weight: 700;
}

.legal-header p {
  margin: 0;
  color: #5f6368;
  font-size: 0.95rem;
}

.legal-body-container {
  max-width: 850px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.legal-card {
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #dadce0;
  padding: 2.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.legal-card h2 {
  color: #202124;
  border-bottom: 1px solid #dadce0;
  padding-bottom: 0.4rem;
  margin-top: 2rem;
  font-size: 1.4rem;
}

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

.legal-card h3 {
  font-size: 1.1rem;
  margin-top: 1.2rem;
}

.legal-card ul {
  padding-left: 1.4rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.legal-card li {
  margin-bottom: 0.5rem;
}

.legal-card p {
  margin-bottom: 1rem;
  line-height: 1.65;
}

/* Language Dropdown in Header */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-dropdown-btn:hover {
  background: var(--bg-card-hover);
  border-color: #475569;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.5rem;
  max-height: 320px;
  width: 180px;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.lang-dropdown-item:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--text-main);
}

.lang-dropdown-item.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.legal-subfooter {
  text-align: center;
  padding: 2rem 1rem;
  color: #5f6368;
  font-size: 0.85rem;
  border-top: 1px solid #dadce0;
  margin-top: 3rem;
  background-color: #ffffff;
}

.legal-subfooter a {
  cursor: pointer;
}

/* App Detail Description Box */
.app-detail-desc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
}

.app-detail-desc-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.app-detail-desc-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}
