/* ============================================
   🔥 DIDIFAIL - UNHINGED ACADEMIA VIBES 🔥
   ============================================ */

/* === CSS RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === CUSTOM PROPERTIES === */
:root {
  /* Background - warm paper vibes */
  --bg-main: #FBF7F4;
  --bg-paper: #FFFFFF;
  --bg-cream: #FDF8F3;
  --bg-hover: #F5F0EB;
  
  /* Accent Colors - bold & playful */
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-pale: #EDE9FE;
  --purple-dark: #5B21B6;
  
  --pink: #EC4899;
  --pink-pale: #FCE7F3;
  
  --orange: #F97316;
  --orange-pale: #FFEDD5;
  
  --green: #10B981;
  --green-pale: #D1FAE5;
  
  --blue: #3B82F6;
  --blue-pale: #DBEAFE;
  
  --red: #EF4444;
  --red-pale: #FEE2E2;
  
  --yellow: #FBBF24;
  --yellow-pale: #FEF3C7;
  
  /* Text */
  --text-primary: #1F1F1F;
  --text-secondary: #4B4B4B;
  --text-muted: #9CA3AF;
  
  /* Borders */
  --border: #E5E5E5;
  --border-dark: #D1D5DB;
  
  /* Fonts */
  --font-main: 'Space Grotesk', -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Shadows - chunky & fun */
  --shadow-sm: 4px 4px 0 rgba(0,0,0,0.08);
  --shadow-md: 6px 6px 0 rgba(0,0,0,0.1);
  --shadow-lg: 8px 8px 0 rgba(0,0,0,0.12);
  --shadow-color: 6px 6px 0 var(--purple);
  --shadow-brutal: 4px 4px 0 #1F1F1F;
}

/* === GLOBAL === */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === SEAMLESS SCROLLBAR === */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--purple-light) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--purple-light);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--purple);
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Hide scrollbar on body but keep functionality */
body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: var(--bg-main);
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--purple-light), var(--purple));
  border-radius: 100px;
  border: 2px solid var(--bg-main);
}

/* Fun cursor on interactive elements */
button, a, select, .clickable {
  cursor: pointer;
}

::selection {
  background: var(--purple-pale);
  color: var(--purple-dark);
}

/* === FLOATING DECORATIONS === */
.floating-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco {
  position: absolute;
  font-size: 2rem;
  opacity: 0.15;
  animation: floatAround 20s ease-in-out infinite;
  color: var(--purple);
}

.deco-1 { top: 10%; left: 5%; animation-delay: 0s; }
.deco-2 { top: 20%; right: 10%; animation-delay: -3s; font-size: 3rem; }
.deco-3 { top: 40%; left: 8%; animation-delay: -6s; }
.deco-4 { top: 60%; right: 5%; animation-delay: -9s; color: var(--pink); }
.deco-5 { top: 75%; left: 15%; animation-delay: -12s; color: var(--orange); }
.deco-6 { top: 85%; right: 15%; animation-delay: -15s; }
.deco-star { top: 30%; right: 20%; animation-delay: -4s; font-size: 1.5rem; color: var(--yellow); }
.deco-spiral { top: 50%; left: 3%; animation-delay: -8s; font-size: 2.5rem; }

@keyframes floatAround {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -15px) rotate(5deg); }
  50% { transform: translate(-5px, 10px) rotate(-3deg); }
  75% { transform: translate(15px, 5px) rotate(3deg); }
}

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(251, 247, 244, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--border);
}

.logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  z-index: 1;
}

.logo-blob {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: var(--yellow);
  border-radius: 50% 60% 50% 70%;
  z-index: -1;
  animation: blobMorph 4s ease-in-out infinite;
}

@keyframes blobMorph {
  0%, 100% { border-radius: 50% 60% 50% 70%; transform: translateY(-50%) rotate(0deg); }
  50% { border-radius: 60% 50% 70% 50%; transform: translateY(-50%) rotate(5deg); }
}

.logo-emoji {
  font-size: 1.75rem;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.logo-text {
  letter-spacing: -0.02em;
}

.logo-dot {
  color: var(--purple);
}

/* Nav Tabs - Pill Style */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem;
  background: var(--bg-paper);
  border: 2px solid var(--border);
  border-radius: 100px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  border-radius: 100px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.nav-tab.active {
  background: var(--text-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.tab-icon {
  font-size: 1rem;
}

/* Header UniLink Button */
.header-unilink {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--purple);
  border: 2px solid var(--text-primary);
  border-radius: 100px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 3px 3px 0 var(--text-primary);
  transition: all 0.15s ease;
}

.header-unilink:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text-primary);
  background: var(--purple-dark);
}

