@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1025 40%, #0d1b2a 100%);
  color: #e0e0e0;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 35px 24px;
}

/* ============ HEADER ============ */
header {
  text-align: center;
  margin-bottom: 50px;
}

.logo {
  width: 420px;
  max-width: 92%;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 10px rgba(196,30,58,0.2));
}

header h1 {
  font-size: 2.8em;
  font-weight: 700;
  background: linear-gradient(135deg, #C41E3A, #e8556d, #C41E3A);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease-in-out infinite;
  margin-bottom: 8px;
}

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

.subtitle {
  font-size: 1.2em;
  color: #9090b0;
  font-weight: 300;
  margin-bottom: 24px;
}

/* Scoreboard */
.scoreboard {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(196,30,58,0.06);
  border: 1px solid rgba(196,30,58,0.2);
  border-radius: 30px;
  padding: 14px 32px;
  margin-bottom: 14px;
}

.score-label {
  color: #9090b0;
  font-size: 1em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score-number {
  font-size: 2.4em;
  font-weight: 700;
  color: #C41E3A;
  font-family: 'Fira Code', monospace;
}

.score-total {
  font-size: 1.4em;
  color: #555;
  font-family: 'Fira Code', monospace;
}

.progress-bar {
  width: 140px;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-left: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #C41E3A, #e8556d);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.reset-btn {
  display: inline-block;
  margin-top: 10px;
  color: #666;
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.2s;
}

.reset-btn:hover {
  color: #C41E3A;
}

/* ============ CHALLENGE GRID ============ */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  margin-bottom: 45px;
}

.challenge-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.challenge-card:hover {
  transform: translateY(-5px);
  border-color: rgba(196,30,58,0.35);
  box-shadow: 0 12px 35px rgba(196,30,58,0.08);
}

.challenge-card.solved {
  border-color: rgba(80,200,120,0.35);
}

.challenge-card.solved::after {
  content: '✅ SOLVED';
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 0.8em;
  font-weight: 600;
  color: #50c878;
  letter-spacing: 1px;
}

.card-badge {
  display: inline-block;
  background: rgba(196,30,58,0.15);
  color: #e8556d;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
}

.card-badge.forensics {
  background: rgba(80,160,255,0.12);
  color: #60b0ff;
}

.card-difficulty {
  position: absolute;
  top: 26px;
  right: 22px;
  font-size: 0.9em;
}

.challenge-card h3 {
  font-size: 1.35em;
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}

.challenge-card p {
  font-size: 1.02em;
  color: #9090b0;
  line-height: 1.7;
  margin-bottom: 8px;
}

.hint-text {
  font-size: 0.9em !important;
  color: #C41E3A !important;
  opacity: 0.6;
}

.play-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 26px;
  background: linear-gradient(135deg, #C41E3A, #a01830);
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 18px rgba(196,30,58,0.3);
}

/* ============ FOOTER ============ */
footer {
  text-align: center;
  padding: 22px;
  color: #555;
  font-size: 1em;
}

footer code {
  background: rgba(196,30,58,0.1);
  color: #e8556d;
  padding: 3px 10px;
  border-radius: 5px;
  font-family: 'Fira Code', monospace;
  font-size: 0.95em;
}

footer p {
  margin-bottom: 6px;
}

/* ============ CHALLENGE PAGE ============ */
.challenge-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 35px 24px;
}

.back-link {
  display: inline-block;
  color: #8080a0;
  text-decoration: none;
  margin-bottom: 24px;
  font-size: 1em;
  transition: color 0.2s;
}

.back-link:hover {
  color: #C41E3A;
}

.challenge-page .page-logo {
  display: block;
  width: 240px;
  margin: 0 auto 22px;
  opacity: 0.7;
}

.challenge-header {
  margin-bottom: 30px;
}

.challenge-header h1 {
  font-size: 2em;
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}

.challenge-header .desc {
  color: #9090b0;
  font-size: 1.1em;
  line-height: 1.7;
}

.challenge-content {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 34px;
  margin-bottom: 28px;
}

.challenge-content h2 {
  font-size: 1.3em;
  color: #C41E3A;
  font-weight: 600;
  margin-bottom: 16px;
}

.story-box {
  background: rgba(196,30,58,0.04);
  border-left: 3px solid #C41E3A;
  padding: 18px 24px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 22px;
  font-size: 1.05em;
  line-height: 1.8;
  color: #b0b0c8;
}

.hint-box {
  background: rgba(80,160,255,0.04);
  border: 1px dashed rgba(80,160,255,0.2);
  border-radius: 12px;
  padding: 16px 22px;
  margin-top: 18px;
  font-size: 1em;
  color: #7aa8d0;
}

.hint-toggle {
  cursor: pointer;
  color: #60b0ff;
  font-weight: 500;
  font-size: 1.05em;
}

