/*
  Figma 还原样式 - OI Heart
  Design Ref: https://www.figma.com/design/QsgpLHaOAUfrRK64Qz23jg
*/

:root {
  /* Colors */
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --text-main: #0A0A0A;
  --text-muted: #717182;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F9FAFB;
  --border: #E5E7EB;
  --stroke-weak: rgba(0, 0, 0, 0.1);
  --video-stage: #101828; /* Figma fill_0KYSBT */
  --video-overlay: #1E2939; /* Figma fill_SPFVAM */
  --editor-bg: #1E1E1E; /* Figma fill_RF264W */
  --code-line-num-weak: #C6C6C6;
  --code-line-num: #858585;
  
  /* Radius */
  --radius-card: 14px;
  --radius-btn: 8px;
  --radius-input: 8px;
  
  /* Dimensions */
  --nav-height-mobile: 64px;
  --nav-height-desktop: 73px;
  --container-width: 1200px;
}

/* Reset & Base */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button, input, textarea { font-family: inherit; }

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  line-height: 1.25;
}
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-outline {
  background: white;
  border-color: var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

/* Components: Inputs */
.input {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Navbar */
.site-header-stack {
  position: sticky;
  top: 0;
  z-index: 100;
}
.announcement-banner {
  height: 53px;
  background: #FFFBEB;
  border-bottom: 1px solid #FEE685;
}
.announcement-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 12px 24px;
}
.announcement-banner__content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.announcement-banner__icon {
  color: #E17100;
  font-size: 18px;
  line-height: 28px;
  flex: 0 0 auto;
}
.announcement-banner__text {
  color: #7B3306;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.announcement-banner__close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #BB4D00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.announcement-banner__close svg {
  width: 24px;
  height: 24px;
}
.site-header {
  height: 77px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-main);
  text-decoration: none;
  z-index: 10;
}
.brand-logo-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.brand-logo {
  width: 40px;
  height: 40px;
  display: block;
}
.brand-name {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.45px;
}
.brand-beta-badge {
  position: absolute;
  top: -2px;
  left: 14px;
  width: 28px;
  height: 14px;
  border-radius: 4px;
  background: #FE9A00;
  box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 500;
  line-height: 10px;
  letter-spacing: 0.12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Navbar Tabs (Learning Center) */
.nav-tabs {
  display: flex;
  gap: 32px;
  height: 100%;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-tab {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  transition: color 0.2s;
  gap: 8px;
}
.nav-tab:hover {
  color: var(--text-main);
}
.nav-tab.active {
  color: var(--primary);
  font-weight: 600;
}
.nav-icon {
  width: 20px;
  height: 20px;
}
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* Navbar Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
}
.nav-buttons {
  display: flex;
  gap: 16px;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.user-avatar-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.user-avatar-icon:hover {
  color: var(--primary);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .nav-tabs {
    margin-left: 0;
    gap: 16px;
  }
  .nav-tab {
    font-size: 14px;
  }
  .brand span { /* Hide brand text on mobile if needed, but not implemented yet */ }
}

/* Hero Section */
.hero {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
  text-align: center;
}
@media (min-width: 1024px) {
  .hero { padding: 100px 0 120px; }
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.bg-circle.c1 {
  width: 300px;
  height: 300px;
  background: #E0E7FF;
  top: -50px;
  left: -50px;
}
.bg-circle.c2 {
  width: 400px;
  height: 400px;
  background: #F3E8FF;
  bottom: 0;
  right: -100px;
}
.bg-circle.c3 {
  width: 200px;
  height: 200px;
  background: #CCFBF1;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
}
.hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.hero-name {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}
.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
@media (min-width: 768px) {
  .hero-title { font-size: 60px; }
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 40px;
  max-width: 600px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}
@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    width: auto;
    max-width: none;
  }
}

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--bg-subtle);
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 16px;
}
.section-sub {
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 48px;
}
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: white;
  border-radius: var(--radius-card);
  padding: 32px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #615FFF 0%, #9810FA 100%);
  margin-bottom: 8px;
}
.card-title-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}
.card-badge {
  font-size: 24px;
  font-weight: 600;
}
.card-badge.b1 { color: #4F39F6; }
.card-badge.b2 { color: #0EA5E9; }
.card-badge.b3 { color: #F59E0B; }
.card-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA Section */
.cta {
  padding: 100px 0;
  text-align: center;
}
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}
.site-footer p {
  margin: 0;
}
.site-footer__copyright {
  margin-top: 8px;
}
.site-footer__beian a {
  color: inherit;
  text-decoration: none;
}
.site-footer__beian a:hover {
  text-decoration: underline;
}

/* Page: Login (Figma Update) */
.page-login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #EFF6FF 0%, #EEF2FF 50%, #FAF5FF 100%);
  position: relative;
}

.login-header {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.login-logo {
  width: 40px;
  height: 40px;
}

.login-brand-text {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.022em;
  color: #0A0A0A;
}

.login-container {
  width: 448px;
  background: #FFFFFF;
  box-shadow: 0px 8px 10px -6px rgba(0, 0, 0, 0.1), 0px 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.login-title {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.33;
  text-align: center;
  color: #0A0A0A;
  margin: 0;
}

.tab-list {
  background: #ECECF0;
  border-radius: 14px;
  padding: 4px;
  display: flex;
  gap: 6px;
  height: 36px;
}

.tab-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  color: #0A0A0A;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.tab-item.active {
  background: #FFFFFF;
  border-color: rgba(0,0,0,0.04);
  box-shadow: 0px 1px 2px rgba(0,0,0,0.05);
}

.tab-item.disabled {
  background: #F3F4F6;
  color: #9CA3AF;
  cursor: not-allowed;
}

.login-server-message {
  margin-top: -16px;
  color: #6B7280;
  font-size: 13px;
  line-height: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-field {
  background: #F3F3F5;
  border-radius: 8px;
  padding: 4px 12px;
  height: 36px;
  border: 1px solid transparent;
  font-family: Inter, sans-serif;
  font-size: 14px;
  width: 100%;
  color: #0A0A0A;
}

.input-field:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.input-field::placeholder {
  color: #717182;
}

.input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-get-code {
  height: 36px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #0A0A0A;
  cursor: pointer;
  white-space: nowrap;
}

.btn-get-code:hover {
  background: #F9FAFB;
}

.btn-submit-login {
  height: 36px;
  background: #6366F1;
  border-radius: 8px;
  border: none;
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #FFFFFF;
  cursor: pointer;
  width: 100%;
  margin-top: 0;
}

.btn-submit-login:hover {
  background: #4F46E5;
}

/* Page: Course List */
.page-courses { padding: 60px 20px; }
.page-courses .section-title { text-align: left; }
.page-courses .section-sub { text-align: left; }
.section-header {
  text-align: left;
  margin: 0 0 48px;
}
.page-courses .section-title { text-align: left; }
.page-courses .section-sub { text-align: left; }

.course-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .course-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .course-cards {
    grid-template-columns: 1fr;
  }
}

.course-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  background: white;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
}

.course-card-top {
  height: 160px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  color: white;
}

.course-card-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.course-card-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.course-card-bottom {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.course-card-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.course-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-icon {
  font-size: 14px;
}

/* Page: Course Detail */
.page-course-detail {
  padding: 40px 20px;
  max-width: 900px;
}
.chapter-list {
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: white;
}
.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { background: var(--bg-subtle); }
.chapter-title {
  font-weight: 500;
  font-size: 16px;
}

/* Page: Section/Chapter (Learning Page) */
.learning-layout-3col {
  display: grid;
  grid-template-columns: 280px 1fr 350px; /* Left | Center | Right */
  height: calc(100vh - var(--nav-height-desktop));
  overflow: hidden;
  background: white;
}

@media (max-width: 1200px) {
  .learning-layout-3col {
    grid-template-columns: 240px 1fr 300px;
  }
}

@media (max-width: 1024px) {
  .learning-layout-3col {
    grid-template-columns: 240px 1fr 0; /* Hide right sidebar on smaller screens or use overlay */
  }
  .sidebar-right {
    display: none; /* For now, hide on tablet */
  }
}

.sidebar-left {
  background: #F9FAFB;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100%;
}

.content-center {
  overflow-y: auto;
  padding: 0;
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.center-video-wrapper {
  background: black;
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.center-content-body {
  padding: 32px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.sidebar-right {
  background: white;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.right-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.right-tab-item {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.right-tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #F9FAFB;
}

.right-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #F9FAFB;
}

/* Existing styles I'm keeping for compatibility or removing if unused */
.learning-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height-desktop)); /* Fallback */
  height: calc(100vh - var(--nav-height-desktop));
  overflow: hidden;
}
@media (max-width: 1024px) {
  .learning-layout {
    min-height: calc(100vh - var(--nav-height-mobile));
    height: calc(100vh - var(--nav-height-mobile));
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
}

.learning-sidebar {
  width: 320px;
  background: white;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .learning-sidebar {
    width: 100%;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.sidebar-course-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.4;
}
.sidebar-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color 0.2s;
}
.sidebar-back-link:hover { color: var(--primary); }

.sidebar-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-main);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.sidebar-item:hover {
  background: var(--bg-subtle);
}
.sidebar-item.active {
  background: #EEF2FF;
  color: var(--primary);
  font-weight: 500;
}
.sidebar-item-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 10px;
  color: var(--text-muted);
}
.sidebar-item.active .sidebar-item-icon {
  border-color: var(--primary);
  color: var(--primary);
  background: white;
}
.sidebar-item-status {
  margin-left: auto;
  color: #10B981;
}

.learning-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  background: white;
}
@media (max-width: 768px) {
  .learning-content { padding: 24px 20px; }
}

