/* カラーテーマ用のCSS変数 (デフォルト: Dark) */
:root {
  /* 基本色 */
  --color-bg-primary: #171717;
  --color-bg-secondary: #202020;
  --color-bg-tertiary: #303030;
  --color-bg-quaternary: #404040;

  /* テキスト色 */
  --color-text-primary: #ffffff;
  --color-text-secondary: #e5e5e5;
  --color-text-tertiary: #d2d2d2;
  --color-text-muted: #a0a0a0;

  /* ボーダー色 */
  --color-border-primary: #505050;
  --color-border-secondary: #606060;

  /* アクセント色 */
  --color-accent-primary: #00c7ff;
  --color-accent-secondary: #0099cc;
  --color-accent-hover: #33d1ff;
  --color-button-primary: #00c7ff;

  /* 選択・アクティブ色 */
  --color-selection: #666666;
  --color-selection-hover: #838383;

  /* エディタ専用の色（Monaco Editorなどで使用） */
  --color-editor-bg: #1e1e1e;
  --color-editor-fg: #d4d4d4;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  /*font-family: 'M PLUS 1p', sans-serif;*/
  /*font-family: 'Shippori Antique', sans-serif;*/
}

#preview-window {
  background-color: var(--color-bg-primary);
  position: relative;
  width: 100%;
  height: 100%;
}

#python-image {
  /* margin:auto; */
  position: absolute;
  top: calc(50% - 20px);
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%; /* 必要に応じて画像サイズを調整 */
  max-height: calc(100% - 70px); /* ナビゲーションボタンのスペースを確保 */
}

a {
  text-decoration: none !important;
  color: var(--color-accent-primary);
}

a:hover {
  color: var(--color-accent-hover);
}

.file-item {
  cursor: pointer;
  text-decoration: none !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

i.fa-lock,
i.fa-eye {
  margin-right: 5px;
}

.icon-font {
  /* font-size: 14px; */
}

.menu-button {
  width: 40px;
  padding: 0 !important;
  line-height: 24px !important;
  font-size: 13px !important;
}

div.tab-container {
  padding: 0 !important;
}

/* ドラッグ中のタブのスタイル */
.dragging {
  opacity: 0.5;
  /* border: 2px dashed #555; */
}

/* ドロップ先のインジケータスタイル */
.drag-over {
  opacity: 0.5;
  /* border-left: 4px solid #007bff; */
  /* background-color: #00c7ff !important; */
}

.full-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(100, 100, 100, 0.1);
  z-index: 2147483647;
}

#draganddrop-wrapper {
  font-size: 35px;
  text-align: center;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  /*opacity: 0.8;*/
  display: none;
  z-index: 2147483647;
}

#loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 100px;
  height: 100px;
}

#side-menu li {
  margin: 0 !important;
}

#side-menu li a i {
  width: 0.8rem;
}

/*#side-menu a {*/
/*  line-height: 1rem;*/
/*}*/

#main-content {
  width: 100%;
  height: 100vh;
  display: flex;
  background-color: var(--color-bg-tertiary);
}

.h-pane {
  box-sizing: border-box;
  background-color: #f4f4f4;
}

#file-selector,
#file-selector-fix {
  /*display:inline-block;*/
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-secondary);
}

#file-selector {
  caret-color: transparent;
  /* width: 15%; */
  /* overflow-x: auto; 横方向のスクロールを許可 */
  /*white-space: nowrap;  テキストや要素が折り返されず、スクロール可能になる */
}

#main-editor {
  width: 50%;
  background-color: var(--color-bg-primary);
  height: calc(100vh - 41px);
  /* padding-bottom: 540px; */
  /* height: 100%; */
}

/* #main-editor, */
#right-window {
  caret-color: transparent;
  width: 35%;
  background-color: white;
  height: calc(100vh);
  /* padding-bottom: 40px; */
}

.h-splitter {
  width: 0px;
  background-color: #838383;
  cursor: col-resize;
  transition: background-color 0.2s;
}

.gutter {
  z-index: 10;
  transition: background-color 0.2s ease;
  transition-delay: 0.1s;
}

.h-splitter:hover,
.gutter:hover {
  /* background-color: rgb(64, 68, 181); */
  background-color: var(--color-accent-secondary);
}

#editor-tab,
#preview-tab,
#console-tab {
  padding-bottom: 0px;
}

