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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background: #0e0e10;
  color: #e0e0e0;
  font-family: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  min-height: 100vh;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.gh-star-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.gh-star-btn:hover {
  border-color: #f5b400;
  color: #f5b400;
  background: rgba(245, 180, 0, 0.06);
}

.gh-star-btn svg {
  color: #f5b400;
  flex-shrink: 0;
}

.left-panel {
  width: 600px;
  min-width: 600px;
  height: 100vh;
  border-right: 1px solid #1e1e22;
  overflow: hidden;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #111114;
}

.left-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #1e1e22;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1e1e22;
}

.logo-area img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
}

.logo-area .logo-text {
  display: flex;
  flex-direction: column;
}

.logo-area .logo-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.logo-area .logo-sub {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.logo-divider {
  width: 1px;
  height: 36px;
  background: #2a2a30;
  flex-shrink: 0;
}

.logo-ring {
  font-size: 11px;
  color: #6b6b75;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

.welcome-text {
  font-size: 14px;
  line-height: 1.6;
  color: #8a8a96;
}

.welcome-text a {
  color: #0077c2;
  text-decoration: none;
}

.welcome-text a:hover {
  text-decoration: underline;
}

.goal-tracker {
  display: flex;
  align-items: center;
  gap: 16px;
}

.goal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goal-preview-btn {
  padding: 6px 14px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 8px;
  color: #6b6b75;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

.goal-preview-btn:hover {
  border-color: #0077c2;
  color: #0077c2;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
}

.modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 50%;
  color: #e0e0e0;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-text {
  font-size: 14px;
  color: #e0e0e0;
  font-weight: 600;
}

.goal-text #goal-count {
  color: #0077c2;
}

.goal-bar {
  width: 100%;
  height: 6px;
  background: #1a1a1f;
  border-radius: 3px;
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  background: #0077c2;
  border-radius: 3px;
  transition: width 0.6s ease;
  width: 0%;
}

.goal-label {
  font-size: 12px;
  color: #4a4a54;
}

.goal-label-husky {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #0077c2;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: inherit;
  transition: color 0.2s, transform 0.2s;
}

.goal-label-husky:hover,
.goal-label-husky:focus-visible {
  color: #2a9cdf;
  transform: translateY(-1px);
  outline: none;
}

.dev-team {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.dev-team-label {
  font-size: 12px;
  font-weight: 600;
  color: #4a4a54;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dev-team-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b6b75;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s;
}

.dev-team-link:hover {
  color: #0077c2;
}

.dev-team-link svg {
  color: #3a3a44;
}

.dev-modal-card {
  background: #111114;
  border: 1px solid #2a2a30;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 400px;
  width: 90vw;
}

.dev-modal-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
}

.dev-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dev-modal-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.dev-modal-role {
  font-size: 13px;
  color: #0077c2;
  margin-top: 4px;
}

.dev-modal-bio {
  font-size: 14px;
  line-height: 1.6;
  color: #8a8a96;
  margin-top: 16px;
}

.dev-modal-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.dev-modal-link {
  font-size: 13px;
  color: #0077c2;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid #2a2a30;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.dev-modal-link:hover {
  border-color: #0077c2;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 130px 10px 36px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

.search-box input::placeholder {
  color: #4a4a54;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.search-box input:focus {
  border-color: #0077c2;
  background: #1f1f26;
  box-shadow: 0 0 0 3px rgba(0, 119, 194, 0.15);
}

.search-box input:focus::placeholder {
  opacity: 0.6;
}

.search-box input:active {
  transform: scale(0.997);
}

.search-box input:hover {
  cursor: none;
  background: #1d1d24;
  border-color: #3a3a44;
}

.husky-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  display: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  -webkit-mask: url('../assets/husky.svg') no-repeat center / contain;
  mask: url('../assets/husky.svg') no-repeat center / contain;
  background-color: #0077c2;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.husky-cursor.active {
  display: block;
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4a4a54;
  pointer-events: none;
  transition: color 0.25s ease;
}

.search-box input:focus ~ .search-icon {
  color: #0077c2;
}

.search-filter-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #0e0e10;
  border: 1px solid #2a2a30;
  border-radius: 7px;
  color: #8a8a96;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.search-filter-btn:hover,
.search-filter-btn[aria-expanded="true"] {
  border-color: #0077c2;
  color: #0077c2;
}

.search-filter-btn svg {
  flex-shrink: 0;
}

.search-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 120px;
  background: #15151a;
  border: 1px solid #2a2a30;
  border-radius: 10px;
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: filter-menu-in 0.15s ease-out;
}