.header-unilink-icon {
  font-size: 1rem;
}

.header-unilink-text {
  letter-spacing: 0.02em;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  text-align: center;
  padding: 5rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
}

/* Stickers scattered around hero */
.hero-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sticker {
  position: absolute;
  padding: 0.4rem 0.8rem;
  background: var(--bg-paper);
  border: 2px solid var(--text-primary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-brutal);
  transform: rotate(var(--rotation));
}

.sticker-1 {
  --rotation: -8deg;
  top: 0;
  left: 5%;
  background: var(--yellow-pale);
}

.sticker-2 {
  --rotation: 12deg;
  top: 15%;
  right: 2%;
  background: var(--pink-pale);
}

.sticker-3 {
  --rotation: -5deg;
  bottom: 20%;
  left: 0%;
  background: var(--blue-pale);
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: var(--bg-paper);
  border: 2px solid var(--border-dark);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: badgeBounce 3s ease-in-out infinite;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.badge-arrow {
  font-size: 0.9rem;
  opacity: 0.5;
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Hero Title - The Star */
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.title-line-1, .title-line-2 {
  color: var(--text-primary);
}

.title-cook {
  position: relative;
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--green);
}

.title-cook::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: -0.05em;
  right: -0.05em;
  height: 0.35em;
  background: var(--green-pale);
  z-index: -1;
  transform: rotate(-2deg) skewX(-5deg);
}

.title-cooked {
  position: relative;
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--red);
}

.title-cooked::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: -0.05em;
  right: -0.05em;
  height: 0.35em;
  background: var(--red-pale);
  z-index: -1;
  transform: rotate(1deg) skewX(3deg);
}

.title-dots {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.title-qmark {
  display: inline-block;
  color: var(--purple);
  animation: qmarkBounce 1s ease-in-out infinite;
}

@keyframes qmarkBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.hero-egg {
  display: inline-block;
  font-size: 0.8em;
  margin-left: 0.2em;
  animation: sizzle 0.4s ease-in-out infinite alternate;
}

@keyframes sizzle {
  from { transform: rotate(-8deg) scale(1); }
  to { transform: rotate(8deg) scale(1.1); }
}

/* Hero Subtitle */
.hero-subtitle {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.subtitle-main {
  font-weight: 500;
}

.subtitle-small {
  font-size: 1rem;
  color: var(--text-muted);
}

.italic {
  font-family: var(--font-serif);
  font-style: italic;
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: 3rem;
  color: var(--text-muted);
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span:first-child {
  font-size: 1.5rem;
}

.scroll-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.7; }
}

/* === CALCULATOR CONTAINER === */
.calculator-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  z-index: 1;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* === INPUT CARD === */
.input-card {
  position: relative;
  background: var(--bg-paper);
  border: 3px solid var(--text-primary);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

/* Tape decoration */
.card-tape {
  position: absolute;
  top: -12px;
  width: 60px;
  height: 25px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.7), rgba(251, 191, 36, 0.5));
  border: 1px solid rgba(0,0,0,0.1);
  z-index: 10;
}

.tape-left {
  left: 30px;
  transform: rotate(-5deg);
}

.tape-right {
  right: 30px;
  transform: rotate(3deg);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px dashed var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--purple-pale);
  border: 2px solid var(--purple);
  border-radius: 12px;
  transform: rotate(-3deg);
}

.card-icon {
  font-size: 1.3rem;
}

.header-text h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.header-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.class-count {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: 100px;
}

.count-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--purple);
}

.count-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Calculator Tabs */
.calculator-tab {
  display: none;
}

.calculator-tab.active {
  display: block;
}

/* === CLASS INPUT ROW === */
.classes-list {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.class-row {
  display: grid;
  grid-template-columns: 36px 1fr 130px 70px 32px;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.class-row:hover {
  border-color: var(--purple-light);
  transform: translateX(2px);
}

.class-row:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-pale);
}

.class-row-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-paper);
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  box-shadow: 2px 2px 0 var(--text-primary);
}

.class-name-input,
.credits-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-paper);
  transition: all 0.2s ease;
}