/* #preview-tab {
  padding-bottom: 0px;
} */

#result-tab {
  padding-bottom: 0px;
}

#editor-tab,
#preview-tab,
#console-tab {
  min-height: 40px;
  background: var(--color-bg-secondary);
  font-size: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

#file-selector::-webkit-scrollbar,
#file-window::-webkit-scrollbar,
#enshu-window::-webkit-scrollbar,
#enshu-sentences::-webkit-scrollbar,
#file-selector-fix::-webkit-scrollbar {
  width: 3px;
}

#console-textarea::-webkit-scrollbar,
#console-ai::-webkit-scrollbar,
#console-settings::-webkit-scrollbar {
  width: 5px;
}

#file-selector::-webkit-scrollbar-track,
#file-window::-webkit-scrollbar-track,
#enshu-window::-webkit-scrollbar-track,
#enshu-sentences::-webkit-scrollbar-track,
#file-selector-fix::-webkit-scrollbar-track,
#console-textarea::-webkit-scrollbar-track,
#console-ai::-webkit-scrollbar-track,
#console-settings::-webkit-scrollbar-track {
  background-color: #bfbfbf;
}

#file-selector::-webkit-scrollbar-thumb,
#file-window::-webkit-scrollbar-thumb,
#enshu-window::-webkit-scrollbar-thumb,
#enshu-sentences::-webkit-scrollbar-thumb,
#file-selector-fix::-webkit-scrollbar-thumb,
#console-textarea::-webkit-scrollbar-thumb,
#console-ai::-webkit-scrollbar-thumb,
#console-settings::-webkit-scrollbar-thumb {
  background-color: #838383;
}

#editor-tab::-webkit-scrollbar,
#preview-tab::-webkit-scrollbar,
#console-tab::-webkit-scrollbar,
.console-code::-webkit-scrollbar {
  height: 3px;
}

#editor-tab::-webkit-scrollbar-track,
#preview-tab::-webkit-scrollbar-track,
#console-tab::-webkit-scrollbar-track,
.console-code::-webkit-scrollbar-track {
  background-color: #a0a0a0;
  /*background-color: rgba(196, 196, 196, 0);*/
}

#editor-tab::-webkit-scrollbar-thumb,
#preview-tab::-webkit-scrollbar-thumb,
#console-tab::-webkit-scrollbar-thumb,
.console-code::-webkit-scrollbar-thumb {
  background-color: #606060;
  /*background-color: rgba(95, 95, 95, 0);*/
}

#editor-tab div,
#preview-tab div {
  display: inline-block;
  padding: 10px 5px 5px 8px;
  color: var(--color-text-muted);
  background: var(--color-editor-bg);
  overscroll-behavior: none;
  cursor: pointer;
  user-select: none;
}

#console-tab div {
  display: inline-block;
  padding: 10px 10px 5px 8px;
  color: var(--color-text-muted);
  background: var(--color-editor-bg);
  overscroll-behavior: none;
  cursor: pointer;
  user-select: none;
}

#editor-tab .selected-file,
#preview-tab .vselected-file,
#console-tab .cselected-file {
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  box-shadow: inset 0px -3px 0px 0px var(--color-accent-primary);
  /* padding-bottom: 5px; */
}

/* 選択されたタブのホバー時も同じ色を保つ */
#editor-tab .selected-file:hover,
#preview-tab .vselected-file:hover,
#console-tab .cselected-file:hover {
  color: var(--color-text-secondary) !important;
  background: var(--color-bg-tertiary) !important;
}

/* 非選択タブの背景色 */
#console-tab .tab-back:not(.cselected-file),
#editor-tab .tab-back:not(.selected-file),
#preview-tab .vtab-back:not(.vselected-file) {
  background-color: var(--color-editor-bg) !important;
  color: var(--color-text-muted) !important;
}

#console-tab .code-description,
#console-tab .code-check {
  vertical-align: top;
  padding: 6px 12px;
  font-size: 13px;
  margin-left: 0.5em;
  margin-top: 4px;
  color: white;
  border-radius: 15px;
}

#console-tab .code-description {
  background-color: #21845f;
}

#console-tab .code-description:hover {
  background-color: #48ab86;
  box-shadow: inset 0px -2px 0px 0px #18523d;
  box-sizing: border-box;
}

#console-tab .code-check {
  background-color: #4b49c0;
}