.content-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.content-breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.content-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.video-player-container {
  width: 100%;
  background: black;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 32px;
  position: relative;
}
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  gap: 16px;
}

.learning-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.page-section {
  padding: 0;
  max-width: none;
}

/* Toast (173:2149) */
.cl-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: 356px;
  height: 54px;
  background: #ECFDF3; /* fill_I59K8T */
  border: 1px solid #BFFCD9; /* stroke_NRLX75 */
  border-radius: 8px;
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1); /* effect_CXL9HV */
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  animation: toast-enter 300ms ease-out;
}

.cl-toast.cl-toast--error {
  background: #FFF0F0;
  border-color: #FFE0E1;
  color: #E60000;
}

.cl-toast.cl-toast--info {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.cl-toast__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-toast__text {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.00586em;
  color: #008A2E; /* fill_ZMIG2O */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-toast--error .cl-toast__text { color: #E60000; }
.cl-toast--info .cl-toast__text { color: #1D4ED8; }

@keyframes toast-enter {
  from { opacity: 0; transform: translate3d(-50%, -20px, 0); }
  to { opacity: 1; transform: translate3d(-50%, 0, 0); }
}

.toast--leave {
  animation: toast-leave 200ms ease-in forwards;
}

@keyframes toast-leave {
  from { opacity: 1; transform: translate3d(-50%, 0, 0); }
  to { opacity: 0; transform: translate3d(-50%, -12px, 0); }
}

/* =========================================
   Interaction Cards (Figma 173:1683, 173:2375)
   ========================================= */

.cl-interaction-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 64px;
}

.cl-interaction-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

/* Base Card */
.cl-interaction-card {
  position: relative;
  background: #FFFFFF; /* fill_3FBN77 */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 4px 6px -4px rgba(0, 0, 0, 0.1), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Choice Question (173:1683) */
.cl-interaction-card--choice {
  width: 672px;
  height: 396px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.cl-interaction-card__title {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.022em;
  color: #101828; /* fill_BXREMY */
  margin-bottom: 20px;
}

.cl-interaction-card__stmt {
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: #364153; /* fill_W7C2UF */
  margin-bottom: 20px;
}

.cl-interaction-card__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.cl-interaction-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #E5E7EB;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
  width: 100%;
  text-align: left;
}

.cl-interaction-option:hover {
  background: #F8FAFC;
  border-color: #C7D2FE;
}

.cl-interaction-option:active {
  background: #EEF2FF;
  border-color: #A5B4FC;
  transform: translateY(1px);
}

.cl-interaction-option.is-selected {
  background: #EEF2FF;
  border-color: #6366F1;
}

.cl-interaction-option__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.4);
  background: #fff;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cl-interaction-option.is-selected .cl-interaction-option__radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366F1;
}

.cl-interaction-option__text {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.0107em;
  color: #0A0A0A; /* fill_8UQMQ3 */
}

.cl-interaction-card__hint {
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.01em;
  color: #6A7282; /* fill_YVHD5T */
  text-align: center;
  margin-top: auto;
}

/* Judge Overlay (Figma 209:2) */
.cl-interaction-card--judge {
  width: 896px;
  height: 156px;
  padding: 17px 17px 1px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #E5E7EB;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-interaction-card__tag {
  width: 52px;
  height: 20px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #6366F1;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cl-interaction-card--judge .cl-interaction-card__stmt {
  margin: 8px 0 12px;
  color: #101828;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.0107em;
}

.cl-interaction-card__options--judge {
  flex-direction: row;
  gap: 12px;
  margin-bottom: 0;
}

.cl-interaction-option--judge {
  width: 86px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #D1D5DC;
  border-radius: 10px;
}

.cl-interaction-card--judge .cl-interaction-card__hint {
  margin-top: 0;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

@media (max-width: 1280px) {
  .cl-interaction-card--judge {
    width: min(896px, calc(100% - 32px));
  }
}

/* OJ Question (173:2375) */
.cl-interaction-card--oj {
  width: 672px;
  height: 302px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cl-interaction-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.cl-interaction-card__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-interaction-card__problem-box {
  background: #EFF6FF; /* fill_1B2B1A */
  border: 1px solid #BEDBFF; /* stroke_25P1SJ */
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-interaction-card__problem-title {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #1C398E; /* fill_HT35SY */
  margin: 0;
}

.cl-interaction-card__problem-title--main {
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.022em;
  color: #101828;
}

.cl-interaction-card__problem-desc {
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #1447E6; /* fill_QN7FU7 */
  margin: 0;
}

.cl-interaction-card__problem-desc--intro {
  margin-bottom: 20px;
  color: #364153;
}

.cl-interaction-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
}

.cl-btn-skip {
  height: 36px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid #D0D5DD;
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #0A0A0A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.cl-btn-skip:hover {
  background: #F9FAFB;
  border-color: #98A2B3;
}

.cl-btn-skip:active {
  background: #F2F4F7;
  border-color: #98A2B3;
  transform: translateY(1px);
}

.cl-btn-action {
  height: 36px;
  padding: 0 16px;
  background: #6366F1;
  border-radius: 8px;
  border: none;
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.12s ease;
}

.cl-btn-action:hover {
  background: #4F46E5;
}

.cl-btn-action:active {
  background: #4338CA;
  transform: translateY(1px);
}

/* Code Completion (173:2509) - Popover */
.cl-interaction-popover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--border);
}

.cl-interaction-popover__ok {
  background: #ECFDF3;
  color: #008A2E;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.cl-interaction-popover__title {
  font-weight: 600;
  font-size: 18px;
  color: #101828;
}

.cl-interaction-popover__desc {
  font-size: 14px;
  color: #364153;
}


/* =========================================
   Course Outline Page (Figma 22:475)
   ========================================= */

.course-outline-page {
  padding: 40px 20px;
  max-width: 1000px;
}

.course-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.course-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  flex: 1;
}