.class-name-input:focus,
.credits-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: inset 0 0 0 1px var(--purple);
}

.class-name-input::placeholder,
.credits-input::placeholder {
  color: var(--text-muted);
}

.credits-input {
  text-align: center;
  font-family: var(--font-mono);
}

.credits-input::-webkit-outer-spin-button,
.credits-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.credits-input[type=number] {
  -moz-appearance: textfield;
}

/* Grade Input Wrapper - Toggle + Inputs */
.grade-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.grade-toggle {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: 6px;
}

.toggle-btn {
  flex: 1;
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn:hover {
  color: var(--text-secondary);
}

.toggle-btn.active {
  background: var(--purple);
  color: white;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.grade-inputs {
  position: relative;
}

.grade-mode-letter,
.grade-mode-percent {
  display: none;
}

.grade-mode-letter.active,
.grade-mode-percent.active {
  display: block;
}

/* Percent Input */
.percent-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.percent-input {
  width: 100%;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-paper);
  transition: all 0.2s ease;
}

.percent-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: inset 0 0 0 1px var(--purple);
}

.percent-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-main);
}

.percent-symbol {
  position: absolute;
  right: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--purple);
  pointer-events: none;
}

.percent-input::-webkit-outer-spin-button,
.percent-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.percent-input[type=number] {
  -moz-appearance: textfield;
}

/* Grade Select */
.select-wrapper {
  position: relative;
}

.grade-select {
  width: 100%;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-paper);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
}

.grade-select:focus {
  outline: none;
  border-color: var(--purple);
}

.select-arrow {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Remove Button */
.remove-class-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  opacity: 0;
}

.class-row:hover .remove-class-btn {
  opacity: 1;
}

.remove-class-btn:hover {
  background: var(--red-pale);
  color: var(--red);
  transform: rotate(90deg);
}

/* === ADD CLASS BUTTON === */
.add-class-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1rem;
  padding: 0.875rem;
  border: 3px dashed var(--border-dark);
  border-radius: 12px;
  background: transparent;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.add-class-btn:hover {
  border-color: var(--purple);
  border-style: solid;
  color: var(--purple);
  background: var(--purple-pale);
  transform: translateY(-2px);
}

.plus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg-paper);
  border: 2px solid currentColor;
  border-radius: 6px;
}

/* === CALCULATE BUTTON === */
.calculate-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.5rem;
  padding: 1rem 1.5rem;
  border: 3px solid var(--text-primary);
  border-radius: 14px;
  background: var(--purple);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  box-shadow: 5px 5px 0 var(--text-primary);
  transition: all 0.15s ease;
  overflow: hidden;
}

.calculate-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--text-primary);
}

.calculate-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--text-primary);
}

.btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
}

.btn-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1;
}

.btn-emoji {
  font-size: 1.2rem;
  animation: none;
}

.calculate-btn:hover .btn-emoji {
  animation: shake 0.3s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  z-index: 2;
}

.calculate-btn:hover .btn-shine {
  animation: shine 0.6s ease;
}

@keyframes shine {
  to { left: 100%; }
}

/* === FORM STYLES === */
.cumulative-form,
.target-form {
  padding: 1.5rem;
}

.form-section {
  margin-bottom: 1rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-main);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--bg-paper);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.divider-line {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 4px, transparent 4px, transparent 8px);
}

.divider-text {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--purple);
  padding: 0.3rem 0.75rem;
  background: var(--purple-pale);
  border-radius: 100px;
}

/* === RESULT CARD === */
.result-card {
  position: sticky;
  top: 100px;
  background: var(--bg-paper);
  border: 3px solid var(--text-primary);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

/* Corner decorations */
.result-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--purple);
}

