/* PWA Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #8b5cf6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #1f2937;
  --light: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.nav { display: flex; gap: 0.5rem; }
.nav-link {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.2s;
  font-weight: 500;
}
.nav-link:hover, .nav-link.active { background: rgba(255, 255, 255, 0.2); }
.main { padding-top: 80px; min-height: 100vh; }
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 4rem 1rem;
  text-align: center;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  font-weight: 800;
}
.hero p { font-size: 1.25rem; opacity: 0.9; margin-bottom: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--white);
  color: var(--primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-secondary:hover { background: var(--white); color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.features {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--dark);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--dark); }
.feature-card p { color: #6b7280; }
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 1rem;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1001;
}
.install-banner.show { display: block; }
.install-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.install-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.install-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.install-text h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.install-text p { font-size: 0.875rem; color: #6b7280; }
.install-actions { display: flex; gap: 0.5rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-install { background: var(--primary); color: var(--white); }
.btn-install:hover { background: var(--primary-dark); }
.btn-close { background: transparent; color: #6b7280; }
.offline-indicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #f59e0b;
  color: var(--dark);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  z-index: 999;
}
.offline-indicator.show { transform: translateX(-50%) translateY(0); }
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
}
.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}
.footer-links a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; }
.about-section {
  padding: 4rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}
.about-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.about-card h2 { color: var(--dark); margin-bottom: 1rem; font-size: 1.5rem; }
.about-card p { color: #6b7280; margin-bottom: 1rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.stat-item { text-align: center; padding: 1.5rem; background: var(--light); border-radius: 12px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.875rem; color: #6b7280; margin-top: 0.25rem; }

/* Admin Styles */
.admin-section {
  padding: 4rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}
.admin-header {
  text-align: center;
  margin-bottom: 3rem;
}
.admin-header h1 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}
.admin-header p {
  color: #6b7280;
  font-size: 1.1rem;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.admin-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.admin-card h2 {
  color: var(--dark);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--light);
  border-radius: 12px;
}
.stat-row .stat-label {
  font-size: 1rem;
  color: #6b7280;
}
.stat-row .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.admin-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
  font-weight: 500;
  color: var(--dark);
  font-size: 0.875rem;
}
.form-input, .form-textarea {
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 80px; }
.admin-list {
  margin-left: 1.5rem;
  color: #6b7280;
  line-height: 2;
}
.admin-list li { margin-bottom: 0.5rem; }
.admin-note {
  margin-top: 1rem;
  padding: 1rem;
  background: #dbeafe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 0.875rem;
}
.push-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
}
.push-result.show { display: block; }
.push-result.success {
  background: #d1fae5;
  color: #065f46;
}
.push-result.error {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 768px) {
  .nav { display: none; }
  .hero { padding: 3rem 1rem; }
  .features { padding: 2rem 1rem; }
  .install-content { flex-direction: column; text-align: center; }
  .install-info { flex-direction: column; }
  .admin-section { padding: 2rem 1rem; }
  .admin-header h1 { font-size: 2rem; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
@supports (padding-top: env(safe-area-inset-top)) {
  .header { padding-top: calc(1rem + env(safe-area-inset-top)); }
  .main { padding-top: calc(80px + env(safe-area-inset-top)); }
  .install-banner { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}