:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  position: relative;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-left: env(safe-area-inset-left, 20px);
  padding-right: env(safe-area-inset-right, 20px);
}

/* Language Switcher */
.lang-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lang-btn {
  padding: 10px 20px;
  border: none;
  background: white;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lang-btn:first-child {
  border-right: 1px solid #ddd;
}

.lang-btn.active {
  background: var(--primary-color);
  color: white;
}

.lang-btn:not(.active):hover {
  background: #f0f0f0;
}

/* Install Prompts */
.install-ios {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem;
  text-align: center;
  z-index: 999;
  animation: slideUp 0.3s ease;
}

.close-prompt {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  opacity: 0.8;
}

.close-prompt:hover {
  opacity: 1;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  background: -webkit-linear-gradient(315deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 0 2rem;
  padding-top: calc(3rem + env(safe-area-inset-top, 0));
  text-align: center;
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1rem;
}

.install-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  margin-top: 1rem;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.install-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Main Content */
main {
  padding: 3rem 0;
}

section {
  margin-bottom: 3rem;
}

.hero {
  text-align: center;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

.hero h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

.resources h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
}

.card-grid {
  display: grid;
  display: -webkit-grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  -webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.card:hover {
  transform: translateY(-5px);
  -webkit-transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.card ul {
  list-style-position: inside;
  color: #666;
}

.card li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.card p {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.card strong {
  color: var(--primary-color);
}

.card a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
}

.card a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  margin: 3rem 0;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.emphasis {
  font-size: 1.2rem;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0));
  margin-top: 4rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer small {
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .lang-switcher {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .lang-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  header {
    padding-top: 4rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .hero h2 {
    font-size: 1.6rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .resources h2 {
    font-size: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .cta {
    padding: 2rem 1.5rem;
  }
  
  .cta h2 {
    font-size: 1.6rem;
  }
  
  .emphasis {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .card h3 {
    font-size: 1.2rem;
  }
  
  .install-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e0e0e0;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .lang-switcher {
    background: #2d2d2d;
  }
  
  .lang-btn {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  
  .lang-btn:first-child {
    border-right-color: #444;
  }
  
  .lang-btn:not(.active):hover {
    background: #383838;
  }
  
  .hero p,
  .card ul,
  .card li,
  .card p {
    color: #b0b0b0;
  }
  
  .card strong {
    color: #3498db;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}