:root {
  --bg-main: #edf2f7;
  --bg-soft: #f7fafc;
  --ink-strong: #132a3f;
  --ink-medium: #35516a;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(42, 84, 117, 0.16);
  --accent: #0ea5a4;
  --accent-hover: #0b8a89;
  --shadow: 0 16px 34px rgba(17, 48, 72, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  color: var(--ink-medium);
  background:
    radial-gradient(circle at 12% 16%, rgba(14, 165, 164, 0.14), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(30, 64, 175, 0.11), transparent 35%),
    linear-gradient(170deg, var(--bg-soft), var(--bg-main));
  min-height: 100vh;
}

.page-shell {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 2.4rem 0 2rem;
}

.hero {
  margin-bottom: 1.4rem;
}

.kicker {
  margin: 0 0 0.5rem;
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: #3f6f93;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Montserrat", sans-serif;
}

h1 {
  font-size: clamp(1.95rem, 3.6vw, 3rem);
  line-height: 1.1;
}

.intro-cta {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.8rem;
}

.intro-cta h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  margin-bottom: 0.7rem;
}

.intro-cta p {
  margin: 0 0 1.2rem;
  line-height: 1.7;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.cta-button {
  display: inline-block;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(120deg, var(--accent), #0f766e);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  box-shadow: 0 12px 28px rgba(14, 165, 164, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(14, 165, 164, 0.36);
  background: linear-gradient(120deg, var(--accent-hover), #0d5f5a);
}

.cta-button.secondary {
  background: linear-gradient(120deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 28px rgba(29, 78, 216, 0.24);
}

.cta-button.secondary:hover,
.cta-button.secondary:focus-visible {
  background: linear-gradient(120deg, #1e40af, #1e3a8a);
  box-shadow: 0 16px 34px rgba(29, 78, 216, 0.32);
}

.cta-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cta-button.static-label {
  cursor: default;
  pointer-events: none;
  background: linear-gradient(120deg, #475569, #334155);
  box-shadow: 0 10px 22px rgba(51, 65, 85, 0.25);
}

.upload-label {
  display: inline-block;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  border: 1px dashed #2b5f85;
  color: #204561;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

#pdfInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.text-input-area {
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.4);
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.input-header h3 {
  font-size: 1rem;
  color: var(--ink-strong);
  margin: 0;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--ink-medium);
  opacity: 0.7;
  font-family: "Montserrat", sans-serif;
}

#pasteTextArea {
  width: 100%;
  height: 160px;
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(42, 84, 117, 0.15);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  color: var(--ink-strong);
  line-height: 1.6;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#pasteTextArea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 165, 164, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.accent-glow {
  position: relative;
  overflow: hidden;
}

.accent-glow::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.accent-glow:hover::after {
  opacity: 1;
}

/* Progress Bar Styles */
.progress-container {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  color: var(--ink-strong);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3b82f6, #8b5cf6);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.status-text {
  margin-top: 0.9rem;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.news-card h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  margin-bottom: 0.72rem;
}

.news-card p {
  margin: 0;
  line-height: 1.68;
  white-space: pre-line;
}

.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.92rem;
  color: #557088;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  .page-shell {
    padding-top: 3rem;
  }

  .intro-cta {
    padding: 1.6rem;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (min-width: 1080px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
  }
}

.news-card h3,
.news-card p,
.status-text,
.news-table {
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Kohinoor Devanagari", "Lora", Georgia, serif;
}

/* View Controls */
.view-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.view-btn {
  background: white;
  border: 1px solid var(--card-border);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  transition: all 0.2s ease;
  color: var(--ink-medium);
}

.view-btn:hover {
  background: #f1f5f9;
}

.view-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(14, 165, 164, 0.2);
}

/* Table View */
.news-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  margin-bottom: 3rem;
  overflow-x: auto;
}

.news-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.news-table th {
  background: #f8fafc;
  color: var(--ink-strong);
  font-weight: 700;
  text-align: left;
  padding: 1rem;
  border-bottom: 2px solid #e2e8f0;
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.news-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  line-height: 1.6;
}

.news-table tr:last-child td {
  border-bottom: none;
}

.news-table tr:hover td {
  background: #fbfcfe;
}

.news-table td:nth-child(1) {
  width: 80px;
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}

.news-table td:nth-child(2) {
  width: 30%;
  font-weight: 600;
  color: var(--ink-strong);
}

.news-table td:nth-child(3) {
  color: var(--ink-medium);
  font-size: 0.95rem;
}