#console-tab .code-check:hover {
  background-color: #7675c8;
  box-shadow: inset 0px -2px 0px 0px #282678;
  box-sizing: border-box;
}

/* #editor-tab .selected-file .scrollbar-shown {
  box-shadow: inset 0px -5px 0px 0px #00c7ff !important;
} */
#file-selector img {
  margin: 0 5px 0px 2px;
}
#editor-tab img,
#preview-tab img,
#console-tab img,
#console-tab i {
  margin: 0 5px 3px 0;
  width: 18px;
  height: 18px;
}

#editor-tab div:hover,
#preview-tab div:hover,
#console-tab div:hover {
  /*filter: brightness(150%);*/
  /*color: #e5e5e5;*/
  background: #4f4f4f;
  box-shadow: inset 0px -3px 0px 0px #00c7ff;
  /*border-bottom: 5px solid #00c7ff;*/
  box-sizing: border-box;
}

#result-tab {
  padding-right: 10px !important;
}

#result-panel,
#preview-window {
  width: 100%;
  /* height: 100%; */
  height: calc(100% - 36px);
  /* height: calc(100vh - 40px); */
  /*background: #303030;*/
}

#view-editor-container {
  width: 100%;
  /* height: 100%; */
  height: calc(100% - 40px);
}

.closeButton {
  color: #666666;
  font-size: 16px;
  width: 18px;
  height: 18px;
  background: rgba(255, 85, 114, 0);
  padding: 1px;
  margin: 0 5px;
  border: none;
  border-radius: 50%;
}

.closeButton i:nth-child(2) {
  display: none;
}

.closeButton:hover i:nth-child(1) {
  display: none;
}

.closeButton:hover i:nth-child(2) {
  display: block;
}

.closeButton:hover {
  color: black;
  background: rgba(255, 85, 114, 1);
  padding: 1px;
  border: none;
  border-radius: 40%;
  cursor: pointer;
}

.reloadButton {
  color: var(--color-text-muted);
  font-size: 16px;
  width: 18px;
  height: 18px;
  background: transparent;
  padding: 1px;
  margin: 0 1px 0 5px;
  border: none;
  border-radius: 50%;
}

.reloadButton:hover {
  color: var(--color-accent-primary);
  padding: 1px;
  border: none;
  border-radius: 40%;
  cursor: pointer;
}

.header-icon-button {
  color: var(--color-text-secondary);
  font-size: 16px;
  width: 28px;
  height: 28px;
  background: rgba(100, 100, 100, 0.2);
  padding: 6px;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.header-icon-button:hover {
  color: var(--color-text-primary);
  background: rgba(100, 100, 100, 0.4);
  cursor: pointer;
}

/* アバターアイコン用のホバーエフェクト */
.header-icon-button.avatar-button {
  transition: all 0.3s ease;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}

.header-icon-button.avatar-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  background: rgba(100, 100, 100, 0.5);
}

/* アバタードロップダウンを右側に固定 */
#avatar-dropdown.uk-dropdown {
  left: auto !important;
  /* right: 0 !important; */
  transform-origin: top right !important;
}

.address-button {
  color: #a0a0a0;
  font-size: 16px;
  margin: 5px !important;
  width: 18px;
  height: 18px;
  background: rgba(255, 85, 114, 0);
  padding: 1px;
  margin: 0 1px 0 5px;
  border: none;
  border-radius: 50%;
}

.address-button:hover {
  color: rgba(255, 85, 114, 1);
  padding: 1px;
  border: none;
  border-radius: 40%;
  cursor: pointer;
}

.split {
  display: flex;
  flex-direction: row;
}

.split-v {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.content {
  display: flex;
  width: 100%;
  height: 100vh;
}

.content-v {
  /* border: 1px solid #C0C0C0; */
  /* box-shadow: inset 0 1px 2px #e4e4e4; */
  /* background-color: #fff; */
}

.gutter {
  /*background-color: #eee;*/
  /* background-color: #676767; */
  background-color: var(--color-border-primary);
  background-repeat: no-repeat;
  background-position: 50%;
}

.gutter.gutter-horizontal {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==");
  cursor: col-resize;
}

.gutter.gutter-vertical {
  cursor: row-resize;
}

.splitpanes__pane {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Helvetica, Arial, sans-serif;
  color: rgba(255, 255, 255, 0.6);
  font-size: 5em;
}

/* #file-selector {
  width: 250px;
  margin: 0;
}

#file-selector-fix {
  width: 260px;
  margin: 0;
} */

#file-selector li,
#file-selector-fix li {
  /*margin-left: 5px;*/
  /* margin-right: 5px; */
  margin-top: 5px !important;
}