.search-filter-menu.active {
  display: flex;
}

@keyframes filter-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.search-filter-option {
  text-align: left;
  padding: 7px 10px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #d0d0d6;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.search-filter-option:hover {
  background: #1f1f26;
  color: #0077c2;
}

.students-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #4a4a54;
  padding-bottom: 8px;
}

.student-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}

.student-list::-webkit-scrollbar { width: 6px; }
.student-list::-webkit-scrollbar-track { background: transparent; }
.student-list::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 4px; }
.student-list::-webkit-scrollbar-thumb:hover { background: #3a3a44; }

.student-item {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.student-item:hover {
  background: #1a1a1f;
}

.student-name {
  font-size: 14px;
  font-weight: 500;
  color: #d0d0d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-year {
  font-size: 12px;
  color: #4a4a54;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.student-url {
  font-size: 12px;
  color: #0077c2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.context-menu {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 220px;
  background: #15151a;
  border: 1px solid #2a2a30;
  border-radius: 10px;
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 2000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  animation: context-menu-in 0.12s ease-out;
}

.context-menu.active {
  display: flex;
}

@keyframes context-menu-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #d0d0d6;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.context-menu-item:hover {
  background: #1f1f26;
  color: #0077c2;
}

.context-menu-item svg {
  color: #6b6b75;
  flex-shrink: 0;
  transition: color 0.15s;
}

.context-menu-item:hover svg {
  color: #0077c2;
}

.chart-wrap {
  position: fixed;
  left: 50%;
  right: 0;
  bottom: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.chart-close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  color: #e0e0e0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: border-color 0.2s, color 0.2s;
}

.chart-close:hover {
  border-color: #0077c2;
  color: #0077c2;
}

.tutorial-fab {
  position: fixed;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  height: 36px;
  border-radius: 18px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  color: #d0d0d6;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  z-index: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tutorial-fab:hover,
.tutorial-fab:focus-visible {
  border-color: #0077c2;
  color: #0077c2;
  background: rgba(0, 119, 194, 0.08);
}

.tutorial-fab svg {
  color: #6b6b75;
  flex-shrink: 0;
  transition: color 0.2s;
}

.tutorial-fab:hover svg,
.tutorial-fab:focus-visible svg {
  color: #0077c2;
}

body.chart-open .tutorial-fab {
  display: none;
}

.tutorial-card {
  background: #111114;
  border: 1px solid #2a2a30;
  border-radius: 16px;
  padding: 56px 32px 32px;
  width: min(92vw, 520px);
  max-height: 85vh;
  overflow-y: auto;
  text-align: left;
}

.tutorial-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 50%;
  color: #e0e0e0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: border-color 0.2s, color 0.2s;
}

.tutorial-close:hover {
  border-color: #0077c2;
  color: #0077c2;
}

.tutorial-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.tutorial-sub {
  font-size: 13px;
  color: #6b6b75;
  margin-top: 6px;
}

.tutorial-steps {
  margin: 20px 0 24px 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #a8a8b2;
  font-size: 13px;
  line-height: 1.6;
}

.tutorial-steps li::marker {
  color: #4a4a54;
  font-weight: 600;
}

.tutorial-steps strong {
  color: #e0e0e0;
  font-weight: 600;
}

.tutorial-steps a {
  color: #0077c2;
  text-decoration: none;
}

.tutorial-steps a:hover {
  text-decoration: underline;
}

.tutorial-steps code {
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 12px;
  color: #d0d0d6;
}

.tutorial-steps pre {
  margin-top: 8px;
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
}

.tutorial-steps pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #d0d0d6;
  white-space: pre;
}

