:root {
      --fill-general: #ffffff;
      --fill-upper: #ffffff;
      --fill-block: #f7f8fa;
      --button-fill: rgba(0,0,0,0.9);
      --button-text: #ffffff;
      --text-title: #232833;
      --text-body: #4e5666;
      --text-support: #818999;
      --text-disable: #bcc1cc;
      --line: rgba(35,40,51,0.1);
      --ux-hover: rgba(35,40,51,0.06);
      --ux-active: rgba(35,40,51,0.12);
      --ux-primary-select: rgba(0,196,255,0.08);
      --ux-primary-hover: rgba(0,196,255,0.16);
      --ux-primary-active: rgba(0,196,255,0.24);
      --brand: #00c4ff;
      --brand-lighter: #c2f1ff;
      --brand-dark: #0e404f;
      --gray: #727c8f;
      --shadow-1: rgba(0,0,0,0.07);
      --shadow-2: rgba(0,0,0,0.1);
    }

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

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--fill-general);
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    /* ===== Page Layout ===== */
    .page-body {
      display: flex;
      width: 100%;
      height: 100vh;
      position: relative;
    }

    /* ===== Sidebar ===== */
    .sidebar {
      width: 240px;
      min-width: 240px;
      background: var(--fill-general);
      border-right: 1px solid var(--line);
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .sidebar-top {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 12px 8px 0;
      flex: 1;
    }

    .sidebar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 48px;
      padding: 0 8px;
    }

    .sidebar-logo {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .logo-icon {
      width: 28px;
      height: 28px;
      flex-shrink: 0;
    }

    .logo-icon img {
      width: 28px;
      height: 28px;
      object-fit: contain;
    }

    .logo-text {
      font-size: 17px;
      font-weight: 700;
      color: var(--text-title);
      letter-spacing: -0.3px;
    }

    .nav-toggle-btn {
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background: transparent;
      border-radius: 4px;
      cursor: pointer;
      flex-shrink: 0;
    }

    .nav-toggle-btn svg {
      width: 16px;
      height: 16px;
      color: var(--text-support);
      display: block;
    }

    .create-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
      height: 36px;
      background: var(--button-fill);
      color: var(--button-text);
      border: none;
      border-radius: 100px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
    }

    .create-btn svg {
      display: block;
      flex-shrink: 0;
    }

    /* ===== Nav Items ===== */
    .nav-section {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .nav-section-title {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-disable);
      padding: 12px 12px 4px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 32px;
      padding: 4px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-body);
      text-decoration: none;
    }

    .nav-item:hover { background: var(--ux-hover); }

    .nav-item.active {
      background: var(--ux-primary-select);
      color: var(--brand-dark);
      font-weight: 600;
    }

    .nav-icon {
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .nav-icon svg {
      width: 18px;
      height: 18px;
    }

    .nav-trailing {
      margin-left: auto;
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 100px;
      cursor: pointer;
    }

    .nav-trailing:hover { background: var(--ux-hover); }

    .nav-trailing svg {
      width: 14px;
      height: 14px;
      color: var(--text-support);
    }

    /* ===== Sidebar Bottom ===== */
    .sidebar-bottom {
      padding: 0 8px 20px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      border-top: 1px solid var(--line);
      padding-top: 12px;
    }

    .video-ready-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 12px;
      font-size: 12px;
    }

    .video-ready-bar span:first-child {
      color: var(--text-body);
      font-weight: 500;
    }

    .video-ready-bar a {
      color: var(--brand-dark);
      font-weight: 600;
      text-decoration: none;
      font-size: 12px;
    }

    .notification-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-body);
      cursor: pointer;
      border-radius: 8px;
    }

    .notification-bar:hover { background: var(--ux-hover); }

    .notif-icon-wrap {
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .notif-icon-wrap svg {
      width: 18px;
      height: 18px;
    }

    .notif-ring {
      margin-left: auto;
      width: 20px;
      height: 20px;
      position: relative;
    }

    .notif-ring svg {
      width: 20px;
      height: 20px;
      animation: notif-spin 1.5s linear infinite;
    }

    @keyframes notif-spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .share-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      background: linear-gradient(143deg, rgba(233,233,232,0.4) 5.71%, rgba(223,248,255,0.4) 65.27%, rgba(250,177,66,0.16) 119.09%);
    }

    .share-icon {
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 16px;
    }

    .share-info {
      display: flex;
      flex-direction: column;
    }

    .share-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-title);
      line-height: 16px;
    }

    .share-desc {
      font-size: 10px;
      color: var(--text-support);
      line-height: 14px;
    }

    .user-profile {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
    }

    .user-profile:hover { background: var(--ux-hover); }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      overflow: hidden;
      flex-shrink: 0;
    }

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

    .user-info { display: flex; flex-direction: column; flex: 1; }

    .user-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-title);
      line-height: 20px;
    }

    .user-plan {
      font-size: 12px;
      color: var(--text-support);
      line-height: 16px;
    }

    .user-arrow {
      margin-left: auto;
      color: var(--text-support);
      display: flex;
    }

    /* ===== Main Content ===== */
    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: var(--fill-block);
    }

    .page-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 24px 40px 20px;
      background: var(--fill-block);
    }

    .page-header-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 4px;
    }

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

    .new-project-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border: none;
      border-radius: 8px;
      background: var(--button-fill);
      color: var(--button-text);
      font-size: 13px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: opacity 0.15s;
    }
    .new-project-btn:hover { opacity: 0.85; }
    .new-project-btn svg { width: 16px; height: 16px; }

    .header-icon-btn {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-support);
      transition: background 0.15s, color 0.15s;
    }
    .header-icon-btn:hover { background: var(--ux-hover); color: var(--text-title); }
    .header-icon-btn svg { width: 16px; height: 16px; }

    .header-more-wrap { position: relative; }
    .header-more-menu {
      display: none;
      position: absolute;
      top: 100%;
      right: 0;
      margin-top: 6px;
      background: var(--fill-general);
      border-radius: 10px;
      box-shadow: 0 4px 16px var(--shadow-2), 0 0 0 1px var(--line);
      padding: 4px;
      z-index: 100;
      min-width: 160px;
    }
    .header-more-menu.open { display: flex; flex-direction: column; }

    .page-subtitle {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-support);
    }

    /* Project selector */
    .project-selector {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .project-selector-name {
      font-size: 22px;
      font-weight: 700;
      color: var(--text-title);
      padding: 2px 6px 2px 0;
      border-radius: 6px;
      cursor: text;
      transition: background 0.15s;
    }
    .project-selector-name:hover { background: var(--ux-hover); }
    .project-selector-chevron {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 1.5px solid var(--line);
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      cursor: pointer;
      transition: background 0.15s;
    }
    .project-selector-chevron:hover { background: var(--ux-hover); }
    .project-selector-chevron svg { width: 12px; height: 12px; color: var(--text-support); }

    /* Project picker modal */
    .project-modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 480px;
      max-height: 70vh;
      padding: 24px;
      transform: translateY(10px);
      transition: transform 0.2s;
      display: flex;
      flex-direction: column;
    }
    .modal-overlay.visible .project-modal-box { transform: translateY(0); }
    .project-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    .project-modal-header h3 {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-title);
      margin: 0;
    }
    .project-list {
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .project-list-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border: none;
      background: transparent;
      border-radius: 10px;
      cursor: pointer;
      font-family: inherit;
      text-align: left;
      width: 100%;
      transition: background 0.12s;
    }
    .project-list-item:hover { background: var(--ux-hover); }
    .project-list-item.active { background: var(--fill-block); }
    .project-list-icon {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: var(--fill-block);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .project-list-item.active .project-list-icon { background: var(--brand); }
    .project-list-icon svg { width: 18px; height: 18px; color: var(--text-support); }
    .project-list-item.active .project-list-icon svg { color: #fff; }
    .project-list-info {
      flex: 1;
      min-width: 0;
    }
    .project-list-name {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-title);
      display: block;
    }
    .project-list-meta {
      font-size: 12px;
      color: var(--text-support);
      margin-top: 2px;
      display: block;
    }
    .project-list-check {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--brand);
      color: #fff;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
    }
    .project-list-check svg { width: 12px; height: 12px; }
    .project-list-item.active .project-list-check { opacity: 1; }
    .project-modal-divider {
      height: 1px;
      background: var(--line);
      margin: 8px 0;
    }
    .project-create-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border: none;
      background: transparent;
      border-radius: 10px;
      cursor: pointer;
      font-family: inherit;
      font-size: 14px;
      color: var(--brand);
      font-weight: 500;
      width: 100%;
      text-align: left;
      transition: background 0.12s;
    }
    .project-create-btn:hover { background: var(--ux-hover); }
    .project-create-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

    /* ===== Workspace Two-Panel Layout ===== */
    .workspace-wrap {
      flex: 1;
      min-height: 0;
      padding: 0 40px 40px;
      display: flex;
    }

    .notes-workspace {
      display: flex;
      gap: 0;
      flex: 1;
      min-height: 0;
      background: var(--fill-general);
      border-radius: 16px;
      border: 1px solid var(--line);
      overflow: hidden;
    }

    /* ===== Sources Panel ===== */
    .sources-panel {
      width: 360px;
      min-width: 360px;
      display: flex;
      flex-direction: column;
      background: var(--fill-general);
      border-right: 1px solid var(--line);
      overflow: hidden;
    }

    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 12px;
      border-bottom: 1px solid var(--line);
    }

    .sources-panel > .panel-header {
      border-bottom: none;
    }

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

    .panel-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-title);
    }

    .panel-count {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-support);
      background: var(--fill-block);
      padding: 1px 8px;
      border-radius: 100px;
      line-height: 18px;
    }

    .panel-action-btn {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-support);
    }

    .panel-action-btn:hover {
      background: var(--ux-hover);
      color: var(--text-title);
    }

    .panel-action-btn svg {
      width: 14px;
      height: 14px;
    }

    /* Add Source Area */
    .add-source-area {
      padding: 16px 20px;
    }

    .add-source-dropzone {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 24px 16px;
      border: 2px dashed var(--line);
      border-radius: 12px;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
    }

    .add-source-dropzone:hover {
      border-color: var(--brand);
      background: var(--ux-primary-select);
    }

    .dropzone-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: var(--fill-block);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-support);
    }

    .dropzone-icon svg {
      width: 20px;
      height: 20px;
    }

    .dropzone-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-title);
      display: block;
      text-align: center;
    }

    .dropzone-desc {
      font-size: 12px;
      color: var(--text-support);
      display: block;
      text-align: center;
    }

    .add-source-options {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }

    .source-option-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      font-size: 12px;
      font-weight: 500;
      color: var(--text-body);
      cursor: pointer;
      font-family: inherit;
    }

    .source-option-btn:hover {
      background: var(--ux-hover);
    }

    #knowledgeBtn { flex: 1.4; }

    .source-option-btn svg {
      width: 14px;
      height: 14px;
      color: var(--text-support);
    }

    /* Sources List */
    .sources-list {
      flex: 1;
      overflow-y: auto;
      padding: 8px 12px;
    }

    .sources-empty {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 48px 24px;
      text-align: center;
    }

    .sources-empty.visible {
      display: flex;
    }

    .sources-empty-icon {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      background: var(--fill-block);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-disable);
    }

    .sources-empty-icon svg { width: 28px; height: 28px; }

    .sources-empty-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
    }

    .sources-empty-desc {
      font-size: 13px;
      color: var(--text-support);
      max-width: 240px;
      line-height: 1.5;
    }

    .sources-list::-webkit-scrollbar { width: 6px; }
    .sources-list::-webkit-scrollbar-track { background: transparent; }
    .sources-list::-webkit-scrollbar-thumb { background: var(--text-disable); border-radius: 3px; }

    .source-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 8px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .source-card:hover {
      background: var(--ux-hover);
    }

    .source-checkbox {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      flex-shrink: 0;
      position: relative;
      background: #fff;
      box-shadow: inset 0 0 0 1.5px rgba(35,40,51,0.2);
      transition: background 0.15s, box-shadow 0.15s;
    }
    .source-checkbox:checked {
      background: var(--brand);
      box-shadow: none;
    }
    .source-checkbox:checked::after {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px 8px no-repeat;
    }
    .source-checkbox::before {
      content: '';
      position: absolute;
      top: -8px;
      left: -8px;
      right: -8px;
      bottom: -8px;
    }

    .select-all-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px;
      margin-bottom: 4px;
      cursor: pointer;
      border-radius: 8px;
    }

    .select-all-row:hover {
      background: var(--ux-hover);
    }

    .select-all-label {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-body);
    }

    .source-type-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .source-type-icon svg {
      width: 16px;
      height: 16px;
    }

    .source-type-pdf { background: #fef2f2; color: #dc2626; }
    .source-type-url { background: #eff6ff; color: #2563eb; }
    .source-type-text { background: #f0fdf4; color: #16a34a; }

    .source-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .source-name {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-title);
      line-height: 18px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .source-meta {
      font-size: 11px;
      color: var(--text-support);
      line-height: 14px;
    }

    /* ===== Generation Panel ===== */
    .generation-panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      background: transparent;
      overflow: hidden;
    }

    .generation-panel > .panel-header {
      border-bottom: none;
    }

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

    .selected-count {
      font-size: 12px;
      font-weight: 500;
      color: var(--brand-dark);
      background: var(--ux-primary-select);
      padding: 4px 10px;
      border-radius: 100px;
    }

    /* Video Types Grid */
    .video-types-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding: 20px;
      flex: 1;
      overflow-y: auto;
      align-content: start;
    }

    .video-types-grid::-webkit-scrollbar { width: 6px; }
    .video-types-grid::-webkit-scrollbar-track { background: transparent; }
    .video-types-grid::-webkit-scrollbar-thumb { background: var(--text-disable); border-radius: 3px; }

    .video-type-card {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 16px;
      border-radius: 12px;
      border: 1px solid var(--line);
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    }

    .video-type-card:hover {
      border-color: rgba(35,40,51,0.2);
      box-shadow: 0 0 6px 0 var(--shadow-1), 0 4px 8px -2px var(--shadow-2);
    }

    .video-type-card.selected {
      border-color: var(--brand);
      background: var(--ux-primary-select);
    }

    .video-type-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .video-type-icon svg {
      width: 20px;
      height: 20px;
    }

    .video-type-info {
      flex: 1;
      min-width: 0;
    }

    .video-type-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-title);
      line-height: 20px;
      display: block;
    }

    .video-type-desc {
      font-size: 12px;
      color: var(--text-support);
      line-height: 16px;
      display: block;
      margin-top: 2px;
    }

    .type-checkbox {
      -webkit-appearance: none;
      appearance: none;
      width: 18px;
      height: 18px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      flex-shrink: 0;
      margin-top: 2px;
      position: relative;
      background: #fff;
      box-shadow: inset 0 0 0 1.5px rgba(35,40,51,0.2);
      transition: background 0.15s, box-shadow 0.15s;
    }
    .type-checkbox:checked {
      background: var(--brand);
      box-shadow: none;
    }
    .type-checkbox:checked::after {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px 8px no-repeat;
    }
    .type-checkbox::before {
      content: '';
      position: absolute;
      top: -8px;
      left: -8px;
      right: -8px;
      bottom: -8px;
    }

    /* Generation Config */
    .generation-config {
      padding: 16px 20px;
      border-top: 1px solid var(--line);
      display: none;
    }

    .config-row {
      display: flex;
      gap: 12px;
    }

    .config-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .config-label {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-support);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .config-dropdown {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 36px;
      padding: 0 12px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      font-size: 13px;
      font-weight: 500;
      color: var(--text-title);
      cursor: pointer;
      font-family: inherit;
    }

    .config-dropdown:hover {
      background: var(--ux-hover);
    }

    .config-dropdown svg {
      width: 12px;
      height: 12px;
      color: var(--text-support);
    }

    /* Avatar picker button */
    .avatar-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      height: 44px;
      padding: 0 12px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
    }
    .avatar-btn:hover { background: var(--ux-hover); }
    .avatar-btn-thumb {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--fill-block);
      object-fit: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }
    .avatar-btn-thumb svg { width: 18px; height: 18px; color: var(--text-support); }
    .avatar-btn-name {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-title);
      flex: 1;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .avatar-btn-clear {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--text-support);
      opacity: 0;
      transition: background 0.15s, color 0.15s, opacity 0.15s;
    }
    .avatar-btn-clear.active { display: flex; }
    .avatar-btn:hover .avatar-btn-clear.active { opacity: 1; }
    .avatar-btn-clear:hover { background: var(--ux-hover); color: var(--text-title); }
    .avatar-btn-clear svg { width: 12px; height: 12px; }
    .avatar-btn-arrow {
      width: 12px;
      height: 12px;
      color: var(--text-support);
      flex-shrink: 0;
    }

    /* Orientation toggle */
    .orientation-toggle {
      display: flex;
      align-items: center;
      height: 44px;
      background: var(--fill-block);
      border-radius: 22px;
      padding: 4px;
      position: relative;
      gap: 0;
    }
    .orientation-slider {
      position: absolute;
      top: 4px;
      left: 4px;
      width: calc(50% - 4px);
      height: calc(100% - 8px);
      background: var(--fill-general);
      border-radius: 18px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      transition: left 0.25s ease;
    }
    .orientation-toggle.landscape .orientation-slider {
      left: 50%;
    }
    .orientation-opt {
      position: relative;
      z-index: 1;
      width: 44px;
      height: 36px;
      border: none;
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-disable);
      transition: color 0.2s;
    }
    .orientation-opt svg { width: 20px; height: 20px; }
    .orientation-opt.active { color: var(--text-title); }

    /* Advanced settings icon button */
    .advanced-icon-btn {
      width: 44px;
      height: 44px;
      border: none;
      background: transparent;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-support);
      transition: background 0.15s, color 0.15s;
    }

    .advanced-icon-btn:hover { background: var(--ux-hover); color: var(--text-title); }
    .advanced-icon-btn svg { width: 20px; height: 20px; }

    /* Advanced settings modal fields */
    .advanced-field {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 20px;
    }

    .advanced-field:last-child { margin-bottom: 0; }

    .advanced-field-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-title);
    }

    .advanced-field-options {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .advanced-pill {
      padding: 6px 16px;
      border-radius: 20px;
      border: 1px solid var(--line);
      background: transparent;
      color: var(--text-body);
      font-size: 13px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.15s;
    }

    .advanced-pill:hover { background: var(--ux-hover); }

    .advanced-pill.active {
      background: var(--brand);
      color: #fff;
      border-color: var(--brand);
    }

    .advanced-select {
      width: 100%;
      height: 40px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      color: var(--text-title);
      background: var(--fill-general);
      outline: none;
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23818999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
    }

    .advanced-select:focus { border-color: var(--brand); }

    .advanced-textarea {
      width: 100%;
      min-height: 80px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      color: var(--text-title);
      outline: none;
      resize: vertical;
      transition: border-color 0.15s;
    }

    .advanced-textarea:focus { border-color: var(--brand); }
    .advanced-textarea::placeholder { color: var(--text-disable); }

    /* Avatar picker modal */
    .avatar-modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 580px;
      max-height: 80vh;
      padding: 24px;
      transform: translateY(10px);
      transition: transform 0.2s;
      display: flex;
      flex-direction: column;
    }
    .modal-overlay.visible .avatar-modal-box { transform: translateY(0); }
    .avatar-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    .avatar-modal-header h3 {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-title);
      margin: 0;
    }
    .avatar-modal-close {
      width: 28px;
      height: 28px;
      border: none;
      background: transparent;
      cursor: pointer;
      color: var(--text-support);
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
    }
    .avatar-modal-close:hover { background: var(--ux-hover); }
    .avatar-modal-close svg { width: 16px; height: 16px; }
    .avatar-modal-tabs {
      display: flex;
      gap: 16px;
      border-bottom: 1px solid var(--line);
      margin-bottom: 16px;
    }
    .avatar-modal-tab {
      font-size: 13px;
      color: var(--text-support);
      padding-bottom: 8px;
      border: none;
      background: none;
      cursor: pointer;
      font-family: inherit;
      position: relative;
    }
    .avatar-modal-tab.active {
      color: var(--text-title);
      font-weight: 600;
    }
    .avatar-modal-tab.active::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--text-title);
      border-radius: 1px;
    }
    .avatar-search {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 38px;
      padding: 0 12px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      margin-bottom: 12px;
    }
    .avatar-search svg { width: 16px; height: 16px; color: var(--text-support); flex-shrink: 0; }
    .avatar-search input {
      border: none;
      outline: none;
      background: transparent;
      font-size: 13px;
      font-family: inherit;
      color: var(--text-body);
      flex: 1;
    }
    .avatar-search input::placeholder { color: var(--text-disable); }
    .avatar-tags {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .avatar-tag {
      font-size: 12px;
      padding: 4px 12px;
      border-radius: 20px;
      border: 1px solid var(--line);
      background: transparent;
      color: var(--text-body);
      cursor: pointer;
      font-family: inherit;
    }
    .avatar-tag.active {
      background: var(--brand);
      color: #fff;
      border-color: var(--brand);
    }
    .avatar-tag:hover:not(.active) { background: var(--ux-hover); }
    .avatar-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      overflow-y: auto;
      flex: 1;
    }
    .avatar-grid-item {
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      position: relative;
      aspect-ratio: 1;
      background: var(--fill-block);
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid transparent;
      transition: border-color 0.15s;
    }
    .avatar-grid-item:hover { border-color: var(--brand); }
    .avatar-grid-item.selected { border-color: var(--brand); }
    .avatar-grid-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .avatar-grid-name {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 20px 8px 6px;
      font-size: 11px;
      font-weight: 500;
      color: #fff;
      background: linear-gradient(transparent, rgba(0,0,0,0.5));
      text-align: center;
    }

    /* Knowledge Hub modal */
    .knowledge-modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 520px;
      max-width: 90vw;
      max-height: 70vh;
      padding: 24px;
      transform: translateY(10px);
      transition: transform 0.2s;
      display: flex;
      flex-direction: column;
    }

    .modal-overlay.visible .knowledge-modal-box { transform: translateY(0); }

    .knowledge-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .knowledge-modal-header h3 {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-title);
      margin: 0;
    }

    .knowledge-search {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 38px;
      padding: 0 12px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      margin-bottom: 12px;
    }

    .knowledge-search svg { width: 16px; height: 16px; color: var(--text-support); flex-shrink: 0; }

    .knowledge-search input {
      border: none;
      outline: none;
      background: transparent;
      font-size: 13px;
      font-family: inherit;
      color: var(--text-body);
      flex: 1;
    }

    .knowledge-search input::placeholder { color: var(--text-disable); }

    .knowledge-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      overflow-y: auto;
      flex: 1;
      min-height: 0;
    }

    .knowledge-list::-webkit-scrollbar { width: 6px; }
    .knowledge-list::-webkit-scrollbar-track { background: transparent; }
    .knowledge-list::-webkit-scrollbar-thumb { background: var(--text-disable); border-radius: 3px; }

    .knowledge-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border-radius: 8px;
      border: 1px solid var(--line);
      cursor: pointer;
      transition: background 0.15s;
      flex-shrink: 0;
    }

    .knowledge-item:hover { background: var(--ux-hover); }

    .knowledge-item input[type="checkbox"] {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      flex-shrink: 0;
      position: relative;
      background: #fff;
      box-shadow: inset 0 0 0 1.5px rgba(35,40,51,0.2);
      transition: background 0.15s, box-shadow 0.15s;
    }
    .knowledge-item input[type="checkbox"]:checked {
      background: var(--brand);
      box-shadow: none;
    }
    .knowledge-item input[type="checkbox"]:checked::after {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px 8px no-repeat;
    }
    .knowledge-item input[type="checkbox"]::before {
      content: '';
      position: absolute;
      top: -8px;
      left: -8px;
      right: -8px;
      bottom: -8px;
    }

    .knowledge-item-icon {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
    }

    .knowledge-item-icon.pdf { background: #e74c3c; }
    .knowledge-item-icon.xlsx { background: #27ae60; }
    .knowledge-item-icon.url { background: var(--fill-block); color: var(--text-support); }
    .knowledge-item-icon svg { width: 16px; height: 16px; }

    .knowledge-item-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .knowledge-item-name {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-title);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .knowledge-item-meta {
      font-size: 12px;
      color: var(--text-support);
    }

    .knowledge-item.checked {
      background: var(--ux-primary-select);
      border-color: var(--brand);
    }

    .knowledge-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid var(--line);
      padding-top: 16px;
      margin-top: 16px;
    }

    .knowledge-actions-count {
      font-size: 13px;
      color: var(--text-support);
    }

    .knowledge-actions-btns {
      display: flex;
      gap: 8px;
    }

    /* Style picker modal */
    .style-modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 620px;
      max-height: 80vh;
      padding: 24px;
      transform: translateY(10px);
      transition: transform 0.2s;
      display: flex;
      flex-direction: column;
    }
    .modal-overlay.visible .style-modal-box { transform: translateY(0); }
    .style-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      overflow-y: auto;
      flex: 1;
    }
    .style-grid-item {
      cursor: pointer;
      border-radius: 10px;
      overflow: hidden;
      border: 2px solid transparent;
      transition: border-color 0.15s;
      display: flex;
      flex-direction: column;
      background: var(--fill-block);
    }
    .style-grid-item:hover { border-color: var(--brand); }
    .style-grid-item.selected { border-color: var(--brand); }
    .style-thumb {
      aspect-ratio: 9/16;
      position: relative;
      overflow: hidden;
    }
    .style-thumb-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 700;
      color: rgba(0,0,0,0.15);
      transform: scale(1);
      transition: transform 4s ease-out;
    }
    .style-grid-item:hover .style-thumb-img {
      transform: scale(1.15);
      animation: styleLetterSpin 2s linear infinite;
    }
    @keyframes styleLetterSpin {
      0% { transform: scale(1.15) rotateY(0deg); }
      100% { transform: scale(1.15) rotateY(360deg); }
    }
    .style-thumb-label {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 16px 6px 5px;
      font-size: 10px;
      font-weight: 600;
      color: #fff;
      background: linear-gradient(transparent, rgba(0,0,0,0.55));
      text-align: center;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    /* Hover play progress bar */
    .style-thumb-progress {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 3px;
      background: var(--brand);
      width: 0%;
      transition: none;
      z-index: 2;
    }
    .style-item-name {
      padding: 8px 6px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-title);
      text-align: center;
      line-height: 16px;
    }

    /* Generation Footer */
    .generation-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
    }

    .summary-text {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-support);
    }

    .generate-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      height: 40px;
      padding: 0 24px;
      background: var(--button-fill);
      color: var(--button-text);
      border: none;
      border-radius: 100px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: opacity 0.15s;
    }

    .generate-btn:hover:not(:disabled) {
      opacity: 0.85;
    }

    .generate-btn:disabled {
      background: var(--text-disable);
      cursor: not-allowed;
    }

    .generate-btn svg {
      width: 16px;
      height: 16px;
    }

    /* ===== Panel Tabs ===== */
    .panel-tabs {
      display: flex;
      gap: 0;
      position: relative;
    }

    .panel-tabs-indicator {
      position: absolute;
      bottom: -13px;
      height: 2px;
      border-radius: 1px;
      background: var(--brand);
      transition: left 0.25s ease, width 0.25s ease;
    }

    .panel-tab {
      padding: 0 2px;
      height: 100%;
      display: flex;
      align-items: center;
      gap: 6px;
      border: none;
      background: transparent;
      font-size: 18px;
      font-weight: 600;
      color: var(--text-support);
      cursor: pointer;
      font-family: inherit;
      position: relative;
      margin-right: 16px;
      padding-bottom: 0;
    }

    .panel-tab:hover { color: var(--text-body); }

    .panel-tab.active {
      color: var(--text-title);
      font-weight: 700;
    }

    .panel-tab-badge {
      font-size: 11px;
      font-weight: 600;
      color: var(--button-text);
      background: var(--brand);
      padding: 1px 6px;
      border-radius: 100px;
      line-height: 16px;
      display: none;
    }

    .panel-tab-badge.visible { display: inline-flex; }

    /* ===== Tab Content ===== */
    .tab-content {
      display: none;
      flex-direction: column;
      flex: 1;
      min-height: 0;
    }

    .tab-content.active {
      display: flex;
      animation: tabFadeIn 0.18s ease;
    }

    @keyframes tabFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    /* ===== Loading Overlay ===== */
    .loading-overlay {
      position: absolute;
      inset: 0;
      background: rgba(255,255,255,0.85);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 50;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    .loading-overlay.visible {
      opacity: 1;
      pointer-events: auto;
    }
    .loading-spinner {
      width: 32px;
      height: 32px;
      border: 3px solid var(--line);
      border-top-color: var(--brand);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* ===== Results Tab ===== */
    .results-empty {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 40px;
    }

    .results-empty-icon {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      background: var(--fill-block);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-disable);
    }

    .results-empty-icon svg { width: 28px; height: 28px; }

    .results-empty-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
    }

    .results-empty-desc {
      font-size: 13px;
      color: var(--text-support);
      text-align: center;
      max-width: 280px;
    }

    .results-list {
      flex: 1;
      overflow-y: auto;
      padding: 16px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .results-list::-webkit-scrollbar { width: 6px; }
    .results-list::-webkit-scrollbar-track { background: transparent; }
    .results-list::-webkit-scrollbar-thumb { background: var(--text-disable); border-radius: 3px; }

    /* Result Card — YouTube-style */
    .result-card {
      display: flex;
      gap: 16px;
      padding: 12px;
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .result-card:hover { background: var(--ux-hover); }

    /* Thumbnail */
    .result-thumbnail {
      width: 240px;
      min-width: 240px;
      aspect-ratio: 16/9;
      border-radius: 10px;
      background: #1a1a2e;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }

    .result-thumb-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      pointer-events: none;
      z-index: 1;
    }

    .result-thumbnail .play-icon {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 2;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(0,0,0,0.55);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.15s;
      pointer-events: none;
    }

    .result-card:hover .play-icon { opacity: 1; }

    .play-icon svg { width: 18px; height: 18px; color: #fff; margin-left: 2px; }

    .thumbnail-duration {
      position: absolute;
      bottom: 6px;
      right: 6px;
      z-index: 3;
      background: rgba(0,0,0,0.8);
      color: #fff;
      font-size: 11px;
      font-weight: 600;
      padding: 1px 5px;
      border-radius: 4px;
      line-height: 16px;
    }

    /* Shimmer loading on thumbnail */
    .result-thumbnail.loading::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
      animation: shimmer 1.8s ease-in-out infinite;
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .result-thumbnail.loading .play-icon,
    .result-thumbnail.loading .thumbnail-duration,
    .result-thumbnail.loading .result-thumb-video { display: none; }

    /* Text shimmer placeholders during loading */
    .result-card.loading .result-actions { display: none; }
    .result-card.loading .result-title,
    .result-card.loading .result-meta,
    .result-card.loading .result-desc {
      color: transparent;
      background: var(--fill-block);
      border-radius: 4px;
      position: relative;
      overflow: hidden;
      pointer-events: none;
    }
    .result-card.loading .result-title { width: 70%; height: 18px; margin-bottom: 2px; }
    .result-card.loading .result-meta { width: 50%; height: 14px; }
    .result-card.loading .result-desc { width: 90%; height: 32px; }
    .result-card.loading .result-title::after,
    .result-card.loading .result-meta::after,
    .result-card.loading .result-desc::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.04) 50%, transparent 100%);
      animation: textShimmer 1.8s ease-in-out infinite;
    }
    @keyframes textShimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    /* Loading progress bar under thumbnail */
    .thumbnail-progress {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: rgba(255,255,255,0.15);
      z-index: 3;
    }

    .thumbnail-progress-bar {
      height: 100%;
      background: var(--brand);
      width: 0%;
      transition: width 0.4s ease;
      border-radius: 0 2px 2px 0;
    }

    /* Info column */
    .result-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
      padding: 2px 0;
    }

    .result-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
      line-height: 22px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .result-meta {
      font-size: 12px;
      color: var(--text-support);
      margin-top: 4px;
      line-height: 16px;
    }

    .result-desc {
      font-size: 13px;
      color: var(--text-body);
      line-height: 18px;
      margin-top: 8px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* Right-side actions */
    .result-actions {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
      align-self: center;
    }

    .result-action-btn {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: none;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-disable);
      opacity: 0;
      transition: opacity 0.15s, background 0.15s;
    }

    .result-dl-btn,
    .result-share-btn {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      color: var(--text-body);
      background: transparent;
    }
    .result-dl-btn svg,
    .result-share-btn svg { width: 20px; height: 20px; }
    .result-dl-btn:hover,
    .result-share-btn:hover { color: var(--brand); }

    .result-card:hover .result-action-btn { opacity: 1; }

    .result-action-btn:hover { background: var(--ux-hover); color: var(--text-support); }
    .result-action-btn svg { width: 16px; height: 16px; }

    /* Result context menu (reuses source context menu styles) */
    .result-more-btn { position: relative; }
    .result-more-btn .source-context-menu { top: 100%; right: 0; }

    /* ===== Video Player ===== */
    .video-player {
      display: none;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      animation: tabFadeIn 0.2s ease;
    }
    .video-player.visible {
      display: flex;
    }
    .video-player-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 20px 12px;
    }
    .video-player-back {
      width: 32px;
      height: 32px;
      border: none;
      background: transparent;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-support);
      transition: background 0.15s, color 0.15s;
    }
    .video-player-back:hover { background: var(--ux-hover); color: var(--text-title); }
    .video-player-back svg { width: 18px; height: 18px; }
    .video-player-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .video-player-stage {
      flex: 1;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 20px 20px;
    }
    .video-player-screen {
      width: 100%;
      max-height: 100%;
      aspect-ratio: 16/9;
      background: #0f0f1a;
      border-radius: 12px;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      user-select: none;
    }
    .video-player-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .video-player-screen::after {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 120px;
      background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
      pointer-events: none;
      z-index: 2;
      opacity: 1;
      transition: opacity 0.35s ease;
    }
    .video-player-screen.controls-hidden::after {
      opacity: 0;
    }
    .video-player-play-btn {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: rgba(255,255,255,0.15);
      backdrop-filter: blur(8px);
      border: 2px solid rgba(255,255,255,0.25);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
      transition: transform 0.15s, background 0.15s;
    }
    .video-player-screen:hover .video-player-play-btn {
      transform: scale(1.06);
      background: rgba(255,255,255,0.22);
    }
    .video-player-play-btn svg { width: 24px; height: 24px; color: #fff; margin-left: 3px; }
    .video-player-screen.playing .video-player-play-btn {
      opacity: 0;
      transition: opacity 0.2s;
    }
    .video-player-screen.playing:hover .video-player-play-btn {
      opacity: 1;
    }
    .video-player-screen.playing .video-player-play-btn svg { margin-left: 0; }
    .video-player-screen.controls-hidden .video-player-controls { opacity: 0; pointer-events: none; }
    .video-player-screen.controls-hidden .video-player-play-btn { opacity: 0 !important; }
    .video-player-screen.controls-hidden { cursor: none; }
    .video-player-controls {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 3;
      padding: 12px 16px;
      opacity: 1;
      transition: opacity 0.35s ease;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .video-player-progress {
      width: 100%;
      height: 4px;
      background: rgba(255,255,255,0.2);
      border-radius: 2px;
      cursor: pointer;
      position: relative;
    }
    .video-player-progress-fill {
      height: 100%;
      background: var(--brand);
      border-radius: 2px;
      width: 0%;
      transition: width 0.3s linear;
    }
    .video-player-controls-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .video-player-time {
      font-size: 12px;
      color: rgba(255,255,255,0.7);
      font-variant-numeric: tabular-nums;
    }
    .video-player-meta {
      font-size: 12px;
      color: var(--text-support);
      padding: 8px 20px 16px;
    }

    /* ===== Share Modal ===== */
    .share-modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 460px;
      max-width: 90vw;
      padding: 28px;
      transform: translateY(10px);
      transition: transform 0.2s;
    }
    .modal-overlay.visible .share-modal-box { transform: translateY(0); }
    .share-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 24px;
    }
    .share-modal-title {
      font-size: 20px;
      font-weight: 700;
      color: var(--text-title);
    }
    .share-access-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 4px;
    }
    .share-access-select {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-title);
      cursor: pointer;
      background: none;
      border: none;
      font-family: inherit;
    }
    .share-access-select svg { width: 16px; height: 16px; color: var(--text-support); }
    .share-access-icon {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--fill-block);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-support);
    }
    .share-access-icon svg { width: 18px; height: 18px; }
    .share-access-desc {
      font-size: 13px;
      color: var(--text-support);
      margin-bottom: 20px;
      line-height: 1.4;
    }
    .share-password-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 0;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      margin-bottom: 24px;
    }
    .share-password-label {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-title);
    }
    .share-toggle {
      width: 44px;
      height: 24px;
      border-radius: 12px;
      background: var(--text-disable);
      border: none;
      cursor: pointer;
      position: relative;
      transition: background 0.2s;
    }
    .share-toggle.active { background: var(--brand); }
    .share-toggle::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #fff;
      transition: left 0.2s;
    }
    .share-toggle.active::after { left: 23px; }
    .share-channels {
      display: flex;
      gap: 16px;
      justify-content: center;
      margin-bottom: 24px;
    }
    .share-channel {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      background: none;
      border: none;
      font-family: inherit;
    }
    .share-channel:hover .share-channel-icon { background: var(--ux-hover); }
    .share-channel-icon {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      border: 1.5px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
      background: var(--fill-general);
    }
    .share-channel-icon svg { width: 22px; height: 22px; }
    .share-channel-label {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-body);
    }
    .share-copy-btn {
      width: 100%;
      height: 48px;
      border-radius: 100px;
      border: none;
      background: var(--button-fill);
      color: var(--button-text);
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: opacity 0.15s;
    }
    .share-copy-btn:hover { opacity: 0.85; }
    .share-copy-btn svg { width: 16px; height: 16px; }

    /* ===== Delete Confirm Modal ===== */
    .delete-confirm-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 380px;
      max-width: 90vw;
      padding: 32px;
      transform: translateY(10px);
      transition: transform 0.2s;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
    .modal-overlay.visible .delete-confirm-box { transform: translateY(0); }
    .delete-confirm-icon {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: #fef2f2;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
    }
    .delete-confirm-icon svg { width: 24px; height: 24px; color: #dc2626; }
    .delete-confirm-title {
      font-size: 17px;
      font-weight: 600;
      color: var(--text-title);
      margin-bottom: 8px;
    }
    .delete-confirm-desc {
      font-size: 13px;
      color: var(--text-support);
      line-height: 1.5;
      margin-bottom: 24px;
    }
    .delete-confirm-actions {
      display: flex;
      gap: 10px;
      width: 100%;
    }
    .delete-confirm-cancel,
    .delete-confirm-delete {
      flex: 1;
      height: 40px;
      border-radius: 10px;
      border: none;
      font-size: 14px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: opacity 0.15s;
    }
    .delete-confirm-cancel {
      background: var(--fill-block);
      color: var(--text-body);
    }
    .delete-confirm-cancel:hover { background: var(--ux-hover); }
    .delete-confirm-delete {
      background: #dc2626;
      color: #fff;
    }
    .delete-confirm-delete:hover { opacity: 0.85; }

    /* ===== Download Modal ===== */
    .download-modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 460px;
      max-width: 90vw;
      padding: 24px;
      transform: translateY(10px);
      transition: transform 0.2s;
      display: flex;
      flex-direction: column;
    }
    .modal-overlay.visible .download-modal-box { transform: translateY(0); }
    .download-modal-close {
      align-self: flex-end;
      margin-bottom: 8px;
    }
    .download-tabs {
      display: flex;
      background: var(--fill-block);
      border-radius: 100px;
      margin-bottom: 20px;
      position: relative;
      padding: 4px;
    }
    .download-tabs-slider {
      position: absolute;
      top: 4px;
      bottom: 4px;
      width: calc(100% / 3 - 4px);
      background: var(--fill-general);
      border-radius: 100px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      transition: left 0.25s ease;
      left: 4px;
    }
    .download-tabs[data-active="1"] .download-tabs-slider { left: calc(100% / 3 + 0px); }
    .download-tabs[data-active="2"] .download-tabs-slider { left: calc(200% / 3 - 4px); }
    .download-tab {
      flex: 1;
      padding: 8px 0;
      border: none;
      background: transparent;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-support);
      cursor: pointer;
      font-family: inherit;
      position: relative;
      z-index: 1;
      transition: color 0.2s;
    }
    .download-tab.active {
      color: var(--text-title);
      font-weight: 600;
    }
    .download-preview {
      display: flex;
      gap: 16px;
      margin-bottom: 20px;
    }
    .download-preview-thumb {
      width: 180px;
      min-width: 180px;
      aspect-ratio: 16/9;
      border-radius: 10px;
      background: #1a1a2e;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }
    .download-preview-thumb .play-icon {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .download-preview-thumb .play-icon svg { width: 14px; height: 14px; color: #fff; margin-left: 2px; }
    .download-preview-info {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 6px;
      min-width: 0;
    }
    .download-preview-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
    }
    .download-preview-duration {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-title);
      background: var(--fill-block);
      padding: 3px 8px;
      border-radius: 4px;
      width: fit-content;
    }
    .download-preview-duration svg { width: 12px; height: 12px; }
    .download-preview-date {
      font-size: 12px;
      color: var(--text-support);
    }
    .download-advanced {
      border-top: 1px solid var(--line);
      padding-top: 16px;
      margin-bottom: 20px;
    }
    .download-advanced-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      margin-bottom: 0;
      transition: margin-bottom 0.15s;
    }
    .download-advanced.open .download-advanced-header { margin-bottom: 16px; }
    .download-advanced-label {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-title);
    }
    .download-advanced-chevron {
      width: 20px;
      height: 20px;
      color: var(--text-support);
      transition: transform 0.2s;
    }
    .download-advanced.open .download-advanced-chevron { transform: rotate(180deg); }
    .download-advanced-body {
      display: none;
      flex-direction: column;
      gap: 14px;
    }
    .download-advanced.open .download-advanced-body { display: flex; }
    .download-setting-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .download-setting-label {
      font-size: 14px;
      color: var(--text-body);
    }
    .download-setting-select {
      padding: 6px 28px 6px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 13px;
      font-family: inherit;
      color: var(--text-title);
      background: var(--fill-general);
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23818999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 8px center;
      cursor: pointer;
    }
    .download-btn-primary {
      width: 100%;
      height: 48px;
      border-radius: 100px;
      border: none;
      background: var(--button-fill);
      color: var(--button-text);
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: opacity 0.15s;
      margin-bottom: 12px;
    }
    .download-btn-primary:hover { opacity: 0.85; }
    .download-btn-primary svg { width: 16px; height: 16px; }
    .download-btn-secondary {
      width: 100%;
      height: 48px;
      border-radius: 100px;
      border: 1px solid var(--line);
      background: var(--fill-general);
      color: var(--text-title);
      font-size: 14px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background 0.15s;
    }
    .download-btn-secondary:hover { background: var(--ux-hover); }
    .download-btn-secondary svg { width: 18px; height: 18px; }

    /* ===== Dropzone drag-over state ===== */
    .add-source-dropzone.drag-over {
      border-color: var(--brand);
      background: var(--ux-primary-select);
    }

    /* ===== Modal Overlay ===== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      transition: opacity 0.15s;
    }

    .modal-overlay.visible { opacity: 1; }

    .modal-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 420px;
      max-width: 90vw;
      box-shadow: 0 24px 48px rgba(0,0,0,0.16);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: translateY(8px);
      transition: transform 0.15s;
    }

    .modal-overlay.visible .modal-box { transform: translateY(0); }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--line);
    }

    .modal-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
    }

    .modal-close {
      width: 28px;
      height: 28px;
      border: none;
      background: transparent;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-support);
    }

    .modal-close:hover { background: var(--ux-hover); color: var(--text-title); }
    .modal-close svg { width: 16px; height: 16px; }

    .modal-body { padding: 20px; }

    .modal-input {
      width: 100%;
      height: 40px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      color: var(--text-title);
      outline: none;
      transition: border-color 0.15s;
    }

    .modal-input:focus { border-color: var(--brand); }

    .modal-textarea {
      width: 100%;
      min-height: 120px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      color: var(--text-title);
      outline: none;
      resize: vertical;
      transition: border-color 0.15s;
    }

    .modal-textarea:focus { border-color: var(--brand); }

    .modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 12px 20px 16px;
    }

    .modal-btn {
      height: 36px;
      padding: 0 20px;
      border-radius: 100px;
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      border: none;
    }

    .modal-btn-secondary {
      background: var(--fill-block);
      color: var(--text-body);
    }

    .modal-btn-secondary:hover { background: var(--ux-hover); }

    .modal-btn-primary {
      background: var(--button-fill);
      color: var(--button-text);
    }

    .modal-btn-primary:hover { opacity: 0.85; }
    .modal-btn-primary:disabled { background: var(--text-disable); cursor: not-allowed; opacity: 1; }

    /* ===== Source card upload progress ===== */
    .source-progress {
      width: 100%;
      height: 3px;
      background: var(--fill-block);
      border-radius: 2px;
      overflow: hidden;
      margin-top: 4px;
    }

    .source-progress-bar {
      height: 100%;
      background: var(--brand);
      border-radius: 2px;
      width: 0%;
      transition: width 0.3s ease;
    }

    /* ===== Hidden file input ===== */
    .hidden-file-input { display: none; }

    /* ===== Source more btn + context menu ===== */
    .source-more-btn {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      border: none;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-disable);
      flex-shrink: 0;
      opacity: 0;
      transition: opacity 0.15s;
      position: relative;
    }

    .source-card:hover .source-more-btn { opacity: 1; }
    .source-more-btn.open { opacity: 1; }
    .source-more-btn:hover { background: var(--ux-hover); color: var(--text-support); }
    .source-more-btn svg { width: 14px; height: 14px; }

    .source-context-menu {
      position: absolute;
      top: 100%;
      right: 0;
      margin-top: 4px;
      background: var(--fill-general);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.12);
      min-width: 140px;
      padding: 4px;
      z-index: 100;
      display: none;
    }

    .source-context-menu.open { display: block; }

    .context-menu-item {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 7px 10px;
      border: none;
      background: transparent;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-body);
      cursor: pointer;
      font-family: inherit;
      text-align: left;
    }

    .context-menu-item:hover { background: var(--ux-hover); }

    .context-menu-item svg {
      width: 14px;
      height: 14px;
      color: var(--text-support);
      flex-shrink: 0;
    }

    .context-menu-item.danger { color: #dc2626; }
    .context-menu-item.danger svg { color: #dc2626; }
    .context-menu-item.danger:hover { background: #fef2f2; }

    /* ===== Source name clickable hint ===== */
    .source-name:hover { text-decoration: underline; }

    /* ===== Preview Modal ===== */
    .preview-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      transition: opacity 0.15s;
    }

    .preview-overlay.visible { opacity: 1; }

    .preview-box {
      background: var(--fill-general);
      border-radius: 16px;
      width: 640px;
      max-width: 90vw;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 48px rgba(0,0,0,0.2);
      overflow: hidden;
      transform: translateY(8px) scale(0.98);
      transition: transform 0.15s;
    }

    .preview-overlay.visible .preview-box { transform: translateY(0) scale(1); }

    .preview-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 20px;
      border-bottom: 1px solid var(--line);
      flex-shrink: 0;
    }

    .preview-header .source-type-icon {
      width: 36px;
      height: 36px;
    }

    .preview-header-info { flex: 1; min-width: 0; }

    .preview-header-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-title);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .preview-header-meta {
      font-size: 12px;
      color: var(--text-support);
      margin-top: 2px;
    }

    .preview-close {
      width: 32px;
      height: 32px;
      border: none;
      background: transparent;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-support);
      flex-shrink: 0;
    }

    .preview-close:hover { background: var(--ux-hover); color: var(--text-title); }
    .preview-close svg { width: 18px; height: 18px; }

    .preview-body {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
      min-height: 200px;
    }

    .preview-body::-webkit-scrollbar { width: 6px; }
    .preview-body::-webkit-scrollbar-track { background: transparent; }
    .preview-body::-webkit-scrollbar-thumb { background: var(--text-disable); border-radius: 3px; }

    /* PDF preview mock */
    .preview-pdf-page {
      background: var(--fill-block);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 32px;
      margin-bottom: 12px;
    }

    .preview-pdf-line {
      height: 10px;
      background: var(--line);
      border-radius: 4px;
      margin-bottom: 10px;
    }

    .preview-pdf-line:nth-child(odd) { width: 100%; }
    .preview-pdf-line:nth-child(even) { width: 75%; }
    .preview-pdf-line:nth-child(3n) { width: 60%; }
    .preview-pdf-line.title { height: 16px; width: 50%; margin-bottom: 20px; background: var(--text-disable); }

    /* URL preview mock */
    .preview-url-frame {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
    }

    .preview-url-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      background: var(--fill-block);
      border-bottom: 1px solid var(--line);
    }

    .preview-url-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--text-disable);
    }

    .preview-url-address {
      flex: 1;
      height: 24px;
      background: var(--fill-general);
      border-radius: 4px;
      padding: 0 8px;
      font-size: 11px;
      color: var(--text-support);
      display: flex;
      align-items: center;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .preview-url-content {
      padding: 24px;
      min-height: 200px;
    }

    /* Text preview */
    .preview-text-content {
      font-size: 14px;
      line-height: 1.7;
      color: var(--text-body);
      white-space: pre-wrap;
      word-wrap: break-word;
    }