:root {
  --bg: #f4fbff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #ffffff;
  --surface-border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-soft: #475569;
  --primary: #0ea5e9;
  --primary-strong: #0369a1;
  --secondary: #10b981;
  --secondary-strong: #047857;
  --accent: #60a5fa;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 30px 80px rgba(14, 165, 233, 0.12);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tajawal", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(96, 165, 250, 0.2), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.18), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(14, 165, 233, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fdff 0%, #f3fbff 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: rgba(14, 165, 233, 0.18);
  top: -80px;
  right: -60px;
}

.orb-b {
  width: 260px;
  height: 260px;
  background: rgba(16, 185, 129, 0.18);
  bottom: 8%;
  left: -80px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 92%);
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(248, 253, 255, 0.72);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  background: #fff;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.brand-copy strong {
  font-size: 1.28rem;
  font-weight: 900;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
}

.hero-section {
  padding: 52px 0 20px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 420px);
  gap: 26px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 680px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.eyebrow-badge,
.section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-strong);
  font-weight: 800;
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-tags span,
.trust-chip {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.64);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.glass-card,
.glass-soft {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-showcase {
  padding: 26px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  min-height: 460px;
}

.hero-showcase::before {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), transparent 70%);
}

.showcase-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.14);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.showcase-grid article {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.showcase-grid span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.showcase-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
}

.showcase-core {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 34px auto 0;
  display: grid;
  place-items: center;
}

.core-ring,
.pulse-ring {
  position: absolute;
  border-radius: 50%;
}

.core-ring {
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.ring-1 {
  inset: 0;
  animation: spin 18s linear infinite;
}

.ring-2 {
  inset: 26px;
  border-color: rgba(16, 185, 129, 0.28);
  animation: spin-reverse 14s linear infinite;
}

.pulse-ring {
  inset: 52px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  animation: pulse-ring 3.6s ease-in-out infinite;
}

.pulse-2 {
  inset: 38px;
  animation-delay: 1.2s;
}

.core-center {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: white;
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.28);
}

.logo-center {
  position: relative;
  overflow: visible;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #eefafe 34%, #dff6f4 100%);
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.22), inset 0 2px 8px rgba(255,255,255,0.9);
  animation: logo-float 4.5s ease-in-out infinite;
}

.logo-aura {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25), rgba(16, 185, 129, 0.08), transparent 72%);
  filter: blur(8px);
  z-index: 0;
}

.college-hero-logo {
  position: relative;
  z-index: 1;
  width: 106px;
  height: 106px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(14, 165, 233, 0.14));
  animation: logo-tilt 6s ease-in-out infinite;
}

.orbit {
  position: absolute;
  inset: 0;
  animation: spin 16s linear infinite;
}

.orbit span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #7dd3fc);
  box-shadow: 0 0 0 7px rgba(125, 211, 252, 0.16), 0 8px 18px rgba(14, 165, 233, 0.18);
}

.orbit-2 {
  inset: 18px;
  animation-duration: 11s;
  animation-direction: reverse;
}

.orbit-2 span {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.18), 0 8px 18px rgba(251, 191, 36, 0.22);
}

.floating-chip {
  position: absolute;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(14, 165, 233, 0.12);
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.chip-a {
  top: 18px;
  right: -6px;
  animation: float-y 4.2s ease-in-out infinite;
}

.chip-b {
  left: -22px;
  bottom: 54px;
  animation: float-y 4.8s ease-in-out infinite 0.7s;
}

.chip-c {
  right: 22px;
  bottom: 10px;
  animation: float-y 5.1s ease-in-out infinite 1.2s;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(0.95); opacity: 0.35; }
  50% { transform: scale(1.04); opacity: 0.7; }
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes logo-tilt {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-4deg) scale(1.02); }
  75% { transform: rotate(4deg) scale(1.02); }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.trust-section {
  padding: 8px 0 18px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.workspace-section {
  padding: 22px 0 54px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 24px;
  align-items: start;
}

.upload-panel,
.result-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.upload-panel h2,
.result-panel h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
}

.muted-text {
  margin: 0;
  color: var(--text-soft);
}

.analyze-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  color: var(--text-soft);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.86);
  color: var(--text);
  border-radius: 18px;
  padding: 15px 16px;
  outline: none;
  transition: 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

textarea {
  min-height: 118px;
  resize: vertical;
}

.drop-zone {
  display: block;
  border: 2px dashed rgba(14, 165, 233, 0.35);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(243, 251, 255, 0.95));
  min-height: 240px;
  padding: 18px;
  transition: 0.24s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.1);
}

