:root {
  --bg-primary: #f5f5f5;
  --bg-card: #ffffff;
  --accent: #19429b;
  --accent-light: #5897fc;
  --text-dark: #1a1a1a;
  --text-muted: #666;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

body {
  background: var(--bg-primary);
  color: var(--text-dark);
}

/* Shared header styles */
header.site-header {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: white;
  padding: 1rem 2rem;
  text-align: center;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: white;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.header-text h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.header-text p { font-size: 1.5rem; opacity: 0.95; }
.header-text h6 { font-size: 0.9rem; opacity: 0.95; font-weight: normal; margin-top: 0.75rem; }

/* Page layout */
main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 2rem; }

.section-title {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
}

/* Assignments list */
.assignments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }

  .assignment-item {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: row;
    gap: 0;
  }

  .assignment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .assignment-thumbnail {
    flex: 0 0 auto;
    width: 200px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
  }

  .assignment-thumbnail img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 2px solid #999;
    box-sizing: border-box;
  }

  .assignment-thumbnail.placeholder {
    font-size: 2rem;
    opacity: 0.3;
  }

  .assignment-content {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .assignment-content h2 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
  }

  .assignment-content .label {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
  }

  .assignment-content p {
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    flex: 1;
    font-size: 0.9rem;
  }

  .assignment-link {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    align-self: flex-start;
  }

  .assignment-link:hover {
    background: var(--accent-light);
  }
  @media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; }
    .header-text h1 { font-size: 1.8rem; }
    .assignments-grid { grid-template-columns: 1fr; }
    main { padding: 2rem 1rem; }
  } main { padding: 2rem 1rem; }

/* CYOA versions grid */
.breadcrumb {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover { text-decoration: underline; }

.versions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.version-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.version-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.version-header {
  background: linear-gradient(135deg, #d4a574 0%, #e8c547 100%);
  padding: 0.5rem;
  color: #1a1006;
}

.version-header h2 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.version-badge {
  display: inline-block;
  background: rgba(26, 16, 6, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.version-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.version-content p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.version-features {
  background: #f9f9f9;
  padding-top: 0.2rem;
  border-radius: 6px;
  margin-bottom: auto;
  font-size: 0.9rem;
}

.version-features strong { color: var(--accent); display: block; margin-bottom: 0.5rem; }

.version-features ul {
  list-style: none;
  padding-left: 0.5rem;
}

.version-features li {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.version-features li:before {
  content: "▸ ";
  color: var(--accent);
  font-weight: bold;
  margin-right: 0.5rem;
}

.version-link {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  align-self: flex-start;
  margin-top: 1rem;
}

.version-link:hover { background: var(--accent-light); }

.version-status {
  font-size: 0.85rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

.version-status.production {
  color: #27ae60;
  font-weight: 600;
}

@media (max-width: 768px) {
  .header-content { flex-direction: column; gap: 1rem; }
  .header-text h1 { font-size: 1.8rem; }
  .assignments-grid { grid-template-columns: 1fr; }
  .versions-grid { grid-template-columns: 1fr; }
  main { padding: 2rem 1rem; }
}
