.summary-panel {
  background: var(--surface-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.summary-panel h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

:root {
  --bg: #f4f7fb;
  --bg-gradient: radial-gradient(circle at 20% 20%, rgba(197, 255, 237, 0.85), rgba(186, 243, 226, 0.9), rgba(138, 221, 211, 0.85), rgba(108, 206, 196, 0.95));
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --accent: #1aa579;
  --accent-soft: rgba(26, 165, 121, 0.18);
  --text: #103b31;
  --text-muted: #3b6d62;
  --border: rgba(255, 255, 255, 0.35);
  --radius: 14px;
  --shadow: 0 24px 48px rgba(17, 94, 89, 0.18);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

.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 {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.6s ease;
}

.app-header,
.app-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.app-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.app-header p {
  margin: 0.75rem auto 0;
  max-width: 42rem;
  color: var(--text-muted);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem 2.5rem;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(320px, 1fr);
  gap: 2.5rem;
  width: 100%;
  max-width: min(1200px, 92vw);
  min-height: min(640px, 80vh);
  max-height: 82vh;
  align-items: stretch;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(18px);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(12, 74, 110, 0.12);
}

.study-view {
  display: block;
  width: 100%;
}

.study-view.hidden {
  display: none;
}

.dashboard-hero {
  position: relative;
  border-radius: calc(var(--radius) + 10px);
  padding: 3rem;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.35), rgba(13, 148, 136, 0.12)),
    linear-gradient(135deg, rgba(12, 74, 110, 0.92), rgba(8, 47, 73, 0.92));
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(12, 74, 110, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.75rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 360px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.25);
  color: rgba(224, 242, 254, 0.95);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero-title {
  margin: 0.5rem 0;
  font-size: clamp(2.4rem, 3.5vw + 1rem, 4.2rem);
  line-height: 1.1;
  background: linear-gradient(90deg, #38bdf8, #34d399, #f97316, #f472b6, #38bdf8);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroTitleGlow 8s ease infinite;
}

.hero-text {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-visual {
  position: absolute;
  inset: -20% -35% -10% auto;
  width: clamp(260px, 55%, 420px);
  background: url("assets/earth.jpg") center/cover no-repeat;
  opacity: 0.7;
  filter: saturate(1.1) contrast(1.05);
  animation: heroFloat 10s ease-in-out infinite;
  border-radius: 45% 55% 50% 60% / 55% 45% 55% 45%;
}

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

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-12px) rotate(1deg) scale(1.02);
  }
}

.dashboard-view {
  background: var(--surface-strong);
  border-radius: calc(var(--radius) + 8px);
  padding: 2.25rem;
  max-height: 100%;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.dashboard-view::before {
  content: "";
  position: absolute;
  inset: -40% 30% auto -30%;
  height: 120%;
  width: 160%;
  background: radial-gradient(circle at 30% 20%, rgba(82, 197, 166, 0.35), transparent 55%);
  z-index: 0;
}

.dashboard-view > * {
  position: relative;
  z-index: 1;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
}

.dashboard-header p {
  margin: 0.5rem 0 1.5rem;
  color: var(--text-muted);
}

.dashboard-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-height: calc(100% - 120px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.dashboard-card {
  position: relative;
  border: none;
  border-radius: calc(var(--radius) + 6px);
  padding: 1.8rem 1.6rem;
  background: linear-gradient(135deg, rgba(24, 206, 172, 0.98), rgba(34, 197, 193, 0.95));
  box-shadow: 0 20px 40px rgba(13, 148, 136, 0.3);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, filter 0.35s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: white;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  overflow: hidden;
}

.dashboard-card:hover,
.dashboard-card:focus-visible {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 50px rgba(13, 148, 136, 0.4);
  filter: brightness(1.08);
  outline: none;
}

.dashboard-card::after {
  content: "";
  position: absolute;
  inset: -60% -20% 50% auto;
  width: 160%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  transform: rotate(18deg);
  transition: transform 0.6s cubic-bezier(0.22, 0.68, 0, 1);
}

.dashboard-card:hover::after,
.dashboard-card:focus-visible::after {
  transform: translateY(60%) rotate(18deg);
}

.dashboard-card span {
  font-size: 0.9rem;
  opacity: 0.85;
}

.dashboard-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.dashboard-card p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.dashboard-card .cta-arrow {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  opacity: 0.85;
}

.dashboard-card .cta-arrow::after {
  content: "→";
  animation: arrow-glide 1.2s ease-in-out infinite;
}

.detail-panel {
  background: var(--surface-strong);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.dashboard-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.dashboard-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.back-btn {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: #1f2937;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-btn:hover,
.back-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.25);
  outline: none;
}

.summary-panel,
.detail-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.summary-panel h2,
.detail-header h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.summary-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.summary-card {
  position: relative;
  border: none;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem;
  background: linear-gradient(135deg, rgba(186, 230, 220, 0.92), rgba(152, 221, 203, 0.92));
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.14);
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  overflow: hidden;
}

.summary-card:hover,
.summary-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
  outline: none;
}

.summary-card.active {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.summary-card h3 {
  margin: 0;
  font-size: 1.125rem;
}

.summary-card p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.detail-meta {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.question-card {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: #f9fbff;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.question-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.answer-text {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.answer-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.question-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: #16a34a;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-btn:hover:not([disabled]),
.nav-btn:focus-visible:not([disabled]) {
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.nav-btn[disabled] {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(22, 163, 74, 0.45);
}

.arrow {
  display: inline-flex;
  font-size: 1.1rem;
  color: inherit;
}

.arrow-left::before {
  content: "←";
}

.arrow-right::before {
  content: "→";
}

.nav-btn:not([disabled]) .arrow-left {
  animation: arrow-left 1.4s ease-in-out infinite;
}

.nav-btn:not([disabled]) .arrow-right {
  animation: arrow-right 1.4s ease-in-out infinite;
}

@keyframes arrow-left {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-6px);
  }
}

@keyframes arrow-right {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

.question-list-wrapper {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
}

.list-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow: auto;
  padding-right: 0.5rem;
}

.question-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7faff;
  padding: 1rem 1.25rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.question-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

.question-item summary .question-index {
  color: var(--accent);
  margin-right: 0.5rem;
}

.question-item[open] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.question-item summary::-webkit-details-marker {
  display: none;
}

.question-item summary::after {
  content: "＋";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.question-item[open] summary::after {
  content: "－";
}

.question-item p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.question-list::-webkit-scrollbar {
  width: 8px;
}

.question-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.question-list:hover::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.4);
}

.reveal-btn {
  align-self: flex-start;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reveal-btn[disabled] {
  background: var(--border);
  cursor: not-allowed;
}

.reveal-btn:not([disabled]):hover,
.reveal-btn:not([disabled]):focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  outline: none;
}

.toggle-list-btn {
  margin-top: 1.5rem;
  align-self: flex-start;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: white;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.toggle-list-btn:hover,
.toggle-list-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  background: var(--accent);
  color: white;
  outline: none;
}

.question-list-placeholder {
  margin-top: 1.75rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(37, 99, 235, 0.25);
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dashboard-list .dashboard-card:nth-child(1) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 1), rgba(45, 212, 191, 0.98));
}