.corner-tl { top: -8px; left: -8px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.corner-tr { top: -8px; right: -8px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.corner-bl { bottom: -8px; left: -8px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.corner-br { bottom: -8px; right: -8px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.result-icon .card-icon-wrapper {
  background: var(--yellow-pale);
  border-color: var(--orange);
  animation: slotSpin 3s ease-in-out infinite;
}

@keyframes slotSpin {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.result-display {
  padding: 2rem 1.5rem;
  min-height: 300px;
}

/* Placeholder State */
.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.placeholder-animation {
  display: flex;
  gap: 0.5rem;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.placeholder-eye {
  animation: lookAround 3s ease-in-out infinite;
}

.placeholder-eye:nth-child(2) {
  animation-delay: 0.1s;
}

@keyframes lookAround {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) translateY(-2px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px) translateY(2px); }
}

.placeholder-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.placeholder-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* === CALCULATED RESULT STATE === */
.gpa-display {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-main);
  border: 3px solid var(--text-primary);
  border-radius: 16px;
}

.gpa-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.gpa-number {
  font-family: var(--font-mono);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.gpa-number[data-tier="amazing"] { color: var(--green); }
.gpa-number[data-tier="good"] { color: var(--blue); }
.gpa-number[data-tier="okay"] { color: var(--yellow); }
.gpa-number[data-tier="rough"] { color: var(--orange); }
.gpa-number[data-tier="crisis"] { color: var(--red); }

.gpa-scale {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Reaction Box */
.result-reaction {
  position: relative;
  padding: 1.25rem;
  background: var(--purple-pale);
  border: 2px solid var(--purple);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
  transform: rotate(-0.5deg);
}

.reaction-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

.reaction-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.reaction-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-style: italic;
}

/* Stats */
.result-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-main);
  border-radius: 10px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-divider {
  width: 2px;
  background: var(--border);
  align-self: stretch;
}

/* UniLink Result CTA - for low GPAs */
.unilink-result-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--purple-pale) 0%, var(--pink-pale) 100%);
  border: 2px solid var(--purple);
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  transform: rotate(-0.5deg);
}

.unilink-result-cta:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
  border-color: var(--purple-dark);
}

.unilink-cta-emoji {
  font-size: 1.75rem;
  animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.unilink-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.unilink-cta-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.unilink-cta-sub {
  font-size: 0.8rem;
  color: var(--purple);
  font-weight: 600;
}

/* Result Buttons */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  border: 3px solid var(--text-primary);
  border-radius: 10px;
  background: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  box-shadow: 4px 4px 0 var(--purple);
  transition: all 0.15s ease;
}

.share-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--purple);
}

.reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-dark);
  border-radius: 10px;
  background: var(--bg-paper);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.reset-btn:hover {
  border-color: var(--text-primary);
  background: var(--bg-hover);
}

/* Target Result */
.target-result {
  text-align: center;
  padding: 1rem;
}

.target-needed {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--purple);
  margin: 1rem 0;
}

.target-message {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === UNILINK CTA === */
.unilink-cta {
  position: relative;
  max-width: 750px;
  margin: 4rem auto;
  padding: 0 2rem;
  z-index: 1;
}

.cta-card {
  position: relative;
  padding: 3rem 2.5rem;
  background: linear-gradient(135deg, var(--purple-pale) 0%, var(--pink-pale) 100%);
  border: 3px solid var(--text-primary);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
}

.cta-squiggle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, 
    var(--purple) 0, var(--purple) 20px, 
    var(--pink) 20px, var(--pink) 40px,
    var(--yellow) 40px, var(--yellow) 60px
  );
}

.cta-emoji-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.cta-emoji {
  font-size: 3.5rem;
  position: relative;
  z-index: 1;
}

.cta-emoji-shadow {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 3.5rem;
  opacity: 0.2;
  z-index: 0;
}

.cta-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.cta-highlight {
  position: relative;
  color: var(--purple);
}

.cta-highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--yellow);
  z-index: -1;
  transform: rotate(-1deg);
}

.cta-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.cta-schools {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: var(--text-primary);
  border: 3px solid var(--text-primary);
  border-radius: 100px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 4px 4px 0 var(--purple);
  transition: all 0.15s ease;
}

.cta-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--purple);
}

.cta-btn-arrow {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.cta-button:hover .cta-btn-arrow {
  transform: translateX(4px);
}

.cta-live-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--text-primary);
  color: white;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.cta-trust {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-weight: 500;
}

.cta-decoration {
  position: absolute;
  font-size: 2rem;
  color: var(--purple);
  opacity: 0.3;
}

.cta-deco-1 { top: 20%; right: 10%; }
.cta-deco-2 { bottom: 20%; left: 10%; font-size: 3rem; }
.cta-deco-3 { bottom: 15%; right: 8%; font-size: 1.5rem; opacity: 0.2; }

/* === FOOTER === */
.footer {
  position: relative;
  padding: 3rem 2rem;
  background: var(--text-primary);
  color: var(--bg-paper);
  text-align: center;
}