.btn-back {
  padding: 8px 16px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-main);
  transition: all 0.2s;
}

.btn-back:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.course-outline-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.outline-chapter {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.chapter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.chapter-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid rgba(0,0,0,0.05);
}

.chapter-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.chapter-sections {
  display: flex;
  flex-direction: column;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.section-row:last-child {
  border-bottom: none;
}

.section-row:hover {
  background: #F9FAFB;
}

.section-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 16px;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
}

.section-title {
  font-size: 36px;
  color: var(--text-main);
  font-weight: 400;
}

.section-meta {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.8;
}

/* =========================================
   Sidebar Accordion (Figma Update)
   ========================================= */
.chapter-group {
  border-bottom: 1px solid var(--border);
}

.chapter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: white;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.chapter-header:hover {
  background: var(--bg-subtle);
}

.chapter-header.expanded {
  background: #F3F4F6;
}

.chapter-arrow {
  font-size: 10px;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

.chapter-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.chapter-items {
  background: #F9FAFB;
  padding: 4px 0;
  position: relative; /* For tree line */
}

/* Tree Guide Line */
.tree-guide-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px; /* Align with arrow center approx */
  width: 1px;
  background: #E5E7EB;
  z-index: 0;
}

.sidebar-item {
  position: relative; /* Z-index above line */
  z-index: 1;
  padding: 10px 16px 10px 48px; /* Indent for children + line space */
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
  margin: 2px 8px; /* Add some margin for rounded feel */
  border-radius: 8px; /* Requirement: border-radius 10px (close enough) */
}

.sidebar-item:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.03);
}

.sidebar-item.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1); /* Faint primary color */
  font-weight: 500;
  border-right: none; /* Remove old style */
}

.sidebar-item-icon {
  font-size: 12px;
  opacity: 0.7;
}

/* =========================================
   Video Player (Figma Update)
   ========================================= */
.video-player-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: black;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.video-controls-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8) 100%);
  z-index: 2;
}

.play-btn-large {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.6);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding-left: 4px; /* optical adjustment */
  z-index: 3;
}

