/* ===== Typing Speed Test – ITJobsOfficial ===== */

.typing-tool {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 15px;
}

.typing-tool h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

.typing-tool .subtitle {
  color: #6c757d;
  margin-bottom: 20px;
}

/* Card */
.typing-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* Test Text */
#testText {
  background: #f5f7fb;
  padding: 16px;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 15px;
}

/* Textarea */
#typingArea {
  width: 100%;
  min-height: 140px;
  padding: 15px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #dcdfe6;
  resize: none;
}

#typingArea:focus {
  outline: none;
  border-color: #0b5ed7;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}


/* Button */
#startBtn {
  background: #0b5ed7;
  color: #fff;
  padding: 12px 22px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

#startBtn:hover {
  background: #094bb5;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
}

.modal-content {
  background: #fff;
  max-width: 420px;
  margin: 10% auto;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 15px;
}

.result-score {
  font-size: 38px;
  color: #0b5ed7;
  margin-bottom: 10px;
}

/* Modal Inputs */
.modal-content input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Modal Buttons */
.modal-content button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

#sendResult {
  background: #0b5ed7;
  color: #fff;
}

.modal-content .close-btn {
  background: #6c757d;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Timer & Controls ===== */

/* ===== Timer & Controls (Polished) ===== */

/* ===== Stats (Clean & Fixed) ===== */

.stats-timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 18px;
}

.stat-box {
  background: #f9fafc;
  padding: 18px 12px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid #eef0f6;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #6c757d;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #0b5ed7;
}

.time-box {
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border-color: #dbe6ff;
}

/* ===== Controls Section ===== */

.controls {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

/* Dropdown */
.controls select {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #d0d4de;
  font-size: 14px;
  background: #fff;
}

.controls select:focus {
  outline: none;
  border-color: #0b5ed7;
}

/* Buttons */
.controls button {
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0b5ed7, #084298);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: #adb5bd;
  color: #fff;
}

.btn-secondary:hover {
  background: #8f959c;
}

.btn-danger {
  background: #f06570;
  color: #fff;
}

.btn-danger:hover {
  background: #dc3545;
}

.controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Mobile Fix ===== */

@media (max-width: 768px) {
  .stats-timer {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .controls button,
  .controls select {
    width: 100%;
  }
}

/* ===============================
   HERO SECTION
   =============================== */

.typing-hero {
  max-width: 1100px;
  margin: 30px auto 20px;
}

.breadcrumb {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
}

.typing-hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: #0f172a;
}

.hero-subtitle {
  font-size: 16px;
  color: #475569;
  margin-top: 6px;
}

.free-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  background: #e8f7ee;
  color: #15803d;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* ===============================
   MODERN CARD
   =============================== */

.modern-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  padding: 26px;
}

/* Test Text */
#testText {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-size: 15px;
}

/* Textarea */
#typingArea {
  font-size: 16px;
  background: #f9fafb;
}

/* ===============================
   STATS BAR
   =============================== */

.stats-timer {
  background: #f8fafc;
  border-radius: 12px;
  padding: 18px;
}

.stat-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.time-box {
  border-left: 4px solid #2563eb;
}

/* ===============================
   BUTTONS
   =============================== */

.controls button {
  padding: 12px 22px;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
}

.btn-secondary {
  background: #9ca3af;
}

.btn-danger {
  background: #ef4444;
}

/* ===============================
   Result Modal (FIXED)
   =============================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}

.modal-content {
  background: #ffffff;
  max-width: 460px;
  width: 100%;
  margin: auto;
  border-radius: 14px;
  padding: 24px;
  text-align: center;

  /* ✅ KEY FIXES */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Heading */
.modal-content h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

/* WPM */
.result-score {
  font-size: 42px;
  font-weight: 700;
  color: #0b5ed7;
  margin: 12px 0;
}

/* Inputs */
.modal-content input {
  width: 100%;
  padding: 11px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  font-size: 14px;
}

/* Buttons */
.modal-content button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.modal-content .btn-primary {
  background: #0b5ed7;
  color: #fff;
}

.modal-content .btn-primary:hover {
  background: #094bb5;
}

.modal-content .close-btn {
  background: #6c757d;
  color: #fff;
}

.modal-content .close-btn:hover {
  background: #5a6268;
}

/* Mobile Fix */
@media (max-width: 480px) {
  .modal-content {
    padding: 20px;
  }

  .result-score {
    font-size: 36px;
  }
}


/* ===============================
   EARN MONEY SECTION
   =============================== */

.earn-section {
  max-width: 1100px;
  margin: 60px auto;
  text-align: center;
}

.earn-section h2 {
  font-size: 28px;
  margin-bottom: 25px;
}

.earn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 20px;
}

.earn-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 25px;
  border: 1px dashed #cbd5f5;
  opacity: 0.75;
}

.earn-card span {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
}



