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

:root {
  --illini-blue: #13294b;
  --illini-orange: #e84a27;
  --light-bg: #f5f5f5;
  --success: #4caf50;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--light-bg);
  color: var(--illini-blue);
  line-height: 1.6;
}

body.terms-page {
  background: #ffffff;
}

.header {
  background: var(--illini-blue);
  color: white;
  padding: 36px 20px;
  text-align: center;
  border-bottom: 5px solid var(--illini-orange);
}

.header h1 {
  font-size: 2.4em;
  margin-bottom: 8px;
}

.header p {
  font-size: 1em;
  opacity: 0.9;
}

.site-nav {
  background: white;
  border-bottom: 2px solid #e5e5e5;
}

.site-nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--illini-blue);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-nav a:hover,
.site-nav a.active {
  border-color: var(--illini-orange);
  color: var(--illini-orange);
}

.site-nav a.completed::after {
  content: '✓';
  font-size: 0.85em;
  background: var(--success);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.intro {
  background: white;
  padding: 30px;
  margin-bottom: 30px;
  border-left: 4px solid var(--illini-orange);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.card-panel {
  background: white;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
}

.card-panel h3 {
  color: var(--illini-blue);
  margin-bottom: 10px;
}

.card-panel p {
  margin-bottom: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  background: #f0f0f0;
  color: #4d4d4d;
}

.status-pill.is-complete {
  background: #e8f5e9;
  color: #2e7d32;
}

.button,
.tool-badge {
  display: inline-block;
  background: var(--illini-orange);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.button:hover,
.tool-badge:hover {
  background: #d43d1f;
  color: white;
}

.tool-badge {
  margin: 5px 6px 5px 0;
  font-size: 0.85em;
}

.section-title {
  color: var(--illini-blue);
  margin-top: 30px;
  margin-bottom: 15px;
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.duration-badge,
.category-badge,
.tool-mini-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
}

.duration-badge {
  background: var(--illini-blue);
  color: white;
}

.category-badge {
  background: var(--illini-orange);
  color: white;
}

.tool-mini-badge {
  background: #e8f5e9;
  color: #2e7d32;
}

.prompt-box {
  background: #fff;
  border: 2px solid var(--illini-blue);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
}

.prompt-box::before {
  content: '📝 Try This Prompt';
  position: absolute;
  top: -12px;
  left: 15px;
  background: white;
  padding: 0 10px;
  color: var(--illini-orange);
  font-weight: 600;
  font-size: 0.85em;
}

.prompt-text {
  font-family: 'Courier New', monospace;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.copy-button {
  background: var(--illini-orange);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  transition: background 0.3s ease;
}

.copy-button:hover {
  background: #d43d1f;
}

.copy-button.copied {
  background: var(--success);
}

.steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step-counter;
  margin-bottom: 25px;
  padding-left: 45px;
  position: relative;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: var(--illini-orange);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.steps ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-top: 10px;
}

.steps ul li {
  counter-increment: none;
  padding-left: 0;
}

.steps ul li::before {
  display: none;
}

.flip-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.flip-card {
  background-color: transparent;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
  background: var(--illini-blue);
  color: white;
}

.flip-card-back {
  background: white;
  color: var(--illini-blue);
  border: 3px solid var(--illini-blue);
  transform: rotateY(180deg);
}

.flip-card-back ul {
  text-align: left;
  list-style: none;
  padding: 0;
}

.flip-card-back li {
  margin: 10px 0;
  padding-left: 18px;
  position: relative;
}

.flip-card-back li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--illini-orange);
  font-weight: bold;
}

.flip-instruction {
  text-align: center;
  color: #666;
  font-size: 0.9em;
  margin-top: 10px;
  font-style: italic;
}

.completion-section {
  background: #f8f9fa;
  padding: 25px;
  margin-top: 30px;
  border-radius: 8px;
  border: 2px solid var(--illini-blue);
  text-align: center;
}

.mark-complete-btn {
  background: var(--success);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mark-complete-btn:hover {
  background: #45a049;
  transform: scale(1.05);
}

.mark-complete-btn.completed {
  background: var(--illini-blue);
}

.completion-feedback {
  margin-top: 15px;
  padding: 15px;
  background: #e8f5e9;
  border-radius: 4px;
  display: none;
}

.completion-feedback.show {
  display: block;
}

.resources-box {
  background: var(--illini-blue);
  color: white;
  padding: 30px;
  margin-top: 40px;
  border-radius: 8px;
}

.resources-box h2 {
  color: white;
  margin-bottom: 20px;
}

.resources-box h3 {
  color: var(--illini-orange);
  margin-top: 25px;
  margin-bottom: 15px;
}

.resources-box ul {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}

.resources-box ul li {
  margin: 10px 0;
  line-height: 1.8;
}

.resources-box a {
  color: white;
  text-decoration: underline;
}

.resources-box a:hover {
  color: var(--illini-orange);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  border-bottom: 2px solid #e5e5e5;
}

.tab-button {
  background: none;
  border: none;
  color: var(--illini-blue);
  font-size: 1em;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.tab-button:hover,
.tab-button.active {
  color: var(--illini-orange);
  border-bottom-color: var(--illini-orange);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.card-container {
  perspective: 1000px;
  height: 180px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  cursor: pointer;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 2px solid var(--illini-blue);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: white;
}

.card-front:hover {
  border-color: var(--illini-orange);
  box-shadow: 0 4px 12px rgba(232, 74, 39, 0.15);
}

.card-back {
  background: var(--illini-blue);
  color: white;
  transform: rotateY(180deg);
  border-color: var(--illini-blue);
}

.card-term {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--illini-blue);
  line-height: 1.3;
}

.card-definition {
  font-size: 0.9em;
  line-height: 1.5;
  overflow-y: auto;
  max-height: 100%;
}

.tool-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--illini-orange);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85em;
  transition: background 0.3s ease;
}

.tool-link:hover {
  background: #d43d1f;
}

.instruction {
  text-align: center;
  color: var(--illini-orange);
  margin-top: 40px;
  font-size: 0.95em;
  font-weight: 500;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8em;
  }

  .site-nav .nav-inner {
    justify-content: center;
  }

  .card-container {
    height: 200px;
  }
}