.play-btn-large:hover {
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-controls-bar {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.left-controls, .right-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
  transition: opacity 0.2s;
}

.control-btn:hover {
  opacity: 1;
}

.time-display {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

.video-title-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  z-index: 3;
}

/* =========================================
   IDE Panel (Figma Update - VS Code Style)
   ========================================= */
.sidebar-right {
  background: #1E1E1E;
  border-left: 1px solid #333;
  color: #D4D4D4;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ide-header {
  height: 40px; /* Slightly taller for toolbar */
  background: #252526;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1E1E1E;
}

.ide-tabs {
  display: flex;
  height: 100%;
}

.ide-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-size: 13px;
  color: #969696;
  background: #2D2D2D;
  border-right: 1px solid #252526;
  cursor: pointer;
  height: 100%;
}

.ide-tab.active {
  background: #1E1E1E;
  color: white;
  border-top: 2px solid var(--primary); /* Highlight top */
}

.tab-icon {
  font-size: 14px;
}

.ide-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
}

.btn-ide-run {
  background: none;
  border: none;
  color: #4ADE80; /* Green */
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.btn-ide-run:hover {
  background: rgba(74, 222, 128, 0.1);
}
.btn-ide-run .icon {
  font-size: 10px;
}

.btn-ide-submit {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ide-submit:hover {
  background: var(--primary-hover);
}

.btn-icon {
  background: none;
  border: none;
  color: #CCCCC7;
  cursor: pointer;
  padding: 4px;
}

.ide-content {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #1E1E1E;
}

.code-editor-container {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.editor-gutter {
  width: 48px;
  background: #1E1E1E;
  border-right: 1px solid #333;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 8px;
  color: #858585;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  user-select: none;
}

.line-number {
  height: 19.5px; /* Adjust to match textarea line-height */
}

.code-editor-input {
  flex: 1;
  background: #1E1E1E;
  border: none;
  color: #D4D4D4;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px;
  resize: none;
  outline: none;
  white-space: pre;
  overflow: auto;
}

.ide-status-bar {
  height: 22px;
  background: #007ACC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  color: white;
}

.empty-ide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  font-size: 13px;
}

/* ============ Learning Page (Figma node-id=22:475) ============ */
.course-learning-root {
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar (22:757) */
.learning-navbar {
  height: 65px;
  width: 100%;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--stroke-weak);
  display: flex;
  align-items: center;
  padding: 0 112px 1px;
}
.learning-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 386px;
}
.learning-navbar__brand { display: flex; align-items: center; gap: 12px; }
.learning-navbar__logo { width: 40px; height: 40px; }
.learning-navbar__brand-text {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.0225em;
  color: var(--text-main);
}
.learning-navbar__tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  background: rgba(236, 236, 240, 0.5);
  border-radius: 10px;
  height: 44px;
}
.learning-navbar__tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}
.learning-navbar__tab.is-active {
  color: var(--primary);
  box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  background: #fff;
}
.learning-navbar__tab-icon { width: 16px; height: 16px; }
.learning-navbar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.learning-navbar__avatar-svg {
  width: 44px;
  height: 44px;
  display: block;
}

/* Layout (Figma node 22:475 / PRD 3.1) */
.course-learning-page {
  width: 100%;
  display: block;
  flex: 1;
  min-height: 0;
}
.course-learning-page__container {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 1728px;
  height: calc(100vh - 65px);
  min-height: 698px;
  margin: 0 auto;
  grid-template-columns: 320px minmax(0, 1fr) 0px;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}
.course-learning-page__container.is-ai-open { grid-template-columns: 320px minmax(0, 1fr) 320px; }
.course-learning-page__container.is-outline-collapsed { grid-template-columns: 0px minmax(0, 1fr) 0px; }
.course-learning-page__container.is-outline-collapsed.is-ai-open { grid-template-columns: 0px minmax(0, 1fr) 320px; }
.course-learning-page__container.is-ai-collapsed { grid-template-columns: 320px minmax(0, 1fr) 0px; }

/* Left: Outline (Figma 110:316) */
.cl-left { background: #fff; border-right: 1px solid var(--stroke-weak); display: flex; flex-direction: column; overflow: hidden; min-width: 0; min-height: 0; }
.cl-left.is-collapsed { width: 0; border-right: none; overflow: hidden; }
.cl-left__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  min-height: 84px;
  border-bottom: 1px solid var(--stroke-weak);
}
.cl-left__heading { display: flex; flex-direction: column; gap: 4px; }
.cl-left__body { flex: 1; min-height: 0; overflow: hidden; }
.cl-left__title {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: -0.0244em;
  color: var(--text-main);
}
.cl-left__subtitle {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.0107em;
  color: var(--text-muted);
}
.cl-header-icon-btn {
  width: 36px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.cl-header-icon-btn:hover { background: var(--bg-subtle); }
.cl-header-icon-btn:active { background: var(--bg-subtle); }
.cl-header-icon-btn:focus:not(:focus-visible) { outline: none; }
.cl-header-icon-btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 1px;
}
.cl-empty { padding: 16px; color: var(--text-muted); font-size: 14px; }