#file-selector span,
#file-selector-fix span {
  margin-left: 3px;
  display: inline-block;
  width: 25px;
}

#file-selector .uk-accordion-title:hover,
#file-selector-fix .uk-accordion-title:hover {
  color: var(--color-accent-primary);
}

#file-selector::-webkit-scrollbar {
  height: 8px;
}

#enshu-header,
#enshu-sentences {
  min-width: 150px;
}

#file-window,
#enshu-window {
  overflow-x: auto;
  background-color: var(--color-bg-secondary);
}

#file-window::-webkit-scrollbar,
#enshu-window::-webkit-scrollbar {
  height: 3px;
}

.uk-accordion-title {
  /*margin: 0;*/
  font-size: 12px;
  line-height: 1.1em;
  color: var(--color-text-secondary);
}

.uk-accordion-title i {
  margin: 0 4px 6px 6px;
}

.uk-accordion-content {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-secondary) !important;
}

.uk-button {
  border: dimgray 1px solid !important;
}

.uk-checkbox {
  margin-top: 0;
  margin-right: 5px;
}

#header {
  font-size: 18px;
  height: 40px;
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  /*font-weight: bold;*/
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.button-area {
  flex-shrink: 0;
  text-align: center;
  padding: 5px 0;
  /* box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15); */
  z-index: 10;
  transition: box-shadow 0.2s ease;
  /* background-color: #202020; */
}

.button-area.shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#enshu-header {
  z-index: 1000;
  box-shadow: 0 2px 8px rgb(255, 255, 255);
}

.theme-dark {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
}

.theme-dark a {
  color: var(--color-text-primary);
}

.theme-dark a:hover {
  /*color: #c3c3c3;*/
}

.dir-back {
  margin: 0px;
  padding: 1px 0px 0px 10px;
  background-color: var(--color-bg-tertiary);
}

.ac-back,
.setting-back {
  background: var(--color-bg-tertiary);
  width: 100%;
  padding: 4px 0 5px 13px;
  box-sizing: border-box;
}

.ac-back-sub {
  background: var(--color-bg-quaternary);
  /* width: 100%; */
  padding: 4px 0 5px 7px;
  margin-left: 8px;
  border-left: 1.5px dotted #888;
  box-sizing: border-box;
}

.ac-back:hover,
.ac-back-sub:hover,
.selected-file,
.vselected-file {
  background: var(--color-selection);
}

.file-clicked {
  background: var(--color-selection-hover);
}

.keyboard-key {
  padding: 1px 10px 4px;
  margin: 0 11px;
  border-radius: 5px;
  box-shadow: 0px 1px 2px 1px rgba(0, 0, 0, 0.5);
}

#console-textarea {
  font-size: 12px;
  width: 100%;
  height: calc(100% - 30px);
  box-sizing: border-box;
  resize: none;
  color: var(--color-text-secondary);
  /* background-color: var(--color-editor-bg); */
  /* padding: 8px; */
  padding-bottom: 20px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: sans-serif;
}

#console-ai {
  font-size: 12px;
  width: 100%;
  height: calc(100% - 22px);
  box-sizing: border-box;
  resize: none;
  background-color: var(--color-bg-primary);
  padding: 0px;
  overflow-y: auto;
  font-family: sans-serif;
  padding-bottom: 10px;
}

#console-settings {
  font-size: 12px;
  width: 100%;
  height: calc(100% - 22px);
  box-sizing: border-box;
  resize: none;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-tertiary);
  padding: 0px;
  overflow-y: auto;
  font-family: sans-serif;
  padding-bottom: 10px;
}

#enshu-sentences {
  font-size: 12px;
  width: 100%;
  height: calc(100% - 33px);
  box-sizing: border-box;
  resize: none;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-tertiary);
  padding: 0px;
  overflow-y: auto;
  font-family: sans-serif;
}

.console-dom {
  font-family: "Source Code Pro", monospace;

  margin: 0;
  padding: 3px 5px;
  /* line-height: 1.3em; */
  /* margin-bottom: 5px; */
  /* border-bottom: var(--color-border-primary) 1px solid; */
  /* background-color: #092518; */
}

