/* Typing Speed Tester - Custom Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9fafb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background-color: #1e293b;
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Test Section */
.test-section {
  padding: 2rem 0;
}

.test-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 2rem;
  margin-top: -2rem;
  position: relative;
  z-index: 1;
}

.prompt-display {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #3b82f6;
}

.prompt-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

.user-input {
  width: 100%;
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  line-height: 1.6;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.2s;
  min-height: 120px;
}

.user-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.test-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.timer {
  font-size: 1.2rem;
  font-weight: 600;
  color: #475569;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.results {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

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

.result-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
}

.result-value {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
}

/* How It Works */
.how-it-works {
  padding: 3rem 0;
  background: #fff;
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #0f172a;
}

.steps {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  background: #f8fafc;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  flex: 1 1 250px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #3b82f6;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

/* Tips */
.tips {
  padding: 3rem 0;
  background: #f1f5f9;
}

.tips h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #0f172a;
}

.tips-list {
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tips-list li {
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border-left: 4px solid #3b82f6;
  font-size: 1.05rem;
}

/* Footer */
footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 1.5rem 0;
  margin-top: auto;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  .test-card {
    padding: 1.5rem;
  }
  .results {
    flex-direction: column;
    gap: 1rem;
  }
  .steps {
    flex-direction: column;
    align-items: center;
  }
  .step {
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .navbar .container {
    flex-direction: column;
    gap: 0.5rem;
  }
  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .test-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .timer {
    margin-left: 0;
    text-align: center;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