.cl-outline { height: 100%; min-height: 0; padding: 8px; overflow: auto; }
.cl-outline__chapter { margin-bottom: 8px; }
.cl-outline__chapter-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease;
}
.cl-outline__chapter-btn:hover { background: #F9FAFB; }
.cl-outline__icon { width: 16px; height: 16px; }
.cl-outline__chapter-title {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-main);
}
.cl-outline__items { margin: 4px 0 0 24px; display: flex; flex-direction: column; gap: 4px; width: auto; max-width: calc(100% - 24px); }
.cl-outline__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  min-height: 44px;
  border-radius: 10px;
  background: #fff;
  transition: background-color 120ms ease;
}
.cl-outline__item:hover { background: #F9FAFB; }
.cl-outline__item.is-active { background: rgba(99, 102, 241, 0.05); }
.cl-outline__item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.cl-outline__item-title { font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.0107em; color: #0A0A0A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-outline__media { width: 60px; height: 28px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex: 0 0 auto; }
.cl-outline__media-btn { width: 28px; height: 28px; border-radius: 4px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; transition: background-color 120ms ease, box-shadow 120ms ease; overflow: hidden; }
.cl-outline__media-btn.is-active { background: #6366F1; }
.cl-outline__media-icon { width: 20px; height: 20px; display: block; flex: 0 0 auto; }
.cl-outline__media-btn.is-active .cl-outline__media-icon { filter: brightness(0) invert(1); }
.cl-outline__media-btn:not(.is-active):hover { background: #F3F4F6; }
.cl-outline__media-btn:not(.is-active):active { background: rgba(99, 102, 241, 0.12); }
.cl-outline__media-btn.is-active:active { background: #6366F1; }
.cl-outline__media-btn:focus { outline: none; }
.cl-outline__media-btn:focus:not(:focus-visible) { outline: none; }
.cl-outline__media-btn:focus-visible {
  box-shadow: none;
}
.cl-outline__media-btn:not(.is-active):focus-visible {
  background: #F3F4F6;
}
.cl-outline__media-btn.is-active:focus-visible {
  background: #6366F1;
}
.cl-outline__chevron {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.cl-outline__chevron-icon { width: 16px; height: 16px; display: block; opacity: 0.7; transform: rotate(90deg); transition: transform 120ms ease; }
.cl-outline__chevron-icon.is-expanded { transform: rotate(180deg); }
.cl-outline__section-group { display: flex; flex-direction: column; gap: 4px; }
.cl-outline__section-mark {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6366F1;
  flex: 0 0 auto;
}
.cl-outline__section-mark svg,
.cl-outline__exercise-icon svg {
  width: 16px;
  height: 16px;
}
.cl-outline__state-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}
.cl-outline__exercise-node {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 10px;
  border: none;
  background: #fff;
  cursor: pointer;
  transition: background-color 120ms ease, opacity 120ms ease;
}
.cl-outline__exercise-node.is-nested {
  width: calc(100% - 28px);
  margin-left: 28px;
}
.cl-outline__exercise-node:hover { background: #F9FAFB; }
.cl-outline__exercise-node.is-active {
  background: rgba(99, 102, 241, 0.05);
}
.cl-outline__exercise-node.is-locked {
  opacity: 0.72;
}
.cl-outline__exercise-node.is-chapter {
  background: rgba(245, 158, 11, 0.08);
}
.cl-outline__exercise-node.is-chapter .cl-outline__exercise-text {
  color: #BB4D00;
}
.cl-outline__exercise-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  color: #6366F1;
  flex: 0 0 auto;
}
.cl-outline__exercise-icon.is-in-class {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #CEFAFE;
  color: #0092B8;
}
.cl-outline__exercise-icon.is-chapter-exercise {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #FE9A00;
  color: #FFFFFF;
}
.cl-outline__exercise-icon-image {
  display: block;
  flex: 0 0 auto;
}
.cl-outline__exercise-icon-image.is-in-class {
  width: 14px;
  height: 14px;
}
.cl-outline__exercise-icon-image.is-chapter-exercise {
  width: 16px;
  height: 16px;
}
.cl-outline__exercise-text {
  font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0A0A0A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-tip-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 64px;
  box-sizing: border-box;
  background: transparent;
  z-index: 1200;
  pointer-events: none;
}
.cl-tip-card {
  width: min(896px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
.cl-tip-card__hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.cl-tip-card__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: var(--cl-tip-gradient);
  opacity: 0.2;
  pointer-events: none;
}
.cl-tip-card__emoji {
  position: relative;
  z-index: 1;
  width: 61.55px;
  height: 61.55px;
  margin-top: -2.77px;
  margin-left: -2.77px;
  flex: 0 0 61.55px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  color: #0A0A0A;
  font-size: 30px;
  line-height: 36px;
}
.cl-tip-card__emoji.is-image {
  background: transparent !important;
  box-shadow: none;
  overflow: visible;
}
.cl-tip-card__emoji-image {
  position: absolute;
  top: -3.725px;
  left: -3.725px;
  width: 69px;
  height: 69px;
  display: block;
  object-fit: contain;
}
.cl-tip-card__content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.cl-tip-card__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-tip-card__badge-icon {
  width: 12px;
  height: 12px;
  display: block;
}
.cl-tip-card__body {
  padding-top: 6px;
  max-width: 694px;
  font: 400 14px/22.75px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.0107em;
  color: #1E2939;
  white-space: pre-wrap;
  text-align: left;
}
.cl-tip-card__button {
  position: relative;
  z-index: 1;
  width: auto;
  min-width: 80px;
  height: 32px;
  margin-left: auto;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  white-space: nowrap;
}

.cl-exercise-view {
  height: 100%;
  overflow: auto;
  background: #F9FAFB;
}
.cl-exercise-view__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid #00B8DB;
}
.cl-exercise-view__header.is-chapter { border-left-color: #FE9A00; }
.cl-exercise-view__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #CEFAFE;
  flex: 0 0 auto;
}
.cl-exercise-view__icon.is-chapter { background: #FEF3C6; }
.cl-exercise-view__icon-image {
  width: 20px;
  height: 20px;
  display: block;
}
.cl-exercise-view__title-wrap {
  flex: 1;
  min-width: 0;
}
.cl-exercise-view__title {
  margin: 0;
  color: #101828;
  font: 600 18px/28px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.0244em;
}
.cl-exercise-view__count {
  height: 22px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0A0A0A;
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.cl-exercise-view__content {
  min-height: calc(100% - 72px);
  padding: 24px 0;
}
.cl-exercise-view__inner {
  width: min(896px, calc(100% - 48px));
  margin: 0 auto;
}
.cl-exercise-view__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cl-exercise-view__state {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #FFFFFF;
  color: #6A7282;
  font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-exercise-view__state.is-error { color: #E7000B; }

.cl-exercise-status {
  height: 22px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  white-space: nowrap;
}
.cl-exercise-status__icon {
  width: 12px;
  height: 12px;
  display: block;
  flex: 0 0 auto;
}
.cl-exercise-status.is-pending {
  background: #F9FAFB;
  border-color: rgba(0, 0, 0, 0.1);
  color: #6A7282;
}
.cl-exercise-status.is-correct {
  background: #ECFDF5;
  border-color: #A4F4CF;
  color: #009966;
}
.cl-exercise-status.is-wrong {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #E7000B;
}
.cl-exercise-status.is-answered,
.cl-exercise-status.is-skipped {
  background: #F9FAFB;
  border-color: rgba(0, 0, 0, 0.1);
  color: #6A7282;
}

.cl-question-card {
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 20px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.cl-question-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cl-question-card__index {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #F3F4F6;
  color: #364153;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  flex: 0 0 auto;
}
.cl-question-card__type,
.cl-question-card__type.is-choice,
.cl-question-card__type.is-judge,
.cl-question-card__type.is-programming {
  height: 22px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  white-space: nowrap;
}
.cl-question-card__type.is-choice {
  background: #EFF6FF;
  border-color: #BEDBFF;
  color: #1447E6;
}
.cl-question-card__type.is-judge {
  background: #FAF5FF;
  border-color: #E9D4FF;
  color: #8200DB;
}
.cl-question-card__type.is-programming {
  background: #F0FDF4;
  border-color: #B9F8CF;
  color: #008236;
}
.cl-question-card__type.is-programming.is-completion {
  background: #ECFDF5;
  border-color: #A4F4CF;
  color: #007A55;
}
.cl-question-card__stem {
  margin: 12px 0 0;
  color: #101828;
  font: 400 14px/22.75px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.0107em;
}
.cl-question-card__body {
  margin: 12px 0 0;
  color: #101828;
  font: 400 14px/22.75px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.0107em;
  white-space: pre-wrap;
}
.cl-question-card__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}
.cl-question-card__options.is-judge {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cl-question-card__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
}
.cl-question-card__option.is-correct {
  background: #ECFDF5;
  border-color: #5EE9B5;
}
.cl-question-card__option.is-wrong {
  background: #FEF2F2;
  border-color: #FCA5A5;
}
.cl-question-card__option-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cl-question-card__option-id {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #6A7282;
  color: #6A7282;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  flex: 0 0 auto;
}
.cl-question-card__option.is-correct .cl-question-card__option-id {
  border-color: #009966;
  color: #009966;
}
.cl-question-card__option.is-wrong .cl-question-card__option-id {
  border-color: #E7000B;
  color: #E7000B;
}
.cl-question-card__option-text {
  min-width: 0;
  flex: 1;
  color: #1E2939;
  font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__option-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.cl-question-card__option-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: #F3F4F6;
  color: #4A5565;
  font: 400 10px/14.29px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.0117em;
}
.cl-question-card__option-tag.is-dark {
  background: #1E2939;
  color: #FFFFFF;
}
.cl-question-card__option-result {
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__option-result.is-correct { color: #009966; }
.cl-question-card__option-result.is-wrong { color: #E7000B; }
.cl-question-card__judge-option {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #101828;
  cursor: pointer;
}
.cl-question-card__judge-option.is-correct {
  background: #ECFDF5;
  border-color: #5EE9B5;
}
.cl-question-card__judge-option.is-wrong {
  background: #FEF2F2;
  border-color: #FCA5A5;
}
.cl-question-card__judge-option:disabled {
  cursor: default;
  opacity: 1;
}
.cl-question-card__judge-label {
  font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__judge-mark {
  font: 600 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__judge-mark.is-correct { color: #009966; }
.cl-question-card__judge-mark.is-wrong { color: #E7000B; }
.cl-question-card__editor,
.cl-question-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}
.cl-question-card__select,
.cl-question-card__answer-btn,
.cl-question-card__secondary,
.cl-question-card__submit {
  height: 40px;
  border-radius: 8px;
  font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__select {
  min-width: 240px;
  padding: 0 12px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #364153;
}
.cl-question-card__answer-btn,
.cl-question-card__secondary {
  min-width: 108px;
  padding: 0 16px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #364153;
  cursor: pointer;
}
.cl-question-card__answer-btn.is-active {
  background: #ECFDF5;
  border-color: #5EE9B5;
  color: #007A55;
}
.cl-question-card__submit {
  padding: 0 16px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #364153;
  cursor: pointer;
}
.cl-question-card__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px dashed #E5E7EB;
}
.cl-question-card__summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cl-question-card__summary-label {
  color: #6A7282;
  font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__summary-value {
  color: #1E2939;
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-question-card__summary-value.is-correct { color: #009966; }
.cl-question-card__summary-value.is-wrong { color: #E7000B; }
.cl-question-card__programming-hint {
  padding-top: 12px;
  color: #6A7282;
  font: italic 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__external {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #B9F8CF;
  background: #F0FDF4;
  color: #008236;
  text-decoration: none;
  font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-question-card__external-icon {
  width: 12px;
  height: 12px;
  display: block;
}
.cl-question-card__external svg {
  width: 14px;
  height: 14px;
  display: block;
}

@media (max-width: 1280px) {
  .cl-exercise-view__content { padding: 20px 0; }
  .cl-exercise-view__inner { width: min(896px, calc(100% - 32px)); }
  .cl-content.is-exercise-view { display: block; }
}

@media (max-width: 960px) {
  .cl-tip-overlay {
    padding: 0 12px 64px;
  }
  .cl-tip-card { width: min(896px, 100%); }
  .cl-tip-card__hero {
    flex-direction: column;
    gap: 12px;
    min-height: auto;
  }
  .cl-tip-card__hero::before {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }
  .cl-tip-card__emoji {
    margin-top: 0;
    margin-left: 0;
  }
  .cl-tip-card__body { max-width: none; }
  .cl-tip-card__button {
    margin-left: 0;
    align-self: flex-start;
  }
  .cl-exercise-view__header {
    flex-wrap: wrap;
    padding: 16px;
  }
  .cl-exercise-view__content { padding: 16px 0; }
  .cl-exercise-view__inner { width: calc(100% - 24px); }
  .cl-question-card { padding: 16px; }
  .cl-question-card__summary { grid-template-columns: 1fr; gap: 10px; }
  .cl-question-card__options.is-judge { grid-template-columns: 1fr; }
  .cl-question-card__option { align-items: flex-start; }
  .cl-question-card__option-meta { flex-wrap: wrap; }
}

/* Outline collapsed helper */
.cl-outline-expand {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--stroke-weak);
  background: #fff;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.cl-outline-expand__icon { width: 16px; height: 16px; display: block; transform: rotate(180deg); }
.cl-outline-expand:active { background: var(--bg-subtle); }
.cl-outline-expand:focus:not(:focus-visible) { outline: none; }
.cl-outline-expand:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 1px;
}

/* Center: Content (Figma 110:430) */
.cl-content {
  background: #fff;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 337.59px;
  border-right: 1px solid var(--stroke-weak);
  min-width: 0;
  min-height: 0;
}
.cl-content.is-exercise-view {
  display: block;
  background: #F9FAFB;
}
.course-learning-page__container:not(.is-ai-open) .cl-content { border-right: none; }

.cl-content__player {
  min-height: 0;
  border-bottom: 1px solid var(--stroke-weak);
  min-width: 0;
}
.cl-player { width: 100%; height: 100%; position: relative; background: #000; }
.cl-player:fullscreen { width: 100vw; height: 100vh; }
.cl-player:fullscreen .cl-player__controls { width: 100%; }
.cl-player__stage {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cl-player__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  aspect-ratio: 16 / 9;
  background: #111827;
}
.cl-player__placeholder { text-align: center; color: #fff; }
.cl-player__emoji { font: 400 60px/60px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin-bottom: 16px; }
.cl-player__title { font: 400 20px/28px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.0225em; }
.cl-player__status { font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #99A1AF; }
.cl-player__controls {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 52px;
  padding: 16px 16px 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  box-sizing: border-box;
}
.cl-player__control-row { display: flex; align-items: center; gap: 12px; height: 20px; }

.cl-player__control-btn {
  background: transparent;
  border: none;
  width: 20px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: white;
}
.cl-player__control-btn:hover { background: rgba(255, 255, 255, 0.1); }
.cl-player__control-btn:disabled { cursor: not-allowed; opacity: 0.4; }
.cl-player__control-btn:disabled:hover { background: transparent; }
.cl-player__icon { width: 20px; height: 20px; display: block; }
.cl-player__progress {
  flex: 1;
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.cl-player__progress:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
  border-radius: 8px;
}
.cl-player__progressbar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: visible;
  transition: height 160ms ease;
}
.cl-player__progress.is-hovered .cl-player__progressbar,
.cl-player__progress.is-dragging .cl-player__progressbar { height: 6px; }
.cl-player__progressbar-fill {
  height: 100%;
  width: 30%;
  border-radius: inherit;
  background: var(--primary);
}
.cl-player__progressbar-thumb {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cl-player__progress-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 44px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.cl-player__time { width: 86.72px; font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }

/* Bottom (Figma 110:460): Editor + Canvas */
.cl-content__bottom {
  height: 337.59px;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  overflow: hidden;
}
.cl-content__bottom.has-canvas { grid-template-columns: 1fr 384px; }
.cl-content__bottom.is-outline-collapsed.has-canvas { grid-template-columns: 1fr 1fr; }

/* Code Editor (Figma 110:461) */
.cl-code { height: 100%; border-right: none; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.cl-code:fullscreen { width: 100vw; height: 100vh; }
.cl-content__bottom.has-canvas .cl-code { border-right: 1px solid var(--stroke-weak); }
.cl-code__header {
  min-height: 57px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--stroke-weak);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}
.cl-code__title {
  font: 600 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.0107em;
  color: #364153;
}
.cl-code__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; flex-wrap: wrap; }
.cl-code__template-btn {
  height: 32px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--stroke-weak);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.cl-code__template-select {
  height: 32px;
  min-width: 168px;
  padding: 0 30px 0 10px;
  background: #fff;
  border: 1px solid var(--stroke-weak);
  border-radius: 8px;
  font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  appearance: none;
}
.cl-code__template-select:focus { border-color: rgba(99, 102, 241, 0.8); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.cl-code__template-select:hover,
.cl-code__template-btn:hover,
.cl-code__reset-btn:hover,
.cl-code__fullscreen-btn:hover { background: #fff; border-color: rgba(0, 0, 0, 0.16); }
.cl-code__template-text { font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text-main); }
.cl-code__template-icon { width: 16px; height: 16px; }
.cl-code__run-btn {
  min-width: 70px;
  height: 32px;
  border: none;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-code__run-btn:hover { background: #4F46E5; }
.cl-code__reset-btn {
  min-width: 72px;
  height: 32px;
  border: 1px solid var(--stroke-weak);
  background: #fff;
  border-radius: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-code__submit-btn {
  min-width: 72px;
  height: 32px;
  border: none;
  background: #16A34A;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-code__submit-btn:hover { background: #15803D; }
.cl-code__run-btn:disabled,
.cl-code__submit-btn:disabled,
.cl-code__reset-btn:disabled,
.cl-code__template-btn:disabled,
.cl-code__fullscreen-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cl-code__btn-icon { width: 16px; height: 16px; }
.cl-code__fullscreen-btn {
  width: 38px;
  height: 32px;
  border: 1px solid var(--stroke-weak);
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.cl-code__fullscreen-btn img { width: 16px; height: 16px; display: block; }
.cl-code__prompt {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke-weak);
  color: var(--text-muted);
  font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cl-code__stdin {
  border-bottom: 1px solid var(--stroke-weak);
  background: #fff7ed;
  padding: 10px 12px;
}
.cl-code__stdin-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.cl-code__stdin-title {
  font: 600 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #c2410c;
}
.cl-code__stdin-hint {
  font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #9a3412;
}
.cl-code__stdin-input {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff;
  color: #1E2939;
  font: 400 12px/18px ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.cl-code__editor { flex: 1; min-height: 0; display: flex; background: #fff; padding: 0; overflow: hidden; }
.cl-code__editor .cl-code__editor-surface {
  --pd2-code-pad-top: 19px;
  --pd2-code-pad-x: 16px;
  --pd2-code-ln-width: 36px;
  --pd2-code-ln-gap: 12px;
}
.cl-code__editor .pd2-code-layer {
  background: #FAFAFA;
  border-radius: 0;
}
.cl-code__editor .pd2-code-ln {
  color: var(--code-line-num);
}
.cl-code__editor .pd2-code-text,
.cl-code__editor .pd2-code--input {
  color: transparent;
  line-height: 19.5px;
}
.cl-code__editor .pd2-code-text {
  color: #383A42;
}

/* Output (Figma 110:486) */
.cl-output { height: 128px; border-top: 1px solid var(--stroke-weak); display: flex; flex-direction: column; background: #fff; }
.cl-output__toolbar {
  height: 37px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--stroke-weak);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.cl-output__title { display: flex; align-items: center; gap: 8px; font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1E2939; }
.cl-output__status-dot { width: 8px; height: 8px; border-radius: 50%; background: #00C950; display: inline-block; }
.cl-output__close { width: 24px; height: 24px; border: none; background: transparent; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.cl-output__body { padding: 16px 16px 0; font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1E2939; white-space: pre-wrap; overflow: auto; }

/* GameCanvas (Figma 110:926) */
.cl-canvas { height: 100%; border-left: none; display: flex; flex-direction: column; min-height: 0; }
.cl-canvas__header {
  height: 57px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--stroke-weak);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}
.cl-canvas__title { font: 600 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.0107em; color: #364153; }
.cl-canvas__actions { display: flex; align-items: center; gap: 8px; }
.cl-canvas__btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--stroke-weak); background: #fff; font: 500 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text-main); }
.cl-canvas__btn--icon { display: inline-flex; align-items: center; gap: 6px; }
.cl-canvas__btn-icon { width: 16px; height: 16px; display: block; }
.cl-canvas__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cl-canvas__stage { flex: 1; min-height: 0; padding: 16px 16px 0; background: #F3F4F6; display: flex; align-items: stretch; justify-content: stretch; }
.cl-canvas__frame { width: 100%; height: 100%; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1); background: linear-gradient(180deg, #F8FBFF 0%, #EEF4FF 100%); overflow: hidden; display: flex; align-items: stretch; justify-content: stretch; }
.cl-canvas__preview { width: 100%; height: 100%; object-fit: contain; }
.cl-canvas__canvas { width: 100%; height: 100%; display: block; background: transparent; }
.cl-canvas__footer { height: 58px; padding: 13px 12px 0; background: var(--bg-subtle); border-top: 1px solid var(--stroke-weak); font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text-muted); }
.cl-canvas.is-fullscreen { background: #111827; }
.cl-canvas.is-fullscreen .cl-canvas__stage { padding: 24px; background: radial-gradient(circle at top, #E0EAFF 0%, #C9DAFF 22%, #A8BEEA 55%, #6B7FA6 100%); align-items: center; justify-content: center; }
.cl-canvas.is-fullscreen .cl-canvas__frame { width: min(100%, calc((100vh - 163px) * 1.6071)); height: min(100%, calc((100vw - 48px) / 1.6071)); flex: 0 0 auto; border-color: rgba(255,255,255,0.2); border-radius: 20px; background: linear-gradient(180deg, #F8FBFF 0%, #EAF1FF 100%); box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22); }

@media (max-width: 1280px) {
  .cl-content { grid-template-rows: minmax(0, 1fr) 320px; }
  .cl-content__bottom { height: 320px; }
}

@media (max-width: 960px) {
  .cl-content { display: flex; flex-direction: column; }
  .cl-content__player { min-height: 320px; }
  .cl-content__bottom { height: auto; min-height: 320px; }
  .cl-content__bottom.has-canvas,
  .cl-content__bottom.is-outline-collapsed.has-canvas { grid-template-columns: 1fr; }
}

/* AI Panel (PRD 3.6, UI mock) */
.cl-ai { background: #fff; border-left: 1px solid var(--stroke-weak); display: flex; flex-direction: column; overflow: hidden; }
.cl-ai.is-collapsed { width: 0; border-left: none; }
.cl-ai__header { height: 57px; background: var(--bg-subtle); border-bottom: 1px solid var(--stroke-weak); padding: 0 12px; display: flex; align-items: center; justify-content: space-between; }
.cl-ai__title { font: 600 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #364153; }
.cl-ai__close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--stroke-weak); background: #fff; cursor: pointer; }
.cl-ai__body { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.cl-ai__hint { font: 400 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text-muted); }
.cl-ai__messages { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.cl-ai__msg { padding: 10px 12px; border-radius: 12px; font: 400 14px/20px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.cl-ai__msg.is-ai { background: var(--bg-subtle); color: var(--text-main); }
.cl-ai__msg.is-user { background: rgba(99, 102, 241, 0.1); color: var(--text-main); align-self: flex-end; }
.cl-ai__input-row { display: flex; gap: 8px; }
.cl-ai__input { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--stroke-weak); padding: 0 10px; }
.cl-ai__send { width: 64px; height: 36px; border-radius: 10px; border: 1px solid var(--stroke-weak); background: #fff; }

/* AI FAB (Figma 110:952) */
.cl-ai-fab {
  position: fixed;
  right: 16px;
  top: 96px;
  width: 40px;
  height: 60px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, rgba(43, 127, 255, 1) 0%, rgba(152, 16, 250, 1) 100%);
  box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 20;
}
.cl-ai-fab__icon { width: 16px; height: 16px; display: block; }
.cl-ai-fab__label { font: 500 12px/16px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