.error-dom {
  background-color: #250c0c;
  color: rgb(252, 189, 189);

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-error-dom {
  background-color: #c15861;
  color: #fff3f3;
  line-height: 1.5em;
  font-family: "Noto Sans JP", sans-serif;
  padding-top: 5px;
  padding-bottom: 10px;
}

.ai-code-dom {
  line-height: 1.5em;
  font-family: "Noto Sans JP", sans-serif;
  background-color: #21845f;
  /* background-color: #1f1e4b; */
  color: rgb(242, 252, 245);
  padding-top: 5px;
  padding-bottom: 10px;
}

#image-gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.image-nav-btn {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-primary);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  min-width: 80px;
}

.image-nav-btn:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-secondary);
}

.image-nav-btn:active {
  transform: scale(0.98);
}

.image-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#image-page-info {
  color: var(--color-text-secondary);
  font-size: 14px;
  font-family: "Source Code Pro", monospace;
  min-width: 60px;
  text-align: center;
}

.ai-check-dom {
  line-height: 1.5em;
  font-family: "Noto Sans JP", sans-serif;
  background-color: #4b49c0;
  /* background-color: #1f1e4b; */
  color: rgb(246, 243, 255);
  padding-top: 5px;
  padding-bottom: 10px;
}

.ai-enshu-dom {
  line-height: 1.5em;
  font-family: "Noto Sans JP", sans-serif;
  background-color: #825a49;
  color: rgb(255, 250, 240);
  padding-top: 5px;
  padding-bottom: 10px;
}

.ai-dom-reaction {
  text-align: center;
  margin: 8px 8px 3px;
}

/* チャットメッセージの全体レイアウト */
.chat-message {
  display: flex;
  align-items: flex-start;
  margin: 10px;
  gap: 10px;
}

/* ちくわ君のメッセージ（左寄せに変更） */
/* .chat-message-right {
  flex-direction: row-reverse;
} */

/* キャラクター画像 */
.character-avatar {
  flex-shrink: 0;
}

.character-avatar img.character-image {
  width: 40px;
  height: 40px;
  /* border-radius: 50%; */ /* 円形トリミングを削除 */
  object-fit: cover;
}

/* 吹き出しスタイル */
.speech-bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
  flex: 1;
}

/* はんぺん君の吹き出し（左側） */
.speech-bubble-hanpen {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* はんぺん君の吹き出しの三角（左側） */
.speech-bubble-hanpen::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 8px 0;
  border-color: transparent rgba(255, 255, 255, 0.15) transparent transparent;
}

/* ちくわ君の吹き出し（左側に変更） */
.speech-bubble-chikuwa {
  background-color: rgba(100, 200, 255, 0.2);
  color: #ffffff;
}

/* ちくわ君の吹き出しの三角（左側に変更） */
.speech-bubble-chikuwa::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 8px 0;
  border-color: transparent rgba(100, 200, 255, 0.2) transparent transparent;
}

.console-link {
  color: var(--color-accent-primary);
}

.console-link:hover {
  color: var(--color-accent-hover);
}

pre.console-code {
  line-height: 1.3em;
  font-size: inherit;
  border-radius: 5px;
  border: 1px solid #888;
  background-color: #222;
  margin: 0;
  padding: 8px;
}

code.code-block {
  font-size: inherit;
  border-radius: 5px;
  font-family: "Source Code Pro", monospace;
  color: white;
  background-color: #222;
}

code.incline-code {
  font-size: inherit;
  border-radius: 4px;
  font-family: "Source Code Pro", monospace;
  color: white;
  background-color: #ffffff52;
  padding: 0px 0.2em 1px;
  margin: 0 0.2em;
}

/*.a-dark {*/
/*  color: white;*/
/*}*/

#enshuText {
  display: none;
  text-align: left !important;
  font-size: 13px;
  background-color: rgb(85, 85, 85);
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 5px;
  margin: 5px;
}

.enshu-box {
  background-color: rgb(90, 90, 90);
}

.enshu-textbox {
  text-indent: 1em;
  text-align: left;
  font-size: 12px;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-primary);
  /* text-align: center; */
  border-radius: 5px;
  padding: 5px;
  margin: 5px 5px 10px;
}

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid #cccccc;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  margin-right: 5px;
  position: relative;
  padding: 0;
}
input[type="radio"]:checked {
  border-color: #a8fffb;
}
input[type="radio"]:checked::before {
  content: "";
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  background: #a8fffb;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
}
label {
  display: inline-flex;
  align-items: center;
}