.dashboard-list .dashboard-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(96, 165, 250, 0.98));
}

.dashboard-list .dashboard-card:nth-child(3) {
  background: linear-gradient(135deg, rgba(249, 115, 22, 1), rgba(251, 146, 60, 0.98));
}

.dashboard-list .dashboard-card:nth-child(4) {
  background: linear-gradient(135deg, rgba(236, 72, 153, 1), rgba(244, 114, 182, 0.98));
}

.dashboard-list .dashboard-card:nth-child(5) {
  background: linear-gradient(135deg, rgba(192, 132, 252, 1), rgba(167, 139, 250, 0.98));
}

.dashboard-list .dashboard-card:nth-child(6) {
  background: linear-gradient(135deg, rgba(14, 165, 233, 1), rgba(34, 211, 238, 0.98));
}

.dashboard-list .dashboard-card:nth-child(7) {
  background: linear-gradient(135deg, rgba(250, 204, 21, 1), rgba(253, 224, 71, 0.98));
}

.dashboard-list .dashboard-card:nth-child(8) {
  background: linear-gradient(135deg, rgba(147, 197, 253, 1), rgba(191, 219, 254, 0.98));
}

.dashboard-list .dashboard-card:nth-child(9) {
  background: linear-gradient(135deg, rgba(248, 113, 113, 1), rgba(252, 165, 165, 0.98));
}