.tutorial-cta {
  display: inline-block;
  padding: 10px 18px;
  background: #0077c2;
  color: #ffffff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.tutorial-cta:hover {
  background: #0086db;
}

.tutorial-star {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #1e1e22;
  font-size: 12px;
  line-height: 1.55;
  color: #6b6b75;
}

.tutorial-star svg {
  color: #f5b400;
  flex-shrink: 0;
  margin-top: 2px;
}

.tutorial-star a {
  color: #f5b400;
  text-decoration: none;
  font-weight: 600;
}

.tutorial-star a:hover {
  text-decoration: underline;
}

.tutorial-card {
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}

.tutorial-card::-webkit-scrollbar { width: 6px; height: 6px; }
.tutorial-card::-webkit-scrollbar-track { background: transparent; }
.tutorial-card::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 4px; }
.tutorial-card::-webkit-scrollbar-thumb:hover { background: #3a3a44; }

.tutorial-steps pre {
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}

.tutorial-steps pre::-webkit-scrollbar { width: 6px; height: 6px; }
.tutorial-steps pre::-webkit-scrollbar-track { background: transparent; }
.tutorial-steps pre::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 4px; }
.tutorial-steps pre::-webkit-scrollbar-thumb:hover { background: #3a3a44; }

.chart-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0 18px 0 14px;
  height: 52px;
  gap: 8px;
  border-radius: 26px;
  background: #0077c2;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 119, 194, 0.45), 0 2px 4px rgba(0,0,0,0.3);
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.chart-fab:hover, .chart-fab:focus-visible {
  transform: translateY(-2px);
  background: #0086db;
  box-shadow: 0 14px 32px rgba(0, 119, 194, 0.55), 0 2px 4px rgba(0,0,0,0.3);
}

.chart-fab:active {
  transform: translateY(0);
}

.chart-box {
  width: 100%;
  height: 24rem;
  border: 1px solid #2a2a30;
  border-radius: 12px;
  overflow: hidden;
  background: #111114;
}

@media (min-width: 1024px) {
  .chart-box {
    height: 32rem;
  }
}

#chart-container {
  width: 100%;
  height: 100%;
}

.left-panel::-webkit-scrollbar { width: 4px; }
.left-panel::-webkit-scrollbar-track { background: transparent; }
.left-panel::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 4px; }

@media (max-width: 1024px) {
  .layout { flex-direction: column; }
  .left-panel {
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #1e1e22;
    padding: 24px 20px;
    overflow: visible;
  }

  .student-list {
    flex: none;
    min-height: 0;
    overflow-y: visible;
  }

  .chart-wrap {
    display: none;
    inset: 0;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    background: rgba(14, 14, 16, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }

  .chart-wrap.active {
    display: flex;
    animation: chart-modal-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  }

  @keyframes chart-modal-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
  }

  .chart-wrap .chart-box {
    flex: 0 0 auto;
    width: min(92vw, 480px);
    height: min(62vh, 520px);
    max-width: none;
  }

  .chart-close {
    display: inline-flex;
  }

  .chart-fab {
    display: inline-flex;
  }

  body.chart-open {
    overflow: hidden;
  }

  .tutorial-fab {
    top: auto;
    right: auto;
    bottom: 20px;
    left: 20px;
  }
}

@media (max-width: 560px) {
  .logo-area { flex-wrap: wrap; }
  .gh-star-btn { order: 2; margin-left: auto; }
  .chart-fab { bottom: 16px; right: 16px; height: 48px; }
  .tutorial-fab { bottom: 16px; left: 16px; }
}

@media (max-width: 480px) {
  .left-panel { padding: 20px 16px; }
  .student-item { grid-template-columns: 1fr 44px minmax(0, 1.2fr); gap: 6px; padding: 8px 10px; }
  .student-name { font-size: 13px; }
  .student-url { font-size: 11px; }
  .gh-star-btn { font-size: 10px; padding: 5px 8px; }
}