.enshu-button {
  background-color: #2b2b2b;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.2em;
  padding: 0.5em 0.3em;
  margin: 0.3em 5px 0;
  width: 100%;
}

.enshu-button:hover {
  background-color: #474747;
  color: #ffffff;
}

span.score {
  font-size: 11px;
}

.enshu-check {
  color: rgb(159, 255, 171);
}

.enshu-working {
  color: rgb(183, 188, 255);
}

.enshu-ellipsis {
  color: rgb(150, 150, 150);
}

.enshu-crown {
  color: var(--color-text-ranking);
}

.modal-crown {
  color: rgb(255, 205, 66);
}

.enshu-target {
  text-align: right;
}

.report-check {
  font-size: 18px;
  color: rgb(30, 148, 75);
}

.report-td,
.report-th {
  padding: 5px 10px !important;
}

.report-td {
  font-size: 13px;
}

td.score-top3 {
  /* background-color: hsl(54, 96%, 80%); */
  background-color: #fff7b0;
}

.uk-table td,
.uk-table th {
  padding: 8px 2px;
}

.stddev {
  font-size: 13px;
}

#btn-report {
  max-width: 100%;
  margin: 0.5em;
  padding: 0.5em 1em;
  line-height: 2em;
}

.report-problem {
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid gray;
  padding: 10px;
}

/* コンテキストメニュー */
.tippy-content {
  border-radius: 5px;
  border: 1px solid gray;
  padding: 5px;
}

.context-menu-item {
  display: block;
  min-width: 150px;
  max-width: 170px;
  padding: 2px 10px;
  cursor: pointer;
  color: white;
  line-height: 2em;
}

.context-menu-icon {
  width: 20px;
  text-align: center;
  margin-right: 3px !important;
}

.context-menu-item:hover {
  color: white;
  padding: 2px 10px;
  border-radius: 5px;
  background-color: rgb(49, 82, 142);
}

.uk-modal-dialog,
.uk-modal-header,
.uk-modal-footer {
  caret-color: transparent;
  transition-duration: 0.2s;
  border-radius: 10px;
}

/* モーダルの入力フィールドとセレクトボックスのみにスタイルを適用 */
input.modal-input-corner,
select.modal-input-corner {
  border-radius: 5px;
  background-color: #ffffff !important;
  color: #333 !important;
  border: 2px solid #e0e0e0 !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input.modal-input-corner:focus,
select.modal-input-corner:focus {
  outline: none !important;
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  background-color: #ffffff !important;
  caret-color: #667eea;
}

input.modal-input-corner::placeholder {
  color: #999 !important;
  opacity: 0.7;
}

/* モーダルボタンのスタイル（元に戻す） */
button.modal-input-corner {
  border-radius: 5px;
}

.selecting-file {
  background-color: rgb(118, 114, 202) !important;
  /* background-color: 2px solid rgb(71, 71, 71); */
}

#address-input {
  margin: 0 5px;
  border-radius: 8px;
  padding-left: 6px;
  background-color: #cbcbcb;
  outline: none;
}

#default-preview-tab {
  padding-right: 10px !important;
}

.tab-back,
.vtab-back {
  outline: 1px solid var(--color-border-primary);
  background-color: var(--color-editor-bg);
  color: var(--color-text-muted);
}

.character-image {
  width: 35px;
  height: 35px;
  vertical-align: bottom;
}

.console-clear-button {
  color: var(--color-text-muted);
  font-size: 16px;
  width: 20px;
  /* height: 18px; */
  background: transparent;
  padding: 1px;
  margin: 0 0 0 5px;
  border: none;
  border-radius: 50%;
}

.console-clear-button:hover {
  color: var(--color-accent-primary);
  padding: 1px;
  border: none;
  border-radius: 40%;
  cursor: pointer;
}

.console-ai-button {
  color: var(--color-text-muted);
  font-size: 16px;
  width: 20px;
  /* height: 18px; */
  background: transparent;
  padding: 1px;
  margin: 0 5px 0 2px;
  border: none;
  border-radius: 50%;
}

