:root {
  --primary: #1e1e1e;
  --secondary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --correct: #4ade80;
  --incorrect: #f87171;
  --untyped: #666;
  --sidebar-bg: #252525;
  --hover-bg: #333;
  --active-bg: #3a3a3a;
  --accent: #60a5fa;
  --border: #404040;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Courier New", Courier, monospace;
}

body,
html {
  height: 100%;
  background-color: var(--primary);
  color: var(--text-primary);
}

/* Home Page Styles */
.home-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.home-content {
  max-width: 800px;
  text-align: center;
}

.home-title {
  font-size: 4rem;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}

.home-tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.home-description {
  background-color: var(--sidebar-bg);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
}

.home-description > p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 30px;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background-color: var(--secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
}

.cta-button {
  padding: 15px 40px;
  font-size: 1.1rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  font-family: "Courier New", Courier, monospace;
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.cta-button:hover {
  background-color: #5094e8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.extension-promo {
  background-color: rgba(96, 165, 250, 0.1);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  margin-bottom: 30px;
}

.extension-promo h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.extension-promo p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
}

.extension-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
}

.extension-link:hover {
  color: #5094e8;
  transform: translateX(5px);
}

.contact-section {
  background-color: var(--sidebar-bg);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
}

.contact-section h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.contact-section > p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  background-color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.submit-button {
  padding: 12px 30px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(96, 165, 250, 0.2);
}

.submit-button:hover {
  background-color: #5094e8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.submit-button:active {
  transform: translateY(0);
}

.home-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.back-home-btn {
  width: 100%;
  padding: 10px;
  background-color: var(--secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
  font-family: "Courier New", Courier, monospace;
  transition: all 0.2s ease;
}

.back-home-btn:hover {
  background-color: var(--hover-bg);
  border-color: var(--accent);
}

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  padding: 20px;
  overflow-y: auto;
  border-right: 2px solid var(--border);
}

.sidebar h2 {
  background-color: var(--sidebar-bg);
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
  text-align: center;
}

.testament-toggle {
  background-color: var(--sidebar-bg);
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding: 4px;
  background-color: var(--secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.testament-toggle button {
  flex: 1;
  padding: 10px;
  background-color: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: "Courier New", Courier, monospace;
}

.testament-toggle button:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.testament-toggle button.active {
  background-color: var(--accent);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.books-list {
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-item {
  background-color: var(--secondary);
  color: var(--text-primary);
  padding: 12px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.book-item:hover {
  background-color: var(--hover-bg);
  border-color: var(--accent);
}

.book-item.active {
  background-color: var(--accent);
  border-color: var(--accent);
  font-weight: bold;
  color: #fff;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--primary);
}

/* Chapter Navigation */
.chapter-nav {
  background-color: var(--sidebar-bg);
  padding: 20px;
  border-bottom: 2px solid var(--border);
}

.chapter-nav h3 {
  background-color: var(--sidebar-bg);
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.chapters-list {
  background-color: var(--sidebar-bg);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Scrollbar for chapters list */
.chapters-list::-webkit-scrollbar {
  width: 8px;
}

.chapters-list::-webkit-scrollbar-track {
  background: var(--secondary);
  border-radius: 4px;
}

.chapters-list::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.chapters-list::-webkit-scrollbar-thumb:hover {
  background: #5094e8;
}

.chapter-item {
  background-color: var(--secondary);
  color: var(--text-primary);
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  min-width: 40px;
  text-align: center;
}

.chapter-item:hover {
  background-color: var(--hover-bg);
  border-color: var(--accent);
}

.chapter-item.active {
  background-color: var(--accent);
  border-color: var(--accent);
  font-weight: bold;
  color: #fff;
}

/* Container */
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px;
  background-color: var(--primary);
  overflow-y: auto;
}

.container h1 {
  background-color: var(--primary);
  color: var(--text-primary);
  margin-bottom: 30px;
  font-size: 1.5rem;
}

.typing-box {
  border-radius: 12px;
  padding: 2rem;
  line-height: 3.5rem;
  max-width: 900px;
  text-align: left;
  font-size: 1.8rem;
  user-select: none;
  white-space: pre-wrap;
  word-break: break-word;
  background-color: var(--primary);
}

#hidden-input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.char {
  color: var(--untyped);
  background-color: var(--primary);
}

.char.correct {
  color: var(--correct);
  background-color: var(--primary);
}

.char.incorrect {
  color: var(--incorrect);
  background-color: var(--primary);
}

.retake-test {
  padding: 10px 20px;
  font-size: 0.95rem;
  border-radius: 5px;
  transition: all 0.2s ease;
  color: var(--text-primary);
  background-color: var(--secondary);
  cursor: pointer;
  border: 2px solid var(--accent);
  margin-top: 12px;
}

.retake-test:hover {
  background-color: var(--accent);
  box-shadow: 0 4px 8px rgba(96, 165, 250, 0.3);
  transform: translateY(-2px);
  color: #fff;
}

.retake-test:active {
  box-shadow: 0 2px 4px rgba(96, 165, 250, 0.2);
  transform: translateY(0);
}

.char.cursor {
  background-color: var(--text-secondary);
  border-radius: 2px;
}

/* Stats Display */
.stats-container {
  background-color: var(--primary);
  text-align: center;
  width: 100%;
  margin-top: 0;
}

.stats-grid {
  background-color: var(--primary);
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.stat-item {
  background-color: var(--primary);
  text-align: center;
}

.stat-label {
  background-color: var(--primary);
  font-size: 0.6rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  background-color: var(--primary);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
}

/* Progress Bar */
.progress-container {
  background-color: var(--primary);
  width: 100%;
  max-width: 600px;
  margin-top: 30px;
  display: none;
}

.progress-bar {
  background-color: var(--secondary);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  background-color: var(--accent);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  background-color: var(--primary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-align: center;
  margin-top: 5px;
}