.footer-wave {
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--text-primary);
  clip-path: polygon(
    0% 100%, 5% 60%, 10% 80%, 15% 40%, 20% 70%, 25% 30%, 30% 60%, 35% 40%, 40% 70%, 
    45% 50%, 50% 80%, 55% 50%, 60% 70%, 65% 40%, 70% 60%, 75% 30%, 80% 70%, 85% 40%, 
    90% 80%, 95% 60%, 100% 100%
  );
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.footer-emoji {
  display: inline-block;
  animation: wiggle 2s ease-in-out infinite;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-divider {
  opacity: 0.3;
}

.footer-easter-egg {
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer:hover .footer-easter-egg {
  opacity: 0.5;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  border: 2px solid var(--purple);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* === ERROR STATE === */
.error-message {
  background: var(--red-pale);
  color: var(--red);
  padding: 1rem;
  border: 2px solid var(--red);
  border-radius: 10px;
  font-weight: 600;
  margin: 1rem 1.5rem;
  text-align: center;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* === CONFETTI === */
#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* === PROMO NOTIFICATION === */
.promo-notification {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-paper);
  border: 3px solid var(--text-primary);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--purple);
  animation: slideInRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1s both,
             notificationPulse 3s ease-in-out 2s infinite;
  transform-origin: right center;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px) rotate(5deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(-1deg);
  }
}

@keyframes notificationPulse {
  0%, 100% { transform: rotate(-1deg) scale(1); }
  50% { transform: rotate(-1deg) scale(1.02); }
}

.promo-notification::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  width: 40px;
  height: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.8), rgba(251, 191, 36, 0.5));
  border-radius: 2px;
  transform: rotate(-3deg);
  z-index: 1;
}

.promo-pulse {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-paper);
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.promo-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.promo-emoji {
  font-size: 1.5rem;
  animation: timerShake 2s ease-in-out infinite;
}

@keyframes timerShake {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-10deg); }
  20%, 40% { transform: rotate(10deg); }
  50% { transform: rotate(0deg); }
}

.promo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.promo-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.promo-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.promo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  background: var(--purple);
  border: 2px solid var(--text-primary);
  border-radius: 8px;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--text-primary);
  transition: all 0.15s ease;
}

.promo-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--text-primary);
  background: var(--purple-dark);
}

.promo-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-paper);
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  padding: 0;
}

.promo-close:hover {
  background: var(--red-pale);
  color: var(--red);
  transform: rotate(90deg);
}

.promo-notification.hidden {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  to {
    opacity: 0;
    transform: translateX(100px) rotate(5deg) scale(0.9);
  }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  
  .result-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .promo-notification {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: rotate(0deg);
    animation: slideInBottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1s both;
  }

  @keyframes slideInBottom {
    from {
      opacity: 0;
      transform: translateY(100px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .promo-notification::before {
    display: none;
  }

  .promo-content {
    flex: 1;
  }

  .header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .header-unilink {
    order: -1;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .header-unilink-text {
    display: none;
  }

  .nav-tabs {
    width: 100%;
    order: 1;
  }

  .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.75rem;
  }

  .tab-icon {
    display: none;
  }
  
  .hero {
    padding: 3rem 1.5rem 2.5rem;
  }
  
  .hero-stickers {
    display: none;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .calculator-container {
    padding: 0 1rem 3rem;
  }
  
  .card-tape {
    display: none;
  }
  
  .class-row {
    grid-template-columns: 32px 1fr 32px;
    gap: 0.5rem;
  }

  .class-name-input {
    grid-column: 1 / -1;
    order: 1;
  }

  .class-row-number {
    order: 0;
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .grade-input-wrapper {
    order: 2;
    grid-column: 1 / 3;
  }

  .select-wrapper {
    order: 2;
    grid-column: 1 / 3;
  }

  .credits-input {
    order: 3;
    grid-column: 1 / 3;
  }

  .remove-class-btn {
    order: 0;
    opacity: 1;
  }

  .grade-toggle {
    flex-direction: row;
  }

  .toggle-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .gpa-number {
    font-size: 3.5rem;
  }
  
  .result-corner {
    display: none;
  }
  
  .cta-card {
    padding: 2rem 1.5rem;
  }
  
  .cta-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .gpa-number {
    font-size: 3rem;
  }
  
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
  }
}

/* === ANIMATIONS === */
.animate-pop {
  animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