.console-ai-button:hover {
  color: var(--color-accent-primary);
  padding: 1px;
  border: none;
  border-radius: 40%;
  cursor: pointer;
}

details {
  font-size: 15px;
  margin: 0px;
  padding: 4px 10px;
  border: 2px solid #c3c3c3;
}

details > summary {
  font-weight: bold;
  cursor: pointer;
}

details > p {
  padding: 10px 5px;
  margin: 0;
}

.reaction-button {
  text-align: center;
  color: rgb(206, 206, 206);
  font-size: 16px;
  width: 18px;
  height: 18px;
  background: rgba(255, 85, 114, 0);
  padding: 1px;
  margin: 0 1px 0 5px;
  border: none;
  border-radius: 50%;
}

.reaction-button:hover {
  color: rgba(255, 85, 114, 1);
  padding: 1px;
  border: none;
  border-radius: 40%;
  cursor: pointer;
}

.table-shortcut td {
  padding: 15px 12px;
}

/* 講義資料のオーバーレイ */
.iframe-overlay {
  position: fixed;
  top: 0;
  right: -960px; /* 初期状態では画面外に */
  width: 600px;
  height: 100%;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  transition: right 0.5s ease;
  z-index: 1000;
}

.iframe-overlay.open {
  right: 0;
}

.iframe-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  background-color: rgb(103, 107, 219);
  opacity: 0;
  transition: opacity 0.3s;
}

.iframe-overlay:hover {
}

.resize-handle:hover,
.resize-handle:active {
  opacity: 1;
}

.iframe-toggle-button {
  position: fixed;
  top: 4px;
  right: 12px;
  z-index: 1001;
  padding: 7px 12px;
  min-width: 48px;
  background-color: #e45b5b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.iframe-toggle-button:hover {
  background-color: #ee8181;
}

.iframe-blocker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10; /* iframeより上に配置 */
  cursor: ew-resize;
}

#lecture-iframe {
  border-left: 3px solid #937357 !important;
}

.file-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding-right: 30px; /* ロックアイコンのスペース確保 */
}

.file-content {
  display: flex;
  align-items: center;
  flex: 1;
}

.lock-icon {
  position: absolute;
  right: 0px;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  border-radius: 3px;
  transition: background-color 0.2s;
  z-index: 10;
  opacity: 0.3; /* 半透明にする */
}

.lock-icon:hover {
  /* background-color: rgba(0, 0, 0, 0.1); */
  opacity: 0.8; /* ホバー時は不透明にする */
}

.lock-icon.locked {
  padding-right: 4px;
  opacity: 1;
}

.file-container.locked .file-content {
  opacity: 1;
  pointer-events: none;
}

.file-container.locked {
  /* background-color: rgba(255, 0, 0, 0.1); */
  background-color: #4d2f2f;
}
.file-container.locked:hover,
.file-container.locked.selected-file {
  background-color: #6b4646;
}

/* UIKitボタンのカラーカスタマイズ */
.uk-button-primary {
  background-color: var(--color-button-primary) !important;
  border-color: var(--color-button-primary) !important;
}

.uk-button-primary:hover {
  background-color: var(--color-accent-hover) !important;
  border-color: var(--color-accent-hover) !important;
}

.uk-button-secondary {
  background-color: var(--color-bg-quaternary) !important;
  color: var(--color-text-secondary) !important;
  border-color: var(--color-border-secondary) !important;
}

.uk-button-secondary:hover {
  background-color: var(--color-selection) !important;
  color: var(--color-text-primary) !important;
}

/* コンソールとリザルトウィンドウの背景 */
#console-window,
#result-window {
  background-color: var(--color-bg-primary);
}

/* カラーテーマトグルボタン */
.color-theme-btn {
  background-color: var(--color-bg-quaternary);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.color-theme-btn:hover {
  background-color: var(--color-selection);
}

.color-theme-btn.active {
  background-color: var(--color-accent-secondary) !important;
  color: var(--color-text-primary) !important;
  font-weight: bold;
}

/* パネル折り畳みボタン */
.panel-toggle-button {
  position: absolute;
  bottom: 10px;
  width: 32px;
  height: 32px;
  background-color: var(--color-bg-quaternary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: 4px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.panel-toggle-button:hover {
  background-color: var(--color-selection);
  color: var(--color-text-primary);
}

.panel-toggle-left {
  left: 10px;
}

.panel-toggle-right {
  right: 10px;
}