.drop-zone-inner {
  min-height: 200px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(16, 185, 129, 0.06));
}

.upload-icon-wrap {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(16, 185, 129, 0.15));
}

.upload-icon {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--primary-strong);
  line-height: 1;
}

.drop-zone-inner strong {
  font-size: 1.2rem;
}

.drop-zone-inner small {
  color: var(--text-soft);
}

.preview-wrap {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--text-soft);
  font-weight: 700;
}

.preview-head button {
  color: var(--danger);
  font-weight: 800;
}

.preview-wrap img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #fff;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-btn,
.outline-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  text-decoration: none;
  transition: 0.2s ease;
  font-weight: 800;
}

.cta-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.24);
}

.cta-btn:hover,
.ghost-btn:hover,
.outline-btn:hover {
  transform: translateY(-1px);
}

.cta-btn.small {
  min-height: 46px;
}

.cta-btn.wide {
  flex: 1;
}

.outline-btn {
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(255,255,255,0.86);
  color: var(--primary-strong);
}

.outline-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ghost-btn {
  background: rgba(255,255,255,0.82);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-pill {
  min-width: 94px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.status-pill.neutral {
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-strong);
}

.status-pill.loading {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-pill.success {
  background: rgba(16, 185, 129, 0.14);
  color: var(--secondary-strong);
}

.status-pill.error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.status-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.status-box.info {
  background: rgba(14, 165, 233, 0.08);
  color: var(--primary-strong);
}

.status-box.loading {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.status-box.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--secondary-strong);
}

.status-box.error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.result-content {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.summary-main,
.summary-card,
.detail-card {
  border-radius: 24px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.summary-card,
.detail-card {
  padding: 18px 20px;
}

.summary-main {
  padding: 22px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.09), rgba(16, 185, 129, 0.08));
}

.summary-card span,
.card-title,
.summary-main span {
  display: block;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-weight: 800;
}

.summary-card strong {
  font-size: 1.18rem;
  line-height: 1.8;
}

.summary-main p,
.detail-card p,
.bullet-list {
  margin: 0;
  line-height: 1.95;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tone-blue {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(255,255,255,0.95));
}

.tone-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255,255,255,0.95));
}

.chip-list,
.bullet-list {
  padding: 0;
  margin: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.chip-list li {
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-strong);
  font-weight: 800;
}

.bullet-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.bullet-list li {
  position: relative;
  padding-inline-start: 22px;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.8em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.disclaimer-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(255,255,255,0.95));
}

.hidden {
  display: none !important;
}

.pdf-template-wrap {
  position: fixed;
  left: -99999px;
  top: 0;
  width: 800px;
  opacity: 0;
  pointer-events: none;
}

.pdf-template {
  width: 794px;
  min-height: 1123px;
  background: #f8fdff;
  color: #0f172a;
  padding: 42px;
  font-family: "Tajawal", system-ui, sans-serif;
}

.pdf-header {
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.pdf-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.pdf-brand {
  text-align: center;
}

.pdf-brand h3 {
  margin: 0;
  font-size: 2rem;
}

.pdf-brand p {
  margin: 6px 0 0;
  color: #475569;
}

.pdf-body {
  margin-top: 24px;
}

.pdf-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  font-weight: 800;
}

.pdf-body h2 {
  margin: 18px 0 8px;
  font-size: 1.8rem;
}

.pdf-section {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pdf-section h4 {
  margin: 0 0 10px;
  color: #475569;
}

.pdf-section p,
.pdf-section ul {
  margin: 0;
  line-height: 1.9;
}

.pdf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-chip-row span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  font-weight: 700;
}

.pdf-section.notice {
  background: rgba(245, 158, 11, 0.08);
}

@media (max-width: 1024px) {
  .hero-shell,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    min-height: unset;
  }
}

@media (max-width: 720px) {
  .nav-bar,
  .result-head,
  .preview-head,
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-grid,
  .highlights-grid,
  .showcase-grid,
  .pdf-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 2.1rem;
  }

  .upload-panel,
  .result-panel,
  .hero-showcase {
    padding: 20px;
    border-radius: 24px;
  }

  .logo {
    width: 46px;
    height: 46px;
  }
}


@media (max-width: 640px) {
  .showcase-core { width: 250px; height: 250px; }
  .core-center.logo-center { width: 120px; height: 120px; }
  .college-hero-logo { width: 90px; height: 90px; }
  .floating-chip { font-size: 0.72rem; padding: 7px 11px; }
  .chip-b { left: -8px; }
}
