:root {
  --header-bg: linear-gradient(135deg, #2c3e50, #34495e);
  --calc-bg: #ffffff;
  --btn-bg: #f3f4f6;
  --operator: #3b82f6;
  --equal: #10b981;
  --sci: #f59e0b;
  --memory: #8b5cf6;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #f3f4f6;
}

/* Header */
.header {
  background: var(--header-bg);
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
}
.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
}

/* Tool Image */
.tool-image {
  float: right;
  width: 150px;
  margin: 0 0 1rem 1rem;
}

/* Container */
.typing-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 20px;
  background: var(--calc-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

h1 {
  text-align: center;
  color: #2c3e50;
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.typing-description {
  text-align: center;
  margin-bottom: 20px;
  color: #4b5563;
}
h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
}
.how-to-use {
  margin-bottom: 20px;
  padding-left: 20px;
}
.timer-options {
  text-align: center;
  margin-bottom: 20px;
}
.timer-options select {
  padding: 8px;
  font-size: 1rem;
  border-radius: 5px;
}
#timerDisplay {
  color: #2c3e50;
}

.test-text {
  background: #f8f9fa;
  padding: 1rem;
  margin-bottom: 10px;
  border-left: 4px solid #3498db;
  font-size: 1.1rem;
}

textarea {
  width: 100%;
  height: 120px;
  font-size: 1rem;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #3498db;
  resize: none;
  margin-bottom: 1rem;
}

.control-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 20px;
}
.btn {
  font-size: 1.1rem;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.calculate-btn {
  background: #27ae60;
  color: white;
}
.calculate-btn:hover {
  background: #219653;
}
.reset-btn {
  background: #e74c3c;
  color: white;
}
.reset-btn:hover {
  background: #c0392b;
}

/* Results */
.results-section {
  margin-top: 2rem;
  background: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.results-heading {
  text-align: center;
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 20px;
}
.results-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.result-card {
  background: #3498db;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  color: white;
}
.result-value {
  font-size: 2rem;
  font-weight: bold;
}
.result-label {
  font-size: 1rem;
  text-transform: uppercase;
}

/* Footer */
.footer {
  background: var(--header-bg);
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-links a {
  color: white;
  text-decoration: none;
}