@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Poppins:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   Line Counter - by Yaseen
   ============================================ */

.lc-wrapper {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
  box-sizing: border-box;
}

/* Header */
.lc-header { text-align: center; margin-bottom: 28px; }

.lc-badge {
  display: inline-block;
  background: #ffffff;
  border: 1.5px solid #0EA5E9;
  color: #0EA5E9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 100px;
  margin-bottom: 14px;
  font-family: 'Poppins', sans-serif;
}

.lc-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 2.2rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.5px;
}

.lc-subtitle {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0 auto !important;
  font-family: 'Poppins', sans-serif;
  max-width: 560px;
  line-height: 1.6;
}

/* Card */
.lc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 20px rgba(14,165,233,0.07);
  box-sizing: border-box;
}

/* Quick Buttons */
.lc-quick-section {
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: #fafcff;
}

.lc-quick-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0EA5E9;
  margin: 0 0 12px 0 !important;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lc-quick-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.lc-quick-btn {
  padding: 9px 22px;
  border-radius: 8px;
  border: 1.5px solid #0EA5E9;
  background: #0EA5E9;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.lc-quick-btn:hover { background: #0284c7; border-color: #0284c7; transform: translateY(-1px); }

/* Field */
.lc-field { margin-bottom: 22px; }

.lc-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px !important;
  font-family: 'Poppins', sans-serif;
}

/* Textarea Header */
.lc-textarea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.lc-live-stats {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 12px;
  border-radius: 100px;
}

.lc-live-stats span {
  color: #0EA5E9;
  font-weight: 700;
}

/* Textarea */
.lc-textarea-wrap {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
}

.lc-textarea-wrap:focus-within {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.1);
  background: #fff;
}

.lc-textarea {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: #334155;
  background: transparent;
  resize: vertical;
  line-height: 1.8;
  box-sizing: border-box;
}

.lc-textarea::placeholder { color: #cbd5e1; font-family: 'Poppins', sans-serif; font-size: 0.85rem; }

/* Mode Tabs */
.lc-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-mode-tab {
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.lc-mode-tab:hover { border-color: #0EA5E9; color: #0EA5E9; background: #f0f9ff; }

.lc-mode-tab.active {
  background: #0EA5E9;
  border-color: #0EA5E9;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14,165,233,0.3);
}

/* Count Button */
.lc-count-btn {
  width: 100%;
  padding: 17px;
  border-radius: 14px;
  border: none;
  background: #0EA5E9;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 22px rgba(14,165,233,0.35);
  box-sizing: border-box;
  margin-top: 4px;
}

.lc-count-btn:hover { background: #0284c7; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(14,165,233,0.4); }
.lc-count-btn:active { transform: translateY(0); }

/* Results */
.lc-results { box-sizing: border-box; }

/* Hero Number */
.lc-result-hero {
  background: #334155;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  margin-bottom: 20px;
  animation: lcFade 0.5s ease forwards;
}

.lc-hero-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 10px;
}

.lc-hero-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* Results Header */
.lc-results-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.lc-results-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0);
}
.lc-results-line:last-child { background: linear-gradient(90deg, #e2e8f0, transparent); }

.lc-results-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #0EA5E9 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Stats Sections */
.lc-stats-sections {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.lc-stats-group {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.lc-stats-group-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0EA5E9;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.lc-stats-grid { display: flex; flex-direction: column; gap: 8px; }

.lc-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f8fafc;
  animation: lcSlide 0.3s ease forwards;
  opacity: 0;
  transform: translateX(-6px);
}

.lc-stat-row:last-child { border-bottom: none; }

.lc-stat-key {
  font-size: 0.78rem;
  color: #64748b;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.lc-stat-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: #334155;
}

.lc-stat-val.highlight { color: #0EA5E9; }

/* Line Preview */
.lc-preview-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.lc-preview-legend {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.lc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: #64748b;
}

.lc-legend-item::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.lc-legend-normal::before  { background: #334155; }
.lc-legend-blank::before   { background: #e2e8f0; }
.lc-legend-comment::before { background: #fde68a; }

/* Preview Lines */
.lc-preview {
  max-height: 360px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.lc-preview-line {
  display: flex;
  align-items: stretch;
  min-height: 32px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.lc-preview-line:hover { background: #f0f9ff; }
.lc-preview-line:last-child { border-bottom: none; }

.lc-line-num {
  min-width: 48px;
  padding: 6px 12px;
  text-align: right;
  background: #334155;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-right: 2px solid #475569;
  user-select: none;
}

.lc-line-content {
  flex: 1;
  padding: 6px 14px;
  color: #334155;
  display: flex;
  align-items: center;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Line types */
.lc-preview-line.lc-blank .lc-line-num     { background: #e2e8f0; color: #94a3b8; border-color: #cbd5e1; }
.lc-preview-line.lc-blank .lc-line-content { background: #f8fafc; color: #cbd5e1; font-style: italic; }
.lc-preview-line.lc-blank .lc-line-content::after { content: '(blank)'; font-size: 0.7rem; color: #cbd5e1; }

.lc-preview-line.lc-comment .lc-line-num     { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.lc-preview-line.lc-comment .lc-line-content { background: #fffbeb; color: #92400e; }

/* Reset */
.lc-reset-btn {
  display: block;
  margin: 0 auto;
  padding: 12px 32px;
  border-radius: 10px;
  border: 2px solid #0EA5E9;
  background: transparent;
  color: #0EA5E9;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.lc-reset-btn:hover { background: #0EA5E9; color: #ffffff; }

/* Animations */
@keyframes lcFade  { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes lcSlide { to   { opacity:1; transform:translateX(0); } }

/* Responsive */
@media (max-width: 768px) {
  .lc-stats-sections { grid-template-columns: 1fr; }
  .lc-title          { font-size: 1.7rem !important; }
  .lc-hero-num       { font-size: 3.5rem; }
  .lc-mode-tabs      { flex-direction: column; }
  .lc-card           { padding: 18px; }
}
