@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Quicksand:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #4361ee;
  --blue-light: #a2d2ff;
  --yellow: #ffbe0b;
  --yellow-light: #fff3bf;
  --green: #06d6a0;
  --green-light: #b7f5dd;
  --red: #ef476f;
  --red-light: #ffc4d0;
  --purple: #7b2ff7;
  --purple-light: #d8c4fb;
  --orange: #fb8500;
  --bg: #f8f7ff;
  --card-bg: #ffffff;
  --text: #2b2d42;
  --text-light: #555;
  --radius: 20px;
  --shadow: 0 8px 30px rgba(0,0,0,.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Quicksand', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Fredoka', sans-serif;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--purple-light) 50%, var(--yellow-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,190,11,.25) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: floatBlob 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,214,160,.2) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: floatBlob 10s ease-in-out infinite reverse;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  padding: .4rem 1.4rem;
  border-radius: 50px;
  font-size: .95rem;
  margin-bottom: 1.2rem;
  animation: popIn .6s cubic-bezier(.175,.885,.32,1.275) both;
  box-shadow: 0 4px 12px rgba(255,190,11,.35);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .6rem;
  animation: popIn .6s .15s cubic-bezier(.175,.885,.32,1.275) both;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-light);
  max-width: 600px;
  margin-bottom: 2rem;
  animation: popIn .6s .3s cubic-bezier(.175,.885,.32,1.275) both;
}

.hero-meta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
  animation: popIn .6s .45s cubic-bezier(.175,.885,.32,1.275) both;
}

.hero-meta .tag {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  padding: .5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.hero .start-btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1rem 2.8rem;
  border: none;
  border-radius: 50px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(67,97,238,.4);
  transition: transform .2s, box-shadow .2s;
  animation: popIn .6s .6s cubic-bezier(.175,.885,.32,1.275) both;
  position: relative;
  z-index: 1;
}

.hero .start-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 28px rgba(67,97,238,.5);
}

.hero .start-btn:active {
  transform: translateY(0) scale(.97);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(20px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Week Sections ── */
.week-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,247,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(0,0,0,.05);
  padding: .8rem 1rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.week-nav a {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  padding: .45rem 1rem;
  border-radius: 50px;
  color: var(--text);
  transition: background .2s, color .2s, transform .15s;
}

.week-nav a:hover {
  background: var(--blue);
  color: #fff;
  transform: scale(1.06);
}

.week-nav a.active {
  background: var(--blue);
  color: #fff;
}

.week-section {
  max-width: 880px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.week-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.week-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.week-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.2;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: border-color .25s, transform .25s;
}

.card:hover {
  border-color: var(--blue-light);
  transform: translateY(-4px);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card h4 {
  font-size: 1.05rem;
  margin: 1.2rem 0 .6rem;
  color: var(--purple);
}

.card p, .card li {
  font-size: 1rem;
  color: var(--text-light);
}

.card ul, .card ol {
  padding-left: 1.4rem;
  margin: .5rem 0;
}

.card li {
  margin-bottom: .35rem;
}

/* ── Learning Goals Pills ── */
.goals {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.goals .goal {
  background: var(--green-light);
  color: #0a7a5a;
  padding: .4rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
}

/* ── Password examples ── */
.pw-examples {
  display: grid;
  gap: .6rem;
  margin: 1rem 0;
}

.pw-example {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem 1rem;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
}

.pw-example.bad {
  background: var(--red-light);
}

.pw-example.good {
  background: var(--green-light);
}

.pw-example .icon {
  font-size: 1.3rem;
}

/* ── Password Strength Game ── */
.pw-game {
  background: var(--yellow-light);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.pw-game label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  display: block;
  margin-bottom: .6rem;
}

.pw-game input {
  width: 100%;
  padding: .8rem 1rem;
  border: 3px solid #ddd;
  border-radius: 12px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  outline: none;
  transition: border-color .2s;
}

.pw-game input:focus {
  border-color: var(--blue);
}

.pw-meter {
  margin-top: .8rem;
  height: 14px;
  background: #e0e0e0;
  border-radius: 50px;
  overflow: hidden;
}

.pw-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 50px;
  transition: width .4s ease, background .4s;
}

.pw-feedback {
  margin-top: .5rem;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  min-height: 1.5em;
}

.pw-rules-checklist {
  display: grid;
  gap: .3rem;
  margin-top: .8rem;
}

.pw-rules-checklist .rule {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-light);
  transition: color .2s;
}

.pw-rules-checklist .rule.pass {
  color: var(--green);
}

.pw-rules-checklist .rule .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  transition: background .2s, border-color .2s;
}

.pw-rules-checklist .rule.pass .check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* ── Phishing / Spot the Fake ── */
.email-card {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin: 1rem 0;
  font-family: 'Quicksand', monospace;
  font-size: .92rem;
  line-height: 1.6;
  position: relative;
  transition: border-color .3s;
}

.email-card.revealed-fake {
  border-color: var(--red);
  background: var(--red-light);
}

.email-card.revealed-real {
  border-color: var(--green);
  background: var(--green-light);
}

.email-card pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
}

.email-card .email-btns {
  display: flex;
  gap: .8rem;
  margin-top: 1rem;
}

.email-card .email-btns button {
  flex: 1;
  padding: .6rem 1rem;
  border: 3px solid;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  background: #fff;
}

