/* ================= ROOT VARIABLES ================= */

:root {
  --bg-main: #050816;
  --bg-secondary: #0b1220;
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255,255,255,0.08);
  --accent-primary: #6366f1;
  --accent-secondary: #7c3aed;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
}

/* ================= GLOBAL ================= */

html {
  scroll-behavior: smooth;
}

section:hover {
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.3),
    0 25px 70px rgba(0,0,0,0.6);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  margin: 0;
  padding: 32px;

  background:
    radial-gradient(circle at 15% 20%, rgba(99,102,241,0.18), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(124,58,237,0.18), transparent 40%),
    linear-gradient(135deg, #050816, #0b1220);

  color: #e5e7eb;
  line-height: 1.6;
  min-height: 100vh;

  animation: fadeIn 0.6s ease forwards;
}


/* Subtle top glow */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 280px;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.25), transparent 70%);
  pointer-events: none;
  z-index: -1;
}


/* ================= TYPOGRAPHY ================= */

h1, h2, h3, h4 {
  margin-bottom: 10px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff, #c7d2fe);

  background-clip: text;              /* Standard */
  -webkit-background-clip: text;      /* Chrome/Safari */

  color: transparent;                 /* Standard */
  -webkit-text-fill-color: transparent; /* WebKit fallback */
}

p {
  color: #9ca3af;
  max-width: 720px;
}

/* ================= LINKS ================= */

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #c7d2fe;
}

/* ================= NAVBAR ================= */

nav,
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.nav-links a {
  margin-left: 22px;
  color: #a5b4fc;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a.active {
  color: #ffffff;
  border-bottom: 2px solid #6366f1;
  padding-bottom: 3px;
}

/* ================= HERO ================= */

.hero {
  background: #0f172a;
  -webkit-backdrop-filter: blur(6px);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;

  padding: 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 20px 60px rgba(0,0,0,0.6);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

/* ================= BUTTONS ================= */

button,
.btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border: none;
  padding: 14px 26px;
  border-radius: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.25s ease;

  box-shadow:
    0 10px 25px rgba(99,102,241,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.15);
}

button:hover,
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 18px 45px rgba(99,102,241,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.25);
}

button:disabled {
  background: #374151;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ================= INPUTS ================= */

select,
input {
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(10px);

  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.08);

  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;

  transition: all 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
}

select {
  min-width: 260px;
}

/* ================= SECTIONS ================= */

section {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);

  padding: 28px;
  border-radius: 18px;
  margin-top: 28px;

  border: 1px solid rgba(255,255,255,0.06);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 20px 60px rgba(0,0,0,0.5);
}

/* ================= CARDS ================= */

.card {
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(12px);
  will-change: transform;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 22px;
  border-radius: 18px;
  margin-top: 22px;

  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.card ul {
  margin: 10px 0;
  padding-left: 18px;
  color: #9ca3af;
}

.card ul li {
  margin-bottom: 6px;
}

/* ================= COURSE ROW ================= */

.course-row {
  background: rgba(2,6,23,0.7);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 14px;
}

/* ================= CGPA CARD ================= */

.cgpa-card {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  padding: 28px;
  border-radius: 22px;
  margin-bottom: 26px;

  box-shadow:
    0 0 40px rgba(99,102,241,0.35),
    0 20px 60px rgba(0,0,0,0.7);
}

.cgpa-card h1 {
  font-size: 3rem;
  margin: 10px 0;
}

.cgpa-card p {
  color: #e0e7ff;
}

/* ================= PROGRESS BAR ================= */

.progress-bar {
  background: rgba(255,255,255,0.15);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}

#cgpaProgress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  transition: width 0.6s ease;
}

/* ================= GRADE GRID ================= */

.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.grade-grid div {
  background: rgba(2,6,23,0.75);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.grade-grid span {
  font-size: 22px;
  display: block;
  margin-top: 6px;
}

/* ================= GRADE SCALE ================= */

.grade-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.grade-scale span {
  background: rgba(2,6,23,0.75);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

/* ================= PROGRAM SELECT ================= */

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.program-card {
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(255,255,255,0.05);
  will-change: transform;
  border-radius: 18px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.program-card:hover {
  border-color: #6366f1;
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(99,102,241,0.25);
}

.program-card.active {
  border: 2px solid #6366f1;
  background: linear-gradient(135deg, rgba(15,23,42,0.9), #312e81);
}

.program-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================= FOOTER ================= */

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #9ca3af;
  font-size: 14px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  body {
    padding: 20px;
  }

  .grade-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cgpa-card h1 {
    font-size: 2.2rem;
  }

  nav,
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    margin-top: 12px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

::selection {
  background: rgba(99,102,241,0.4);
  color: white;
}