/* Flag form */
.flag-form {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.flag-input {
  flex: 1;
  padding: 15px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 1.1em;
  font-family: 'Fira Code', monospace;
  outline: none;
  transition: border-color 0.2s;
}

.flag-input:focus {
  border-color: #C41E3A;
}

.flag-input::placeholder {
  color: #444;
}

.submit-btn {
  padding: 15px 30px;
  background: linear-gradient(135deg, #C41E3A, #a01830);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.1em;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
}

.submit-btn:hover {
  transform: scale(1.04);
}

.result-msg {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.05em;
  display: none;
}

.result-msg.success {
  background: rgba(80,200,120,0.08);
  color: #50c878;
  border: 1px solid rgba(80,200,120,0.25);
}

.result-msg.error {
  background: rgba(196,30,58,0.08);
  color: #e8556d;
  border: 1px solid rgba(196,30,58,0.25);
}

/* ============ FAKE WEBSITE ============ */
.fake-website {
  background: #fff;
  color: #333;
  border-radius: 14px;
  overflow: hidden;
  margin: 18px 0;
  box-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.fake-navbar {
  background: #C41E3A;
  color: white;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05em;
}

.fake-body {
  padding: 28px;
  min-height: 200px;
}

.fake-body h2 {
  color: #333;
  margin-bottom: 14px;
  font-size: 1.3em;
}

.fake-body p {
  color: #555;
  line-height: 1.8;
  font-size: 1.05em;
}

/* ============ TOOLS SECTION ============ */
.tools-section {
  background: rgba(80,160,255,0.04);
  border: 1px solid rgba(80,160,255,0.12);
  border-radius: 14px;
  padding: 22px;
  margin: 20px 0;
}

.tools-section h3 {
  color: #60b0ff;
  font-size: 1.15em;
  font-weight: 600;
  margin-bottom: 14px;
}

.tools-section ul {
  list-style: none;
  padding: 0;
}

.tools-section li {
  padding: 6px 0;
  color: #9090b0;
  font-size: 1em;
  line-height: 1.6;
}

.tools-section li::before {
  content: "› ";
  color: #60b0ff;
  font-weight: bold;
}

.tools-section code {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 5px;
  font-family: 'Fira Code', monospace;
  font-size: 0.92em;
  color: #e8556d;
}

/* ============ LOG VIEWER ============ */
.log-viewer {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 18px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85em;
  line-height: 1.8;
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
  color: #c9d1d9;
  white-space: pre;
}

/* ============ DOWNLOAD BUTTON ============ */
.download-btn {
  display: inline-block;
  padding: 13px 28px;
  background: linear-gradient(135deg, #50a0ff, #3070c0);
  color: white;
  text-decoration: none;
  border-radius: 14px;
  font-size: 1.05em;
  font-weight: 500;
  margin: 14px 0;
  transition: transform 0.2s;
}

.download-btn:hover {
  transform: scale(1.04);
}

/* ============ EDUCATIONAL PAGE ============ */
.edu-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 35px 24px;
}

.edu-page .page-logo {
  display: block;
  width: 220px;
  margin: 0 auto 28px;
}

.edu-card {
  background: linear-gradient(135deg, rgba(196,30,58,0.06), rgba(80,160,255,0.04));
  border: 1px solid rgba(196,30,58,0.15);
  border-radius: 22px;
  padding: 45px;
  text-align: center;
  margin-bottom: 28px;
}

.edu-card .congrats {
  font-size: 3em;
  margin-bottom: 10px;
}

.edu-card h1 {
  font-size: 1.9em;
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.edu-card .flag-reveal {
  display: inline-block;
  background: rgba(196,30,58,0.12);
  border: 1px solid rgba(196,30,58,0.25);
  border-radius: 12px;
  padding: 12px 28px;
  font-family: 'Fira Code', monospace;
  font-size: 1.25em;
  color: #e8556d;
  margin: 18px 0;
}

.edu-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 34px;
  margin-bottom: 22px;
  text-align: left;
}

.edu-section h2 {
  font-size: 1.35em;
  color: #C41E3A;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.edu-section p {
  color: #b0b0c8;
  font-size: 1.05em;
  line-height: 1.85;
  margin-bottom: 12px;
}

.edu-section strong {
  color: #ddd;
}

.edu-section code {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 5px;
  font-family: 'Fira Code', monospace;
  font-size: 0.92em;
  color: #e8556d;
}

.real-world-box {
  background: rgba(80,200,120,0.05);
  border-left: 4px solid #50c878;
  padding: 18px 24px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
}

.real-world-box h3 {
  color: #50c878;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 10px;
}

.real-world-box p {
  color: #90b0a0;
  font-size: 1.02em;
  line-height: 1.8;
}

.career-box {
  background: rgba(196,30,58,0.04);
  border-left: 4px solid #C41E3A;
  padding: 18px 24px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
}

.career-box h3 {
  color: #e8556d;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 10px;
}

.career-box p {
  color: #b0a0b8;
  font-size: 1.02em;
  line-height: 1.8;
}

.next-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.next-btn {
  padding: 12px 26px;
  background: linear-gradient(135deg, #C41E3A, #a01830);
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-size: 1.05em;
  font-weight: 500;
  transition: transform 0.2s;
}

.next-btn:hover {
  transform: scale(1.05);
}

.next-btn.secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #aaa;
}

.next-btn.secondary:hover {
  border-color: rgba(196,30,58,0.3);
  color: #ddd;
}
