    :root {
      --void: #0B0E14;
      --surface: #1A1F2E;
      --surface-container-low: #1E2433;
      --surface-container: #252B3B;
      --surface-container-high: #2D3548;
      --surface-container-highest: #333B4D;
      --surface-dim: #151A26;
      --surface-variant: #2A3142;
      --on-bg: #F1F2F8;
      --on-surface: #FFFFFF;
      --on-surface-variant: #CBD0DB;
      --primary: #C1FFFE;
      --primary-dim: #00E6E6;
      --primary-fixed: #00F5F5;
      --secondary: #FF75FC;
      --secondary-dim: #FF75FC;
      --tertiary: #D1A3FF;
      --tertiary-dim: #B366FF;
      --accent: #00F5F5;
      --glow-primary: rgba(193, 255, 254, 0.25);
      --glow-secondary: rgba(255, 117, 252, 0.25);
      --glow-tertiary: rgba(191, 129, 255, 0.25);
      --line: rgba(193, 255, 254, 0.15);
    }

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

    body {
      font-family: 'Plus Jakarta Sans', 'Microsoft YaHei', sans-serif;
      background-color: var(--surface-dim);
      background-image:
        radial-gradient(ellipse 80% 60% at 10% -10%, rgba(0, 245, 245, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 5%, rgba(255, 117, 252, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(191, 129, 255, 0.06) 0%, transparent 50%);
      color: var(--on-bg);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
      line-height: 1.6;
    }

    .glass {
      background: rgba(37, 43, 59, 0.72);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(193, 255, 254, 0.18);
    }

    .glass-subtle {
      background: rgba(30, 36, 51, 0.55);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(193, 255, 254, 0.1);
    }

    .glowing-text {
      color: var(--primary);
      text-shadow: 0 0 20px rgba(193, 255, 254, 0.5), 0 0 40px rgba(193, 255, 254, 0.2);
    }

    .glowing-secondary {
      color: var(--secondary);
      text-shadow: 0 0 15px rgba(255, 117, 252, 0.4);
    }

    .glowing-tertiary {
      color: var(--tertiary);
      text-shadow: 0 0 15px rgba(209, 163, 255, 0.4);
    }

    .label-micro {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--on-surface-variant);
    }

    /* ===== HEADER ===== */
    .top-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 60px;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 32px;
      background: rgba(21, 26, 38, 0.85);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(193, 255, 254, 0.1);
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    }

    .header-logo {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .header-logo-icon {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      background: linear-gradient(135deg, var(--primary-dim), var(--tertiary));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      box-shadow: 0 0 12px rgba(193, 255, 254, 0.3);
    }

    .header-logo-text {
      font-size: 15px;
      font-weight: 800;
      color: var(--primary);
      letter-spacing: -0.02em;
      text-shadow: 0 0 10px rgba(193, 255, 254, 0.4);
    }

    .header-nav {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .header-nav a {
      color: var(--on-surface-variant);
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      padding: 6px 14px;
      border-radius: 999px;
      transition: all 0.2s;
      letter-spacing: -0.01em;
    }

    .header-nav a:hover,
    .header-nav a.active {
      color: var(--primary);
      background: rgba(193, 255, 254, 0.08);
      text-shadow: 0 0 8px rgba(193, 255, 254, 0.3);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .header-icon-btn {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(193, 255, 254, 0.06);
      border: 1px solid rgba(193, 255, 254, 0.12);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 20px;
      position: relative;
      transition: all 0.2s;
    }

    .header-icon-btn:hover {
      background: rgba(193, 255, 254, 0.12);
      border-color: rgba(193, 255, 254, 0.3);
      box-shadow: 0 0 12px rgba(193, 255, 254, 0.15);
    }

    .notif-dot {
      position: absolute;
      top: -3px;
      right: -3px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--secondary);
      border: 2px solid var(--surface-dim);
    }

    .avatar-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 2px solid var(--primary);
      overflow: hidden;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      box-shadow: 0 0 10px rgba(193, 255, 254, 0.25);
      background: rgba(193, 255, 254, 0.1);
      transition: all 0.2s;
    }

    .avatar-btn:hover {
      box-shadow: 0 0 16px rgba(193, 255, 254, 0.4);
      transform: scale(1.05);
    }

    /* ===== PAGE LAYOUT ===== */
    .page-layout {
      display: flex;
      min-height: 100vh;
      padding-top: 0;
    }

    /* ===== SIDE NAV ===== */
    .side-nav {
      width: 200px;
      flex-shrink: 0;
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      overflow-y: auto;
      padding: 20px 12px 24px;
      border-right: 1px solid rgba(193, 255, 254, 0.08);
      background: rgba(11, 14, 20, 0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      scrollbar-width: none;
      z-index: 50;
      display: flex;
      flex-direction: column;
    }

    .side-nav::-webkit-scrollbar { display: none; }

    .nav-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 4px 8px 20px;
      margin-bottom: 4px;
    }
    .nav-brand-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: linear-gradient(135deg, var(--primary), var(--tertiary));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      color: var(--void);
      font-weight: 900;
      flex-shrink: 0;
    }
    .nav-brand-text {
      font-size: 15px;
      font-weight: 800;
      color: var(--on-surface);
      letter-spacing: 0.5px;
    }

    /* ===== MAIN CONTENT ===== */
    .main-content {
      flex: 1;
      margin-left: 200px;
      margin-right: 280px;
      padding: 28px 32px 48px;
      max-width: calc(100% - 480px);
    }

    /* ===== HERO ===== */
    .hero-welcome {
      padding: 32px 36px;
      border-radius: 24px;
      margin-bottom: 16px;
      position: relative;
      overflow: hidden;
    }

    .hero-welcome::before {
      content: '';
      position: absolute;
      top: -40%;
      right: -10%;
      width: 300px;
      height: 300px;
      background: radial-gradient(circle, rgba(193, 255, 254, 0.12) 0%, transparent 70%);
      pointer-events: none;
    }

    .hero-welcome::after {
      content: '';
      position: absolute;
      bottom: -30%;
      left: 20%;
      width: 250px;
      height: 250px;
      background: radial-gradient(circle, rgba(255, 117, 252, 0.08) 0%, transparent 70%);
      pointer-events: none;
    }

    .today-overview {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    .hero-greeting {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--primary);
      opacity: 0.7;
      margin-bottom: 8px;
    }

    .hero-title {
      font-size: clamp(26px, 4vw, 38px);
      font-weight: 800;
      letter-spacing: -0.03em;
      color: var(--on-surface);
      line-height: 1.2;
      margin-bottom: 10px;
    }

    .hero-title .highlight {
      color: var(--primary);
      text-shadow: 0 0 20px rgba(193, 255, 254, 0.45);
    }

    .hero-title .highlight-secondary {
      color: var(--secondary);
      text-shadow: 0 0 20px rgba(255, 117, 252, 0.35);
    }

    .hero-sub {
      font-size: 14px;
      color: var(--on-surface-variant);
      max-width: 520px;
      line-height: 1.7;
    }

    .hero-sub .num {
      font-weight: 700;
      color: var(--secondary);
      text-shadow: 0 0 10px rgba(255, 117, 252, 0.3);
    }

    .class-schedule-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 22px;
      padding: 18px 22px;
      border-radius: 18px;
      border-left: 4px solid rgba(193, 255, 254, 0.85);
      overflow: hidden;
      position: relative;
    }

    .class-schedule-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(120deg, rgba(193, 255, 254, 0.14), transparent 42%, rgba(255, 209, 102, 0.12));
      pointer-events: none;
    }

    .class-schedule-main,
    .class-schedule-countdown {
      position: relative;
      z-index: 1;
    }

    .class-schedule-main {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .class-schedule-icon {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      background: rgba(193, 255, 254, 0.14);
      color: var(--primary);
      box-shadow: 0 0 18px rgba(193, 255, 254, 0.16);
    }

    .class-schedule-icon svg {
      width: 23px;
      height: 23px;
      stroke-width: 1.8;
    }

    .class-schedule-eyebrow {
      color: var(--on-surface-variant);
      font-size: 0.76rem;
      font-weight: 800;
      letter-spacing: 0;
      margin-bottom: 4px;
    }

    .class-schedule-title {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 10px;
      color: var(--on-surface);
      font-size: 1.05rem;
      font-weight: 900;
      line-height: 1.25;
    }

    .class-schedule-title span:last-child {
      color: var(--primary);
    }

    .class-schedule-meta {
      margin-top: 4px;
      color: var(--on-surface-variant);
      font-size: 0.88rem;
      font-weight: 650;
    }

    .class-schedule-countdown {
      display: grid;
      grid-template-columns: auto auto auto;
      align-items: baseline;
      gap: 8px;
      min-width: 230px;
      justify-content: end;
      text-align: right;
    }

    .class-schedule-status,
    .class-schedule-unit {
      color: var(--on-surface-variant);
      font-size: 0.82rem;
      font-weight: 800;
      white-space: nowrap;
    }

    .class-schedule-number {
      color: var(--secondary);
      font-size: clamp(1.6rem, 3vw, 2.35rem);
      font-weight: 950;
      line-height: 1;
      white-space: nowrap;
      text-shadow: 0 0 18px rgba(255, 117, 252, 0.28);
    }

    .class-schedule-card.is-active {
      border-left-color: rgba(68, 255, 154, 0.9);
    }

    .class-schedule-card.is-active .class-schedule-number {
      color: #44ff9a;
      font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    }

    .class-schedule-card.is-ended,
    .class-schedule-card.is-empty {
      border-left-color: rgba(255, 255, 255, 0.22);
    }

    .class-schedule-card.is-ended .class-schedule-number,
    .class-schedule-card.is-empty .class-schedule-number {
      color: var(--on-surface-variant);
      font-size: clamp(1.15rem, 2.3vw, 1.45rem);
      text-shadow: none;
    }

    .hero-stat-card {
      padding: 18px 20px;
      border-radius: 16px;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.2s;
    }

    .hero-stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 80px;
      height: 80px;
      border-radius: 50%;
      opacity: 0.15;
      filter: blur(20px);
    }

    .hero-stat-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .hero-stat-card.primary-card::before { background: var(--primary); }
    .hero-stat-card.secondary-card::before { background: var(--secondary); }
    .hero-stat-card.tertiary-card::before { background: var(--tertiary); }

    .hero-stat-icon {
      margin-bottom: 6px;
      display: flex;
      align-items: center;
    }
    .hero-stat-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }

    .hero-stat-value {
      font-size: 26px;
      font-weight: 800;
      letter-spacing: -0.03em;
      color: var(--on-surface);
      line-height: 1;
      margin-bottom: 3px;
    }

    .hero-stat-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--on-surface-variant);
    }

    .primary-card .hero-stat-value { color: var(--primary); text-shadow: 0 0 15px rgba(193, 255, 254, 0.4); }
    .secondary-card .hero-stat-value { color: var(--secondary); text-shadow: 0 0 15px rgba(255, 117, 252, 0.4); }
    .tertiary-card .hero-stat-value { color: var(--tertiary); text-shadow: 0 0 15px rgba(209, 163, 255, 0.4); }

    @media (max-width: 820px) {
      .class-schedule-card {
        align-items: flex-start;
        flex-direction: column;
      }
      .class-schedule-countdown {
        grid-template-columns: auto auto auto;
        justify-content: start;
        min-width: 0;
        text-align: left;
      }
      .today-overview { grid-template-columns: 1fr; }
    }

    @media (max-width: 1100px) {
      .today-overview { grid-template-columns: 1fr 1fr; }
    }

    /* ===== RIGHT SIDEBAR ===== */
    .right-sidebar {
      width: 260px;
      flex-shrink: 0;
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      overflow-y: auto;
      padding: 20px 16px 24px;
      border-left: 1px solid rgba(193, 255, 254, 0.06);
      background: rgba(11, 14, 20, 0.5);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      scrollbar-width: none;
      display: flex;
      flex-direction: column;
      gap: 20px;
      z-index: 40;
    }

    .right-sidebar::-webkit-scrollbar { display: none; }

    .rs-section-title {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--on-surface-variant);
      opacity: 0.4;
      margin-bottom: 12px;
    }

    .rs-activity-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      border-radius: 10px;
      font-size: 11px;
      color: var(--on-surface-variant);
      transition: background 0.15s;
    }

    .rs-activity-item:hover { background: rgba(193,255,254,0.04); }

    .rs-activity-icon {
      font-size: 14px;
      flex-shrink: 0;
      width: 20px;
      text-align: center;
    }
    .rs-activity-text {
      font-size: 12px;
      color: var(--on-surface-variant);
      line-height: 1.4;
    }
    .rs-activity-text span {
      font-weight: 700;
      color: var(--primary);
    }

    .rs-activity-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--primary);
      opacity: 0.4;
      flex-shrink: 0;
    }

    .rs-quick-btn {
      width: 100%;
      padding: 10px;
      border-radius: 12px;
      border: 1px solid rgba(193,255,254,0.15);
      background: rgba(193,255,254,0.04);
      color: var(--on-surface-variant);
      font-family: inherit;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.06em;
      cursor: pointer;
      transition: all 0.2s;
      text-align: left;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .rs-quick-btn:hover { background: rgba(193,255,254,0.08); color: var(--primary); }

    .nav-section {
      padding: 0 12px;
      margin-bottom: 8px;
    }

    .nav-section-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(193, 255, 254, 0.35);
      padding: 8px 12px 6px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      color: var(--on-surface-variant);
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      transition: all 0.2s;
      cursor: pointer;
      border: none;
      background: transparent;
      width: 100%;
      text-align: left;
    }

    .nav-item:hover {
      background: rgba(193, 255, 254, 0.06);
      color: var(--primary);
    }

    .nav-item.active {
      background: rgba(193, 255, 254, 0.1);
      color: var(--primary);
      border-left: 3px solid var(--primary);
      padding-left: 9px;
    }

    .nav-item-icon {
      width: 22px;
      text-align: center;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: inherit;
    }
    .nav-item-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }

    .nav-divider {
      height: 1px;
      background: rgba(193, 255, 254, 0.08);
      margin: 12px 16px;
    }

    /* ===== HERO（已删除）===== */

    /* ===== SECTION HEADING ===== */
    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
    }

    .section-title {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--on-surface);
    }

    .section-title .icon { margin-right: 8px; }

    .section-link {
      font-size: 12px;
      font-weight: 700;
      color: var(--primary);
      text-decoration: none;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      gap: 4px;
      opacity: 0.7;
      transition: opacity 0.2s;
    }

    .section-link:hover { opacity: 1; }

    /* ===== TASK SECTION ===== */
    .task-section {
      margin-bottom: 20px;
    }

    .task-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .task-card {
      padding: 18px 22px;
      border-radius: 18px;
      display: flex;
      align-items: center;
      gap: 16px;
      cursor: pointer;
      transition: all 0.2s;
      position: relative;
      overflow: hidden;
    }

    .task-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }

    .task-card::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 120px;
      height: 120px;
      border-radius: 50%;
      opacity: 0.06;
      filter: blur(30px);
      pointer-events: none;
    }

    .task-card.priority-high::before { background: var(--secondary); }
    .task-card.priority-normal::before { background: var(--primary); }
    .task-card.priority-ai::before { background: var(--tertiary); }

    .task-card-icon {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      flex-shrink: 0;
    }

    .priority-high .task-card-icon { background: rgba(255, 117, 252, 0.15); }
    .priority-normal .task-card-icon { background: rgba(193, 255, 254, 0.12); }
    .priority-ai .task-card-icon { background: rgba(209, 163, 255, 0.12); }

    .task-card-info { flex: 1; min-width: 0; }
    .task-card-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--on-surface);
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .task-card-meta {
      font-size: 12px;
      color: var(--on-surface-variant);
    }
    .task-card-meta .due-soon {
      color: var(--secondary);
      font-weight: 700;
    }

    .task-card-action {
      padding: 8px 16px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border: none;
      cursor: pointer;
      flex-shrink: 0;
      transition: all 0.2s;
    }

    .priority-high .task-card-action {
      background: rgba(255, 117, 252, 0.15);
      color: var(--secondary);
      border: 1px solid rgba(255, 117, 252, 0.3);
    }
    .priority-high .task-card-action:hover {
      background: rgba(255, 117, 252, 0.25);
      box-shadow: 0 0 16px rgba(255, 117, 252, 0.2);
    }

    .task-card-modules {
      font-size: 12px;
      color: var(--on-surface-variant);
      margin-top: 6px;
      line-height: 1.5;
    }

    .priority-normal .task-card-action {
      background: rgba(193, 255, 254, 0.1);
      color: var(--primary);
      border: 1px solid rgba(193, 255, 254, 0.25);
    }
    .priority-normal .task-card-action:hover {
      background: rgba(193, 255, 254, 0.2);
    }

    .priority-ai .task-card-action {
      background: rgba(209, 163, 255, 0.1);
      color: var(--tertiary);
      border: 1px solid rgba(209, 163, 255, 0.25);
    }

    /* ===== PET CARD ===== */
    .pet-card {
      border-radius: 20px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 0;
    }

    .pet-card-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--on-surface);
      margin-bottom: 4px;
    }

    .pet-card-sub {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--tertiary);
      margin-bottom: 16px;
    }

    .pet-avatar-wrap {
      position: relative;
      width: 120px;
      height: 120px;
      margin-bottom: 12px;
    }

    .pet-avatar-glow {
      position: absolute;
      inset: -10px;
      background: radial-gradient(circle, rgba(255, 117, 252, 0.25) 0%, transparent 70%);
      border-radius: 50%;
      filter: blur(12px);
      animation: petPulse 3s ease-in-out infinite;
    }

    @keyframes petPulse {
      0%, 100% { opacity: 0.5; transform: scale(1); }
      50% { opacity: 0.9; transform: scale(1.08); }
    }

    .pet-avatar {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: var(--surface-container-high);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 60px;
      border: 2px solid rgba(209, 163, 255, 0.3);
      box-shadow: 0 0 20px rgba(255, 117, 252, 0.15);
      position: relative;
      z-index: 1;
      overflow: hidden;
    }

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

    .pet-level {
      font-size: 15px;
      font-weight: 800;
      color: var(--on-surface);
      margin-bottom: 10px;
    }

    .pet-level .lv {
      color: var(--primary);
      text-shadow: 0 0 10px rgba(193, 255, 254, 0.4);
    }

    .pet-energy-bar {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      overflow: hidden;
      margin-bottom: 6px;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .pet-energy-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--tertiary), var(--secondary), var(--primary));
    }

    .pet-energy-label {
      font-size: 11px;
      color: var(--on-surface-variant);
      margin-bottom: 16px;
    }

    .pet-action-btn {
      width: 100%;
      padding: 11px;
      border-radius: 14px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border: 1px solid rgba(209, 163, 255, 0.3);
      background: rgba(209, 163, 255, 0.08);
      color: var(--tertiary);
      cursor: pointer;
      transition: all 0.2s;
    }

    .pet-action-btn:hover {
      background: rgba(209, 163, 255, 0.16);
      box-shadow: 0 0 16px rgba(209, 163, 255, 0.2);
    }

    /* ===== FEATURE GRID ===== */
    .feature-section { margin-bottom: 16px; }

    .feature-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }

    .feature-card {
      padding: 22px 20px;
      border-radius: 20px;
      cursor: pointer;
      transition: all 0.25s ease;
      position: relative;
      overflow: hidden;
      pointer-events: auto;
    }

    .feature-card > * {
      pointer-events: none;
    }

    .feature-card:hover {
      transform: translateY(-4px);
    }

    .feature-card:hover .feature-card-arrow {
      opacity: 1;
      transform: translateY(0);
    }

    .feature-card::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 100px;
      height: 100px;
      border-radius: 50%;
      opacity: 0.06;
      filter: blur(24px);
      transition: opacity 0.25s;
      pointer-events: none;
    }

    .feature-card:hover::before { opacity: 0.12; }

    .feature-card.c-primary::before { background: var(--primary); }
    .feature-card.c-secondary::before { background: var(--secondary); }
    .feature-card.c-tertiary::before { background: var(--tertiary); }
    .feature-card.c-mixed::before { background: linear-gradient(var(--primary), var(--secondary)); }
