/* ============================================================
   chotto.ai patch.css v3 — 実際のDOM構造に基づく修正版
   確認済みクラス名: semi-layout-header, semi-layout-footer,
   div.text-sm.flex-shrink-0, bg-gray-100.flex.items-center
   ============================================================ */

/* 1. ナビゲーションバー — 半透明ダークに変更
   実際のクラス: semi-layout-header
   現在のスタイル: background: rgba(0,0,0,0) = 透明, color: rgb(28,31,35) = 黒
*/
.semi-layout-header {
  background: rgba(10, 10, 30, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(139, 92, 246, 0.25) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.semi-layout-header *,
.semi-layout-header a,
.semi-layout-header span,
.semi-layout-header button:not([class*="primary"]) {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Semi UI ナビゲーションアイテム */
.semi-navigation-item-text,
.semi-navigation-item .semi-navigation-item-text {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* 2. フッターの "New API" 開発元表示を非表示
   実際のクラス: div.text-sm.flex-shrink-0 (New APIリンクの親)
   ターゲット: a[href*="QuantumNous"] とその親
*/
a[href*="QuantumNous"],
a[href*="github.com/QuantumNous"],
a[href*="new-api"] {
  display: none !important;
}

div.text-sm.flex-shrink-0:has(a[href*="QuantumNous"]),
div.text-sm.flex-shrink-0:has(a[href*="new-api"]) {
  display: none !important;
}

/* フォールバック: "開発元" テキストを含む要素 */
.semi-layout-footer .text-sm {
  display: none !important;
}

/* 3. ログイン/登録ページ — ダークグラデーション背景
   実際のクラス: .bg-gray-100.flex.items-center.justify-center.py-12
*/
.bg-gray-100.flex.items-center.justify-center.py-12 {
  background: linear-gradient(135deg, #0f0c29 0%, #1a1a4e 50%, #24243e 100%) !important;
  min-height: 100vh !important;
}

/* ログインカード */
.bg-gray-100.flex.items-center.justify-center.py-12 > div {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
}

/* ログインページのテキストを白に */
.bg-gray-100.flex.items-center.justify-center.py-12 h1,
.bg-gray-100.flex.items-center.justify-center.py-12 h2,
.bg-gray-100.flex.items-center.justify-center.py-12 p,
.bg-gray-100.flex.items-center.justify-center.py-12 label {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* 4. モデルマーケットプレイス・チャンネル管理メニューを非表示 */
a[href="/models"],
a[href="/channel"] {
  display: none !important;
}

/* Semi UI のナビゲーションアイテム（href属性で特定） */
.semi-navigation-item[data-testid*="models"],
.semi-navigation-item[data-testid*="channel"] {
  display: none !important;
}

/* ============================================================
   モバイル端末対応 — コードブロック横スクロール + コピーボタン
   ============================================================ */
pre, code, .semi-codeblock, [class*="code-block"] {
  overflow-x: auto !important;
  white-space: pre !important;
  -webkit-overflow-scrolling: touch;
  max-width: 100% !important;
  word-break: normal !important;
}
pre { position: relative !important; padding-top: 2.2em !important; }
.chotto-copy-btn {
  position: absolute; top: 6px; right: 8px;
  padding: 2px 8px; font-size: 11px; cursor: pointer;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px; color: rgba(255,255,255,0.85); user-select: none; z-index: 10;
}
.chotto-copy-btn:hover { background: rgba(255,255,255,0.25); }
.chotto-copy-btn.copied { color: #4ade80; border-color: #4ade80; }
