:root {
  --bg: #0f1226;
  --card: #161a36;
  --muted: #a9b1d6;
  --text: #e6e9ff;
  --primary: #7c5cff;
  --primary-600: #6a4cff;
  --danger: #ff5c7c;
  --success: #37d399;
  --ring: rgba(124, 92, 255, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

html, body { 
  height: 100%; 
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: 
    radial-gradient(ellipse 1400px 900px at 90% -15%, rgba(124,92,255,.3), transparent),
    radial-gradient(ellipse 1200px 700px at -15% 20%, rgba(55,211,153,.2), transparent),
    radial-gradient(ellipse 800px 600px at 50% 100%, rgba(255,92,124,.15), transparent),
    var(--bg);
  color: var(--text);
  font: clamp(14px, 1.5vw, 16px)/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px);
}

/* Navigation - Mobile First */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 3vw, 20px) clamp(16px, 4vw, 32px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(15, 18, 38, 0.85);
  z-index: 1000;
}

.brand {
  font-weight: 700;
  font-size: clamp(18px, 4vw, 22px);
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 12px);
}

/* Buttons - Responsive Design */
.btn {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text);
  background: rgba(255,255,255,.05);
  padding: clamp(10px, 2.5vw, 12px) clamp(14px, 3.5vw, 18px);
  border-radius: clamp(10px, 2.5vw, 14px);
  text-decoration: none;
  font-size: clamp(13px, 3.2vw, 15px);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.3);
}

.btn.primary:hover {
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255,255,255,.2);
}

#btn-gorevlerim {
  transform: translateX(450px);
}

#btn-giris-yap {
  transform: translateX(450px);
}

/* Hero Section - Mobile First */
.hero {
  text-align: center;
  padding: clamp(60px, 15vw, 120px) clamp(16px, 4vw, 40px) clamp(40px, 10vw, 80px);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, 90vw);
  height: min(800px, 90vw);
  background: radial-gradient(circle, rgba(124, 92, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(28px, 8vw, 56px);
  font-weight: 800;
  margin: 0 0 clamp(16px, 4vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #e6e9ff 50%, #a9b1d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  font-size: clamp(16px, 4vw, 20px);
  margin: 0 auto clamp(32px, 8vw, 48px);
  max-width: min(600px, 90vw);
  line-height: 1.6;
}

/* CTA Section */
.cta {
  display: flex;
  gap: clamp(12px, 3vw, 16px);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: clamp(40px, 10vw, 80px);
}

.cta .btn {
  min-width: clamp(140px, 35vw, 160px);
  justify-content: center;
  display: flex;
  align-items: center;
}

/* Features Grid - Responsive */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(16px, 4vw, 24px);
  margin: clamp(40px, 10vw, 80px) 0 clamp(60px, 15vw, 120px);
}

.feature {
  padding: clamp(20px, 5vw, 28px);
  border-radius: clamp(16px, 4vw, 20px);
  background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--success), var(--danger));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255,255,255,.15);
}

.feature:hover::before {
  opacity: 1;
}

.feature strong {
  color: #d6dbff;
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.feature-text {
  color: var(--muted);
  line-height: 1.6;
  font-size: clamp(14px, 3.5vw, 15px);
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  padding: clamp(32px, 8vw, 48px) clamp(16px, 4vw, 32px);
  font-size: clamp(13px, 3vw, 14px);
}



/* Mobile Navigation Improvements */
@media (max-width: 640px) {
  .nav {
    padding: 16px 20px;
  }
  
  .nav-actions {
    gap: 8px;
  }
  
  #btn-gorevlerim,
  #btn-giris-yap {
    transform: none;
  }
  
  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .hero {
    padding: 80px 20px 60px;
  }
  
  .cta {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .cta .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .features {
    gap: 16px;
  }
  
  .feature {
    padding: 20px;
  }

  
}

/* Ultra-small screens */
@media (max-width: 375px) {
  .container {
    padding: 16px;
  }
  
  .hero {
    padding: 60px 16px 40px;
  }
  
  .features {
    gap: 14px;
    margin: 40px 0 60px;
  }
  
  .feature {
    padding: 18px;
  }

  
}

/* Large screens optimization */
@media (min-width: 1024px) {
  .hero {
    padding: 140px 40px 100px;
  }
  
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 100px 0 140px;
  }
  
  .feature {
    padding: 32px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .feature:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text: #ffffff;
    --muted: #cccccc;
    --primary: #8a6aff;
  }
  
  .btn {
    border-width: 2px;
  }
  
  .feature {
    border-width: 2px;
  }
}

/* Dark mode enhancements for supported devices */
@media (prefers-color-scheme: dark) {
  /* Already optimized for dark mode */
}

/* Auth & App generic components restored */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(14px, 3.5vw, 18px);
  padding: clamp(16px, 4vw, 20px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.card-title { margin: 0 0 12px; font-size: 18px; color: var(--muted); }

/* Auth screens */
.auth-body { display: grid; place-items: center; min-height: 100svh; padding: clamp(24px, 6vw, 40px); }
.auth-container { width: min(100%, 460px); }
.auth-card { padding: 0; overflow: hidden; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; }
.tab {
  text-align: center;
  padding: clamp(12px, 3vw, 14px);
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.tab.active { color: var(--text); background: rgba(255,255,255,.06); }

.form { display: grid; gap: 12px; padding: clamp(16px, 4vw, 20px); }
.form.inline { grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 0; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(8,10,24,.6);
  color: var(--text);
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }

.alert { padding: 12px 14px; border-radius: 12px; }
.alert-error { background: rgba(255,92,124,.12); border: 1px solid rgba(255,92,124,.3); }

/* Tasks (app) */
.tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); }
.task.completed { opacity: .6; }
.task-left { margin: 0; }
.checkbox { width: 22px; height: 22px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: transparent; cursor: pointer; }
.task.completed .checkbox { background: linear-gradient(180deg, var(--success), #27c08a); border: none; }
.task-main { flex: 1; }
.task-title { font-weight: 600; }
.task-meta { font-size: 12px; color: var(--muted); }
.task-actions { display: flex; gap: 8px; align-items: center; }