.feature-card.c-accent::before { background: linear-gradient(135deg, var(--secondary), var(--tertiary)); }

    .feature-card-icon {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      margin-bottom: 14px;
    }
    .feature-card-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
    .lucide-fallback {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1em;
      height: 1em;
      line-height: 1;
      font-style: normal;
      font-size: 1em;
    }

    .c-primary .feature-card-icon { background: rgba(193, 255, 254, 0.12); color: var(--primary); }
    .c-secondary .feature-card-icon { background: rgba(255, 117, 252, 0.12); color: var(--secondary); }
    .c-tertiary .feature-card-icon { background: rgba(209, 163, 255, 0.12); color: var(--tertiary); }
    .c-mixed .feature-card-icon { background: rgba(193, 255, 254, 0.08); color: var(--primary); }
.c-accent .feature-card-icon { background: rgba(255, 117, 252, 0.12); color: var(--secondary); }

    .feature-card-title {
      font-size: 15px;
      font-weight: 800;
      color: var(--on-surface);
      margin-bottom: 6px;
      letter-spacing: -0.01em;
    }

    .feature-card-desc {
      font-size: 12px;
      color: var(--on-surface-variant);
      line-height: 1.6;
    }

    .feature-card-arrow {
      position: absolute;
      bottom: 18px;
      right: 18px;
      font-size: 16px;
      opacity: 0;
      transform: translateY(4px);
      transition: all 0.2s;
      color: var(--primary);
    }

    /* ===== ASK TEACHER FAB (removed - moved to sidebar) ===== */

    /* ===== BOTTOM BANNER ===== */
    .bottom-banner {
      padding: 22px 28px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      margin-bottom: 28px;
      position: relative;
      overflow: hidden;
    }

    .bottom-banner::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(193, 255, 254, 0.05) 0%, transparent 60%);
      pointer-events: none;
    }

    .banner-icon-wrap {
      position: relative;
      flex-shrink: 0;
    }

    .banner-icon {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      background: rgba(193, 255, 254, 0.1);
      border: 1px solid rgba(193, 255, 254, 0.25);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      color: var(--primary);
    }

    .banner-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 800;
      color: white;
      border: 2px solid var(--surface-dim);
    }

    .banner-text h4 {
      font-size: 16px;
      font-weight: 800;
      color: var(--on-surface);
      margin-bottom: 3px;
    }

    .banner-text p {
      font-size: 12px;
      color: var(--on-surface-variant);
    }

    .star-points-banner {
      align-items: flex-start;
      gap: 18px;
    }

    .star-points-banner .banner-icon-wrap {
      margin-top: 2px;
    }

    .star-points-banner .banner-badge {
      min-width: 34px;
      height: 24px;
      padding: 0 7px;
      border-radius: 999px;
      font-size: 11px;
    }

    .star-points-banner .banner-text {
      flex: 1;
      min-width: 0;
      position: relative;
      z-index: 1;
    }

    .banner-subtext {
      margin-top: 6px;
      font-size: 13px;
      color: var(--on-surface);
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    .banner-source {
      margin-top: 8px;
      line-height: 1.6;
      max-width: 600px;
    }

    .banner-note {
      margin-top: 6px;
      font-size: 11px;
      color: rgba(193, 255, 254, 0.72);
      line-height: 1.55;
      max-width: 640px;
    }

    .star-points-rules {
      position: absolute;
      right: 28px;
      bottom: 84px;
      width: min(360px, calc(100vw - 80px));
      padding: 16px 18px;
      border-radius: 18px;
      background: linear-gradient(180deg, rgba(17, 23, 42, 0.96) 0%, rgba(11, 16, 31, 0.94) 100%);
      border: 1px solid rgba(193, 255, 254, 0.2);
      box-shadow: 0 18px 36px rgba(4, 10, 22, 0.38), 0 0 0 1px rgba(193, 255, 254, 0.06) inset;
      backdrop-filter: blur(16px);
      opacity: 0;
      pointer-events: none;
      transform: translateY(8px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      z-index: 3;
    }

    .star-points-banner:hover .star-points-rules,
    .star-points-banner:focus-within .star-points-rules {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    .star-points-rules-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--primary);
      letter-spacing: 0.04em;
      margin-bottom: 10px;
    }

    .star-points-rules-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 8px;
      font-size: 12px;
      line-height: 1.55;
      color: var(--on-surface-variant);
    }

    .star-points-rules-list li {
      padding-left: 14px;
      position: relative;
    }

    .star-points-rules-list li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 7px;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      box-shadow: 0 0 10px rgba(193, 255, 254, 0.45);
    }

    .banner-btn {
      padding: 11px 24px;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--on-surface);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      transition: all 0.2s;
      flex-shrink: 0;
      font-family: inherit;
    }

    .star-points-banner .banner-btn {
      margin-left: auto;
      position: relative;
      z-index: 2;
    }

    .banner-btn:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.2);
    }

    @media (max-width: 900px) {
      .star-points-banner {
        flex-wrap: wrap;
      }

      .star-points-banner .banner-btn {
        margin-left: 0;
      }

      .star-points-rules {
        position: static;
        width: 100%;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        margin-top: 2px;
        order: 4;
      }
    }

    /* ===== SECTION DIVIDER ===== */
    .section-divider {
      height: 1px;
      background: rgba(193, 255, 254, 0.06);
      margin: 24px 0;
    }

    /* ===== BADGE ===== */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .badge-primary {
      background: rgba(193, 255, 254, 0.12);
      color: var(--primary);
      border: 1px solid rgba(193, 255, 254, 0.25);
    }

    .badge-secondary {
      background: rgba(255, 117, 252, 0.12);
      color: var(--secondary);
      border: 1px solid rgba(255, 117, 252, 0.25);
    }

    .badge-tertiary {
      background: rgba(209, 163, 255, 0.12);
      color: var(--tertiary);
      border: 1px solid rgba(209, 163, 255, 0.25);
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 1100px) {
      .feature-grid { grid-template-columns: repeat(2, 1fr); }
      .video-gen-modal { grid-template-columns: 1fr; max-width: 620px; }
    }

    @media (max-width: 768px) {
      .side-nav { display: none; }
      .main-content { margin-left: 0; margin-right: 0; max-width: 100%; padding: 20px 16px 80px; }
      .right-sidebar { display: none; }
      .top-header { padding: 0 16px; }
      .header-nav { display: none; }
      .feature-grid { grid-template-columns: 1fr 1fr; }
      .banner-btn { padding: 9px 16px; font-size: 11px; }
      .video-gen-grid { grid-template-columns: 1fr; }
      .video-gen-modal { width: 94%; padding: 22px; }
    }

    @media (max-width: 480px) {
      .feature-grid { grid-template-columns: 1fr; }
    }

    /* ===== PROFILE OVERLAY (hidden by default, shown by JS) ===== */
    .profile-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 200;
      background: rgba(11, 14, 20, 0.92);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

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

    .profile-panel {
      width: 100%;
      max-width: 900px;
      margin: auto;
      border-radius: 28px;
      padding: 32px;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
    }

    .profile-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 28px;
    }

    .profile-panel-title {
      font-size: 22px;
      font-weight: 800;
      color: var(--on-surface);
      letter-spacing: -0.02em;
    }

    .close-btn {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--on-surface-variant);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 20px;
      transition: all 0.2s;
    }

    .close-btn:hover { background: rgba(255, 107, 107, 0.15); color: #ff6b6b; border-color: rgba(255, 107, 107, 0.3); }

    .profile-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .profile-tab {
      padding: 8px 16px;
      border-radius: 10px;
      font-size: 12px;
      font-weight: 700;
      border: none;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.05);
      color: var(--on-surface-variant);
      transition: all 0.2s;
    }

    .profile-tab:hover { background: rgba(193, 255, 254, 0.08); color: var(--primary); }
    .profile-tab.active { background: rgba(193, 255, 254, 0.12); color: var(--primary); }

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

    .info-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 20px;
    }

    .info-card {
      padding: 16px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .info-card-icon {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      flex-shrink: 0;
    }

    .info-card-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--on-surface-variant);
      margin-bottom: 3px;
    }

    .info-card-value {
      font-size: 15px;
      font-weight: 700;
      color: var(--on-surface);
    }

    /* ===== MODAL OVERLAY (ask-teacher, image-gen etc) ===== */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 300;
      background: rgba(11, 14, 20, 0.88);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      align-items: center;
      justify-content: center;
    }

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

    .modal-box {
      width: 90%;
      max-width: 560px;
      border-radius: 24px;
      padding: 32px;
      position: relative;
    }

    .modal-title {
      font-size: 20px;
      font-weight: 800;
      color: var(--on-surface);
      margin-bottom: 20px;
    }

    .video-gen-modal {
      max-width: 760px;
      display: grid;
      grid-template-columns: 1.05fr 0.95fr;
      gap: 24px;
    }
    .video-gen-header {
      grid-column: 1 / -1;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
    }
    .video-gen-subtitle {
      margin: -12px 0 0;
      font-size: 13px;
      color: var(--on-surface-variant);
      line-height: 1.6;
    }
    .video-gen-close {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      background: rgba(255,255,255,.06);
      border: 1px solid rgba(255,255,255,.12);
      color: var(--on-surface-variant);
      cursor: pointer;
      font-size: 18px;
      flex-shrink: 0;
    }
    .video-gen-form,
    .video-gen-result {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .video-gen-label {
      display: block;
      margin-bottom: 8px;
      font-size: 13px;
      font-weight: 700;
      color: var(--on-surface);
    }
    .video-gen-textarea,
    .video-gen-input {
      width: 100%;
      border-radius: 14px;
      border: 1px solid rgba(193,255,254,.18);
      background: rgba(255,255,255,.05);
      color: var(--on-surface);
      font-size: 14px;
      font-family: inherit;
      outline: none;
      box-sizing: border-box;
    }
    .video-gen-textarea {
      min-height: 132px;
      padding: 14px;
      resize: vertical;
      line-height: 1.65;
    }
    .video-gen-input {
      padding: 12px 14px;
      height: 46px;
    }
    .video-gen-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .video-gen-actions,
    .video-gen-result-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .video-gen-submit,
    .video-gen-secondary,
    .video-gen-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 120px;
      padding: 11px 18px;
      border-radius: 12px;
      border: none;
      font-size: 13px;
      font-weight: 800;
      font-family: inherit;
      text-decoration: none;
      cursor: pointer;
      transition: transform .2s ease, opacity .2s ease;
    }
    .video-gen-submit {
      background: linear-gradient(135deg,var(--secondary),var(--tertiary));
      color: #fff;
      box-shadow: 0 10px 24px rgba(255, 117, 252, 0.18);
    }
    .video-gen-secondary,
    .video-gen-link.secondary {
      background: rgba(255,255,255,.06);
      border: 1px solid rgba(255,255,255,.12);
      color: var(--on-surface-variant);
    }
    .video-gen-link {
      background: rgba(193,255,254,.12);
      border: 1px solid rgba(193,255,254,.18);
      color: var(--primary);
    }
    .video-gen-submit:hover,
    .video-gen-secondary:hover,
    .video-gen-link:hover {
      transform: translateY(-1px);
    }
    .video-gen-submit:disabled,
    .video-gen-secondary:disabled {
      opacity: .6;
      cursor: not-allowed;
      transform: none;
    }
    .video-gen-status {
      min-height: 22px;
      font-size: 13px;
      color: var(--on-surface-variant);
      font-weight: 700;
    }
    .video-gen-status.processing { color: var(--primary); }
    .video-gen-status.success { color: #7CFFB0; }
    .video-gen-status.fail { color: #ff9191; }
    .video-gen-preview {
      min-height: 280px;
      border-radius: 18px;
      border: 1px solid rgba(193,255,254,.16);
      background:
        radial-gradient(circle at top right, rgba(193,255,254,.12), transparent 30%),
        radial-gradient(circle at bottom left, rgba(209,163,255,.12), transparent 35%),
        rgba(255,255,255,.04);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    .video-gen-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .video-gen-placeholder {
      padding: 28px;
      text-align: center;
      color: var(--on-surface-variant);
      font-size: 13px;
      line-height: 1.7;
    }
    .video-gen-placeholder-icon {
      font-size: 42px;
      margin-bottom: 10px;
    }
    .video-gen-preview--rate-limit {
      background: rgba(255,145,100,.08);
      border-color: rgba(255,145,100,.25);
    }
    .video-gen-preview--rate-limit .video-gen-placeholder {
      color: #ff9164;
    }
    .video-gen-preview-meta {
      position: absolute;
      left: 14px;
      right: 14px;
      bottom: 14px;
      display: flex;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(11,14,20,.7);
      color: #fff;
      font-size: 12px;
      backdrop-filter: blur(8px);
    }

    /* ===== TOAST (轻提示) ===== */
    .toast {
      position: fixed;
      top: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(-20px);
      z-index: 9999;
      padding: 12px 24px;
      border-radius: 14px;
      font-size: 13px;
      font-weight: 700;
      color: var(--on-surface);
      background: rgba(26, 31, 46, 0.92);
      border: 1px solid rgba(193, 255, 254, 0.2);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(193, 255, 254, 0.08);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease, transform 0.3s ease;
      white-space: nowrap;
    }
    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* ===== CLASSROOM BARRAGE ===== */
    .classroom-barrage-layer {
      position: fixed;
      inset: 0;
      z-index: 260;
      pointer-events: none;
      overflow: hidden;
    }

    .classroom-barrage-item {
      position: absolute;
      left: 100%;
      white-space: nowrap;
      max-width: 80vw;
      color: #fff;
      font-size: clamp(18px, 2.4vw, 32px);
      font-weight: 800;
      line-height: 1.2;
      text-shadow: 0 3px 12px rgba(0,0,0,.62);
      animation: classroomBarrageFly 12s linear forwards;
      will-change: transform;
    }

    @keyframes classroomBarrageFly {
      from { transform: translateX(0); }
      to { transform: translateX(-150vw); }
    }

    .classroom-barrage-dialog {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 320;
      width: min(420px, calc(100vw - 32px));
      border: 1px solid rgba(193,255,254,.18);
      border-radius: 20px;
      background: rgba(11, 16, 32, .96);
      box-shadow: 0 18px 48px rgba(0,0,0,.42), 0 0 22px rgba(193,255,254,.08);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      padding: 18px;
      display: none;
    }

    .classroom-barrage-dialog.active { display: block; }

    .classroom-barrage-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 14px;
    }

    .classroom-barrage-kicker {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--primary);
      margin-bottom: 5px;
    }

    .classroom-barrage-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--on-surface);
      line-height: 1.35;
    }

    .classroom-barrage-close {
      width: 30px;
      height: 30px;
      border-radius: 9px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.06);
      color: var(--on-surface-variant);
      cursor: pointer;
      flex-shrink: 0;
    }

    .classroom-barrage-form {
      display: grid;
      gap: 10px;
    }

    .classroom-barrage-input {
      width: 100%;
      min-height: 82px;
      resize: vertical;
      border-radius: 14px;
      border: 1px solid rgba(193,255,254,.2);
      background: rgba(255,255,255,.05);
      color: var(--on-surface);
      font-size: 14px;
      font-family: inherit;
      line-height: 1.6;
      outline: none;
      padding: 12px;
    }

    .classroom-barrage-input:focus {
      border-color: rgba(193,255,254,.42);
    }

    .classroom-barrage-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .classroom-barrage-count {
      font-size: 12px;
      color: var(--on-surface-variant);
    }

    .classroom-barrage-submit {
      min-width: 110px;
      min-height: 38px;
      border: none;
      border-radius: 12px;
      background: var(--primary);
      color: var(--void);
      font-family: inherit;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
    }

    .classroom-barrage-submit:disabled {
      opacity: .55;
      cursor: not-allowed;
    }

    @media (max-width: 640px) {
      .classroom-barrage-dialog {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
      }
    }

    /* ===== CHAT PANEL (workspace) ===== */
    .workspace-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 150;
      background: rgba(11, 14, 20, 0.95);
      backdrop-filter: blur(10px);
    }

    .workspace-overlay.active { display: block; }

    .workspace-panel {
      display: flex;
      height: 100vh;
    }

    .workspace-left {
      width: 240px;
      border-right: 1px solid rgba(193, 255, 254, 0.1);
      padding: 20px 0;
      overflow-y: auto;
      flex-shrink: 0;
    }

    .workspace-right {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .workspace-header-bar {
      padding: 16px 24px;
      border-bottom: 1px solid rgba(193, 255, 254, 0.1);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .workspace-msgs {
      flex: 1;
      overflow-y: auto;
      padding: 20px 24px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .msg {
      max-width: 75%;
      padding: 12px 16px;
      border-radius: 16px;
      font-size: 14px;
      line-height: 1.6;
    }

    .msg-user {
      background: rgba(193, 255, 254, 0.1);
      color: var(--on-surface);
      align-self: flex-end;
      border-bottom-right-radius: 4px;
    }

    .msg-ai {
      background: rgba(37, 43, 59, 0.85);
      border: 1px solid rgba(193, 255, 254, 0.15);
      color: var(--on-bg);
      align-self: flex-start;
      border-bottom-left-radius: 4px;
    }

    .workspace-input-bar {
      padding: 16px 24px;
      border-top: 1px solid rgba(193, 255, 254, 0.1);
      display: flex;
      gap: 10px;
      align-items: flex-end;
    }

    .ws-input {
      flex: 1;
      padding: 10px 16px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(193, 255, 254, 0.15);
      color: var(--on-surface);
      font-size: 14px;
      font-family: inherit;
      resize: none;
      outline: none;
      transition: border-color 0.2s;
    }

    .ws-input:focus { border-color: rgba(193, 255, 254, 0.4); }

    .ws-send-btn {
      padding: 10px 20px;
      border-radius: 12px;
      background: var(--primary);
      color: var(--void);
      border: none;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s;
    }

    .ws-send-btn:hover { box-shadow: 0 0 20px rgba(193, 255, 254, 0.35); }

    /* ===== OLD STYLES WE NEED TO KEEP ===== */
    /* The following are needed for compatibility with existing JS-driven elements */
    .card { border-radius: 14px; padding: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
    .tool-item { display: flex; align-items: flex-start; gap: 10px; }
    .tool-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
    .tool-label { font-size: 12px; font-weight: 700; color: var(--on-surface-variant); margin-bottom: 3px; }
    .tool-content { font-size: 13px; color: var(--on-surface); }
    .sp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .sp-title { font-size: 12px; font-weight: 700; color: var(--on-surface); }
    .sp-link { font-size: 11px; color: var(--primary); text-decoration: none; opacity: 0.7; }
    .sp-link:hover { opacity: 1; }
    .sp-body { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
    .sp-value { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -0.03em; }
    .sp-unit { font-size: 12px; color: var(--on-surface-variant); }
    .sp-weekly { font-size: 11px; color: var(--on-surface-variant); }
    .star-points-card { background: rgba(193, 255, 254, 0.04); border-color: rgba(193, 255, 254, 0.12); }

    /* Hidden elements used by JS */
    #chatPanel, #chat, #status, #requestStatus, #btnSend, #fileUpload, #btnUpload, #fileName, #question,
    #btnAskTeacherDialog, #teacherQuestion, #btnCancelAskTeacher, #btnSubmitAskTeacher, #messageOverlay,
    .chat-panel, .chat-panel-title, #chatMessages, #noMessages, .chat-input-area, #btnAttachFile, #imageGenDialog,
    .image-gen-area, #imagePrompt, #btnGenImage, #imagePreview, #btnDownloadImage, #imageResultArea,
    #materialDialog, .material-dialog-content, #materialContent, .dialog-header, .dialog-actions,
    #basicAssessBanner, #basicAssessBannerInner, #heroWelcome, #heroUnreadCount, #heroUnreadText,
    #heroImageQuota, #heroImageText, #heroChatQuota, #heroChatText, #heroPetName, #heroPetText,
    #btnMessages, #messageBadge, #btnProfile, #btnLogout, #btnBackHome, #classTask, #loadingState,
    #taskContent, #taskNameRow, #taskName, #mandatoryTasksRow, #mandatoryTasks, #submissionRequirementsRow,
    #submissionRequirements, #btnCopyTask, #btnAskTeacher, #btnOpenMaterialDialog, #starPointsValue,
    #starPointsWeekly, #rulesContent, #verificationContent, #profileUsername, #profileName, #profileClassName,
    #profileLoginTime, #profileChatCount, .profile-nav-btn, #btnProfileLogout, #workspaceTitle,
    #workspaceSubtitle, #taskArea, #chatArea, #imageArea {
      /* All JS-managed elements keep their IDs - they will be shown/hidden by JS */
    }

    /* Chat panel specific (used by JS) */
    #chatPanel {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 160;
      background: rgba(11, 14, 20, 0.96);
    }

    .chat-panel { display: none; }
    .chat-panel-title {
      padding: 16px 20px;
      border-bottom: 1px solid rgba(193, 255, 254, 0.1);
      font-size: 15px;
      font-weight: 700;
      color: var(--on-surface);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
    .chat-message { padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
    .chat-message.ai { background: rgba(37, 43, 59, 0.85); border: 1px solid rgba(193, 255, 254, 0.12); align-self: flex-start; }
    .chat-message.user { background: rgba(193, 255, 254, 0.08); align-self: flex-end; }
    .chat-input-area { padding: 12px 16px; border-top: 1px solid rgba(193, 255, 254, 0.1); display: flex; gap: 8px; }
    #question { flex: 1; padding: 9px 14px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(193, 255, 254, 0.15); color: var(--on-surface); font-size: 14px; font-family: inherit; outline: none; }

    /* ===== FLOATING AI ASSISTANT (from ai_learning_tool.html) ===== */
    .ai-float {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      user-select: none;
      cursor: grab;
    }
    .ai-float.dragging { cursor: grabbing; }
    .ai-float-tip {
      background: rgba(26, 31, 46, 0.95);
      border: 1px solid rgba(193, 255, 254, 0.2);
      border-radius: 12px;
      padding: 6px 12px;
      font-size: 12px;
      color: var(--on-surface);
      white-space: nowrap;
      margin-bottom: 8px;
      pointer-events: none;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
      font-weight: 500;
      backdrop-filter: blur(10px);
    }
    .ai-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      border: 2.5px solid white;
      overflow: hidden;
      background: linear-gradient(135deg, var(--primary-dim), var(--tertiary));
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(193, 255, 254, 0.4);
      transition: transform 0.2s ease;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
    }
    .ai-avatar:hover { transform: scale(1.1); }
    .ai-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .ai-avatar-fallback {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 700;
      color: var(--void);
      background: linear-gradient(135deg, var(--primary-dim), var(--tertiary));
    }
    .ai-online-dot {
      position: absolute;
      bottom: 2px;
      right: 2px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #4ade80;
      border: 2px solid white;
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    /* AI Chat Window */
    .ai-chat {
      position: fixed;
      z-index: 10000;
      width: 340px;
      max-height: 480px;
      background: rgba(22, 26, 33, 0.98);
      border: 1px solid rgba(193, 255, 254, 0.25);
      border-radius: 20px;
      overflow: hidden;
      display: none;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(193, 255, 254, 0.15);
      backdrop-filter: blur(20px);
    }
    .ai-chat.open {
      display: flex;
      flex-direction: column;
    }
    .ai-chat-hd {
      padding: 14px 16px;
      background: linear-gradient(135deg, rgba(0, 230, 230, 0.08), rgba(209, 163, 255, 0.06));
      border-bottom: 1px solid rgba(193, 255, 254, 0.15);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .ai-chat-av {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;
      border: 2px solid var(--primary-dim);
      background: linear-gradient(135deg, var(--primary-dim), var(--tertiary));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }
    .ai-chat-av img { width: 100%; height: 100%; object-fit: cover; }
    .ai-chat-name { font-size: 14px; font-weight: 800; color: var(--on-surface); }
    .ai-chat-sub { font-size: 11px; color: var(--on-surface-variant); }
    .ai-chat-close {
      font-size: 20px;
      cursor: pointer;
      color: var(--on-surface-variant);
      background: none;
      border: none;
      line-height: 1;
      margin-left: auto;
      padding: 0 4px;
      font-family: inherit;
      transition: color 0.2s;
    }
    .ai-chat-close:hover { color: #f87171; }

    .ai-msgs {
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      height: 280px;
      overflow-y: auto;
      background: rgba(11, 14, 20, 0.5);
    }
    .ai-msgs::-webkit-scrollbar { width: 5px; }
    .ai-msgs::-webkit-scrollbar-track { background: transparent; }
    .ai-msgs::-webkit-scrollbar-thumb { background: rgba(193, 255, 254, 0.2); border-radius: 3px; }

    .msg { display: flex; gap: 8px; align-items: flex-end; }
    .msg.user { flex-direction: row-reverse; }
    .msg-av {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;
      border: 1px solid rgba(193, 255, 254, 0.2);
      background: linear-gradient(135deg, var(--primary-dim), var(--tertiary));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
    }
    .msg-av img { width: 100%; height: 100%; object-fit: cover; }
    .msg-av-u {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(255, 117, 252, 0.2), rgba(209, 163, 255, 0.2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--secondary);
      flex-shrink: 0;
      border: 1px solid rgba(255, 117, 252, 0.3);
    }
    .bubble {
      max-width: 80%;
      padding: 10px 14px;
      font-size: 13px;
      line-height: 1.65;
      border-radius: 16px;
      word-wrap: break-word;
    }
    .ai-b {
      background: rgba(37, 43, 59, 0.9);
      color: var(--on-bg);
      border: 1px solid rgba(193, 255, 254, 0.15);
      border-bottom-left-radius: 4px;
    }
    .user-b {
      background: linear-gradient(135deg, rgba(0, 230, 230, 0.15), rgba(209, 163, 255, 0.1));
      color: var(--on-surface);
      border: 1px solid rgba(193, 255, 254, 0.2);
      border-bottom-right-radius: 4px;
    }

    /* Typing Animation */
    .typing-b {
      background: rgba(37, 43, 59, 0.9);
      border: 1px solid rgba(193, 255, 254, 0.15);
      border-radius: 16px;
      border-bottom-left-radius: 4px;
      padding: 12px 16px;
      display: flex;
      gap: 4px;
      align-items: center;
    }
    .td {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--primary);
      animation: bounce 1s ease-in-out infinite;
    }
    .td:nth-child(2) { animation-delay: 0.15s; }
    .td:nth-child(3) { animation-delay: 0.3s; }
    @keyframes bounce {
      0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
      30% { transform: translateY(-6px); opacity: 1; }
    }

    /* Quick Questions (optional) */
    .qq-row { padding: 0 14px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
    .qq {
      font-size: 11px;
      padding: 5px 10px;
      border-radius: 20px;
      border: 1px solid rgba(193, 255, 254, 0.2);
      background: transparent;
      color: var(--on-surface-variant);
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      font-family: inherit;
      font-weight: 600;
    }
    .qq:hover {
      background: rgba(193, 255, 254, 0.1);
      color: var(--primary);
      border-color: rgba(193, 255, 254, 0.35);
    }

    /* Input Area */
    .ai-inp-row {
      padding: 12px 14px;
      border-top: 1px solid rgba(193, 255, 254, 0.15);
      display: flex;
      gap: 8px;
      align-items: center;
      background: rgba(22, 26, 33, 0.8);
    }
    .ai-inp {
      flex: 1;
      border: 1px solid rgba(193, 255, 254, 0.2);
      border-radius: 22px;
      padding: 8px 14px;
      font-size: 13px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--on-surface);
      outline: none;
      font-family: inherit;
      transition: border-color 0.2s ease;
    }
    .ai-inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(193, 255, 254, 0.1); }
    .ai-inp::placeholder { color: rgba(203, 208, 219, 0.4); }
    .ai-send {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary-dim), #00b8b8);
      color: var(--void);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      flex-shrink: 0;
      font-size: 16px;
      box-shadow: 0 2px 8px rgba(0, 230, 230, 0.3);
    }
    .ai-send:hover {
      transform: scale(1.08);
      box-shadow: 0 4px 16px rgba(0, 230, 230, 0.45);
    }
    .ai-send:active { transform: scale(0.95); }

    /* Mobile Responsive */
    @media (max-width: 768px) {
      .ai-chat { width: calc(100vw - 32px); max-width: 340px; }
      .ai-float { right: 16px; bottom: 16px; }
      .ai-avatar { width: 50px; height: 50px; }
    }