.dashboard-list .dashboard-card:nth-child(10) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 1), rgba(129, 140, 248, 0.98));
}

.dashboard-list .dashboard-card:nth-child(11) {
  background: linear-gradient(135deg, rgba(167, 243, 208, 1), rgba(134, 239, 172, 0.98));
}

.dashboard-list .dashboard-card:nth-child(12) {
  background: linear-gradient(135deg, rgba(217, 70, 239, 1), rgba(236, 72, 153, 0.98));
}

.dashboard-list .dashboard-card:nth-child(13) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(167, 139, 250, 0.98));
}

.summary-panel {
  display: none;
}

.summary-panel h2 {
  margin: 0;
}

.summary-panel .summary-card:nth-child(1) {
  background: linear-gradient(135deg, rgba(167, 243, 208, 1), rgba(134, 239, 172, 0.96));
}

.summary-panel .summary-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(191, 219, 254, 1), rgba(147, 197, 253, 0.96));
}

.summary-panel .summary-card:nth-child(3) {
  background: linear-gradient(135deg, rgba(254, 215, 170, 1), rgba(253, 186, 116, 0.96));
}

.summary-panel .summary-card:nth-child(4) {
  background: linear-gradient(135deg, rgba(251, 207, 232, 1), rgba(244, 174, 208, 0.96));
}

.summary-panel .summary-card:nth-child(5) {
  background: linear-gradient(135deg, rgba(221, 214, 254, 1), rgba(196, 181, 253, 0.96));
}

.summary-panel .summary-card:nth-child(6) {
  background: linear-gradient(135deg, rgba(191, 226, 253, 1), rgba(147, 197, 253, 0.96));
}

.summary-panel .summary-card:nth-child(7) {
  background: linear-gradient(135deg, rgba(254, 240, 138, 1), rgba(250, 204, 21, 0.96));
}

.summary-panel .summary-card:nth-child(8) {
  background: linear-gradient(135deg, rgba(208, 213, 221, 1), rgba(148, 163, 184, 0.96));
}

.summary-panel .summary-card:nth-child(9) {
  background: linear-gradient(135deg, rgba(252, 165, 165, 1), rgba(248, 113, 113, 0.96));
}

.summary-panel .summary-card:nth-child(10) {
  background: linear-gradient(135deg, rgba(199, 210, 254, 1), rgba(165, 180, 252, 0.96));
}

.summary-panel .summary-card:nth-child(11) {
  background: linear-gradient(135deg, rgba(209, 250, 229, 1), rgba(167, 243, 208, 0.96));
}

.summary-panel .summary-card:nth-child(12) {
  background: linear-gradient(135deg, rgba(251, 191, 217, 1), rgba(244, 114, 182, 0.96));
}

.summary-panel .summary-card:nth-child(13) {
  background: linear-gradient(135deg, rgba(221, 214, 254, 1), rgba(196, 181, 253, 0.96));
}


@keyframes arrow-glide {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

.app-footer {
  padding: 1.5rem;
  color: var(--text-muted);
  background: transparent;
}

.creator-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.creator-wrapper a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.creator-wrapper a:hover,
.creator-wrapper a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    max-width: min(900px, 94vw);
    min-height: auto;
    max-height: none;
  }
}


