/* 1. Global Variables & Resets */
:root {
  --bg: #020817;
  --card: #0f172a;
  --accent: #38bdf8;
  --accent-2: #22c55e;
  --accent-soft: rgba(56,189,248,.12);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(148,163,253,.16);
}

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

body { 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", Segoe UI, Roboto, sans-serif; 
  color: var(--text); 
  background: var(--bg); 
  line-height: 1.6; 
  overflow-x: hidden; 
}

.bg-gradient {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
  background: 
    radial-gradient(circle at 20% 20%, rgba(56,189,248,.15), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(34,197,94,.12), transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(139,92,246,.08), transparent 60%),
    #020817;
  animation: gradientShift 20s ease infinite;
}
@keyframes gradientShift { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }

.gradient-text { 
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text; 
}

/* 2. Navigation & Header */
header { padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; position: relative; border-bottom: 1px solid var(--border); }
.logo-container { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { width: 56px; height: 56px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
.logo-text { font-size: 1.5rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

nav { display: flex; gap: 8px; align-items: center; }
.nav-link { padding: 8px 16px; color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; border-radius: 8px; transition: all 0.2s ease; position: relative; }
.nav-link:hover { color: var(--text); background: rgba(56,189,248,.08); }
.nav-link::after { content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%) scaleX(0); width: 60%; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; transition: transform 0.2s ease; }
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s ease; }
.mobile-menu-btn:hover { background: rgba(56,189,248,.08); }
.mobile-nav { display: none; position: absolute; top: 100%; right: 32px; background: rgba(15,23,42,.95); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin-top: 8px; min-width: 180px; box-shadow: 0 8px 32px rgba(0,0,0,.3); z-index: 100; }
.mobile-nav.active { display: block; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav .nav-link { display: block; padding: 12px 16px; margin: 0; }
.mobile-nav .nav-link::after { display: none; }

/* Language Switcher */
.header-controls { display: flex; align-items: center; gap: 16px; }
.lang-switcher select {
  background: rgba(15,23,42,.8);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 24px 6px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.2s ease;
}
.lang-switcher select:hover, .lang-switcher select:focus {
  border-color: var(--accent);
  background-color: rgba(15,23,42,1);
}

/* 3. Homepage Layout (Hero, Badges, Features) */
.hero { max-width: 1200px; margin: 0 auto; padding: 60px 32px 80px; display: flex; flex-direction: column; gap: 60px; align-items: center; }
.hero-content { text-align: center; max-width: 850px; }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); line-height: 1.1; margin-bottom: 20px; font-weight: 800; letter-spacing: -0.02em; }
.hero-content p { font-size: 1.2rem; color: var(--muted); margin-bottom: 32px; line-height: 1.7; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; justify-content: center; }
.badge { padding: 8px 14px; border-radius: 999px; background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.2); font-size: 0.85rem; color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: all 0.3s ease; }
.badge.badge-new { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: var(--accent-2); }
.badge:hover { transform: translateY(-2px); }
.badge-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
.badge-new .badge-dot { background: var(--accent-2); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.cta-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; justify-content: center; }
.btn { padding: 14px 28px; border-radius: 12px; font-weight: 600; font-size: 1rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #020817; box-shadow: 0 4px 20px rgba(56,189,248,.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(56,189,248,.4); }
.btn-secondary { background: rgba(15,23,42,.8); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(15,23,42,1); transform: translateY(-2px); }

.hero-visuals { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 700px; }
.screenshots { position: relative; width: 100%; max-width: 280px; margin: 0 auto; min-height: 350px; }
.screenshot { border-radius: 20px; box-shadow: 0 16px 48px rgba(0,0,0,.4); border: 1px solid rgba(148,163,253,.2); width: 100%; height: auto; transition: transform 0.3s ease; position: relative; z-index: 1; }
.screenshot:hover { transform: scale(1.02); }
.screenshot-2 { position: absolute; top: 55%; right: -220px; width: 100%; transform: translateY(-50%) rotate(6deg); z-index: 0; }
.screenshot-2:hover { transform: translateY(-50%) rotate(3deg) scale(1.03); }
.screenshot-3 { position: absolute; top: 55%; left: -220px; width: 100%; transform: translateY(-50%) rotate(-6deg); z-index: 0; border-radius: 20px; box-shadow: 0 16px 48px rgba(0,0,0,.4); border: 1px solid rgba(148,163,253,.2); transition: transform 0.3s ease; }
.screenshot-3:hover { transform: translateY(-50%) rotate(-3deg) scale(1.03); }

.features { max-width: 1200px; margin: 100px auto 40px; padding: 0 32px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 16px; font-weight: 700; }
.section-header p { font-size: 1.1rem; color: var(--muted); max-width: 600px; margin: 0 auto; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.feature-card { background: rgba(15,23,42,.6); border: 1px solid var(--border); border-radius: 20px; padding: 32px; transition: all 0.3s ease; backdrop-filter: blur(10px); }
.feature-card:hover { transform: translateY(-4px); border-color: rgba(56,189,248,.3); box-shadow: 0 12px 40px rgba(56,189,248,.15); }
.feature-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 12px; color: var(--text); }
.feature-card p { color: var(--muted); line-height: 1.6; }
.highlight-card { border-color: rgba(34,197,94,.3); background: linear-gradient(180deg, rgba(15,23,42,.8) 0%, rgba(15,23,42,.4) 100%); }
.highlight-card:hover { border-color: rgba(34,197,94,.6); box-shadow: 0 12px 40px rgba(34,197,94,.15); }

/* 4. Blog Layout & Articles */
.article-container { max-width: 800px; margin: 0 auto; padding: 60px 24px; }
.breadcrumb { color: var(--muted); font-size: 0.95rem; margin-bottom: 32px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.article-header { text-align: center; margin-bottom: 60px; }
.page-title { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.2; margin-bottom: 24px; }
.page-subtitle { font-size: 1.25rem; color: var(--muted); line-height: 1.6; }

.article-content { font-size: 1.15rem; line-height: 1.8; color: #e2e8f0; }
.article-content p { margin-bottom: 24px; }
.article-content h2 { font-size: 2rem; color: #fff; margin: 48px 0 24px; font-weight: 700; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.article-content h3 { font-size: 1.5rem; color: var(--accent); margin: 32px 0 16px; font-weight: 600; }
.article-content ul, .article-content ol { margin-bottom: 32px; padding-left: 24px; }
.article-content li { margin-bottom: 12px; }
.article-content strong { color: #fff; }

.cta-section { background: linear-gradient(135deg, rgba(15,23,42,.8), rgba(15,23,42,.4)); border: 1px solid var(--border); border-radius: 20px; padding: 48px 32px; text-align: center; margin-top: 60px; }
.cta-section h2 { font-size: 2rem; margin-bottom: 16px; color: #fff; }
.cta-section p { font-size: 1.1rem; color: var(--muted); margin-bottom: 32px; }

/* 5. Footer */
footer { padding: 48px 32px 32px; border-top: 1px solid var(--border); margin-top: 80px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.footer-links { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.footer-link { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s ease; }
.footer-link:hover { color: var(--accent); }
.footer-bottom { text-align: center; color: var(--muted); font-size: 0.9rem; padding-top: 24px; border-top: 1px solid var(--border); }

/* 6. Responsive Mobile Fixes */
@media (max-width: 768px) {
  header { padding: 20px 24px; }
  nav { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-nav { right: 24px; }
  .hero { padding: 40px 24px 60px; gap: 40px; }
  .hero-visuals { max-width: 450px; margin-top: 20px; }
  .screenshots { max-width: 220px; min-height: 300px; }
  .screenshot-2 { right: -70px; width: 100%; transform: translateY(-50%) rotate(5deg); }
  .screenshot-2:hover { transform: translateY(-50%) rotate(3deg) scale(1.02); }
  .screenshot-3 { left: -70px; width: 100%; transform: translateY(-50%) rotate(-5deg); }
  .screenshot-3:hover { transform: translateY(-50%) rotate(-3deg) scale(1.02); }
  .cta-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .features { padding: 0 24px; }
  .footer-links { flex-direction: column; gap: 16px; align-items: center; }
}