.email-card .email-btns button:hover {
  transform: scale(1.04);
}

.email-card .email-btns .btn-fake {
  border-color: var(--red);
  color: var(--red);
}

.email-card .email-btns .btn-real {
  border-color: var(--green);
  color: #0a7a5a;
}

.email-card .email-btns button:active {
  transform: scale(.96);
}

.email-result {
  margin-top: .6rem;
  padding: .6rem 1rem;
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  display: none;
}

.email-result.show {
  display: block;
  animation: popIn .4s ease both;
}

.email-result.correct {
  background: var(--green-light);
  color: #0a7a5a;
}

.email-result.wrong {
  background: var(--red-light);
  color: #c1243a;
}

/* ── Red Flags ── */
.red-flags {
  display: grid;
  gap: .5rem;
  margin: 1rem 0;
}

.red-flag {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1rem;
  border-radius: 12px;
  background: var(--red-light);
  font-weight: 600;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,71,111,.15); }
  50% { box-shadow: 0 0 0 8px rgba(239,71,111,0); }
}

/* ── Rules boxes ── */
.rules-box {
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  margin: 1rem 0;
}

.rules-box.blue { background: var(--blue-light); }
.rules-box.green { background: var(--green-light); }
.rules-box.yellow { background: var(--yellow-light); }
.rules-box.purple { background: var(--purple-light); }

.rules-box h4 {
  color: var(--text);
  margin-bottom: .5rem;
}

.rules-box li {
  color: var(--text) !important;
  font-weight: 600;
}

/* ── Vulnerability types ── */
.vuln-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.vuln-item {
  background: var(--yellow-light);
  border-radius: 14px;
  padding: 1.2rem;
  transition: transform .2s;
}

.vuln-item:hover {
  transform: rotate(-1deg) scale(1.02);
}

.vuln-item h4 {
  margin: 0 0 .4rem;
  color: var(--orange);
}

.vuln-item p {
  font-size: .9rem;
}

/* ── Right vs Wrong ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .compare-grid { grid-template-columns: 1fr; }
}

.compare-col {
  border-radius: 14px;
  padding: 1.2rem;
}

.compare-col.wrong-col {
  background: var(--red-light);
}

.compare-col.right-col {
  background: var(--green-light);
}

.compare-col h4 {
  margin-bottom: .5rem;
}

/* ── Vuln Report Form ── */
.report-form {
  background: var(--purple-light);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.report-form h4 {
  color: var(--purple);
  margin-bottom: 1rem;
}

.report-form label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  margin: .8rem 0 .3rem;
}

.report-form input,
.report-form textarea,
.report-form select {
  width: 100%;
  padding: .6rem .8rem;
  border: 2px solid #ccc;
  border-radius: 10px;
  font-family: 'Quicksand', sans-serif;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}

.report-form input:focus,
.report-form textarea:focus,
.report-form select:focus {
  border-color: var(--purple);
}

.report-form textarea {
  resize: vertical;
  min-height: 60px;
}

.report-form button {
  margin-top: 1rem;
  padding: .7rem 2rem;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .15s;
}

.report-form button:hover {
  transform: scale(1.05);
}

/* ── Checklist ── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.checklist li .box {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 3px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}

.checklist li.checked .box {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* ── Hacker Profile Card ── */
.profile-card {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  border-radius: var(--radius);
  padding: 2rem;
  color: #fff;
  margin: 1rem 0;
}

.profile-card h4 {
  color: var(--yellow);
}

.profile-card input,
.profile-card textarea {
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 10px;
  padding: .5rem .8rem;
  width: 100%;
  font-family: 'Quicksand', sans-serif;
  font-size: .95rem;
  outline: none;
  margin: .3rem 0 .8rem;
}

.profile-card input::placeholder,
.profile-card textarea::placeholder {
  color: rgba(255,255,255,.5);
}

.profile-card .specialty-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .5rem 0 1rem;
}

.profile-card .specialty-btn {
  padding: .4rem 1rem;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,.4);
  background: transparent;
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.profile-card .specialty-btn.selected {
  background: var(--yellow);
  color: var(--text);
  border-color: var(--yellow);
}

/* ── Jobs Grid ── */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.job-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s;
}

.job-card:hover {
  transform: translateY(-4px) rotate(1deg);
}

.job-card .job-icon {
  font-size: 2.2rem;
  margin-bottom: .5rem;
}

.job-card h4 {
  font-size: .95rem;
  color: var(--blue);
  margin-bottom: .3rem;
}

.job-card p {
  font-size: .8rem;
}

/* ── Glossary ── */
.glossary-grid {
  display: grid;
  gap: .6rem;
  margin: 1rem 0;
}

.glossary-item {
  display: flex;
  gap: 1rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .15s;
}

.glossary-item:hover {
  transform: translateX(6px);
}

.glossary-item strong {
  font-family: 'Fredoka', sans-serif;
  color: var(--purple);
  min-width: 160px;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  color: rgba(255,255,255,.8);
  font-weight: 600;
}

.site-footer h2 {
  color: #fff;
  margin-bottom: .5rem;
}

/* ── Confetti canvas ── */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ── Misc ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

@media (max-width: 600px) {
  .week-section { padding: 3rem 1rem 1.5rem; }
  .card { padding: 1.3rem; }
  .hero h1 { font-size: 2rem; }
}
