/* styles.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #06B6D4;
  --bg-color: #F8FAFC;
  --surface: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --success: #10B981;
  --error: #EF4444;
  --border: #E2E8F0;
  --radius: 12px;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; color: var(--primary); margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

/* Layout & Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 4rem 0;
}

/* Header */
header {
  background-color: var(--surface);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.5);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* SEO Content Sections */
.seo-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.seo-section h2 {
  margin-top: 0;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

/* Tool Interface */
.tool-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  background: var(--bg-color);
  padding: 1rem;
  border-radius: var(--radius);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.typing-area {
  position: relative;
  margin-bottom: 2rem;
}

.text-display {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-muted);
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: var(--radius);
  min-height: 150px;
  user-select: none;
  font-family: monospace;
  word-wrap: break-word;
}

.text-display span {
  transition: color 0.1s;
}

.text-display .correct {
  color: var(--success);
}

.text-display .incorrect {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
  border-radius: 3px;
}

.text-display .active {
  background: var(--border);
  border-radius: 3px;
  animation: pulse 1s infinite alternate;
}

.typing-input-super {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: -1;
}

@keyframes pulse {
  from { background-color: var(--border); }
  to { background-color: transparent; }
}

.tool-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Results Modal / Box */
.results-box {
  display: none;
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  margin-top: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.result-item {
  padding: 1rem;
  background: var(--bg-color);
  border-radius: var(--radius);
}

.result-level {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 1rem 0;
  text-transform: capitalize;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h3 {
  font-size: 1.25rem;
  margin-top: 0;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .stats-row {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  
  .stat-item {
    flex: 1 1 40%;
  }
  
  .seo-section {
    padding: 1.5rem;
  }
}
