/* ===== Scene Submission Form ===== */

.scene-form-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.scene-form-container h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #333;
  border-bottom: 3px solid #00acc1;
  padding-bottom: 10px;
}

.scene-form-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.7;
}

.scene-form-group {
  margin-bottom: 22px;
}

.scene-form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 14px;
  color: #444;
}

.scene-form-group input[type="text"],
.scene-form-group input[type="email"],
.scene-form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.scene-form-group input[type="text"]:focus,
.scene-form-group input[type="email"]:focus,
.scene-form-group select:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 2px rgba(0,172,193,.2);
}

.scene-help {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  line-height: 1.5;
}

.req-mark {
  color: #e53935;
}

/* 重複チェック通知 */
.scene-duplicate-notice {
  margin-top: 6px;
  font-size: 13px;
  color: #e65100;
  background: #fff3e0;
  border-left: 3px solid #e65100;
  padding: 6px 10px;
  border-radius: 3px;
}

/* ===== シーン行 ===== */

#scene-rows-container {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
}

.scene-row {
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.scene-row:last-child {
  margin-bottom: 0;
}

.scene-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.scene-row-label {
  font-weight: bold;
  font-size: 13px;
  color: #555;
}

.scene-remove-btn {
  background: none;
  border: 1px solid #e53935;
  color: #e53935;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
}

.scene-remove-btn:hover {
  background: #ffebee;
}

.scene-row-field {
  margin-bottom: 12px;
}

.scene-row-field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin-bottom: 5px;
}

.scene-timestamp-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.scene-timestamp-wrap select {
  width: auto;
  padding: 8px 10px;
}

.scene-ts-sep {
  font-size: 13px;
  color: #777;
}

.scene-row-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.scene-row-duplicate-notice {
  margin-top: 6px;
  font-size: 12px;
  color: #e53935;
}

/* 追加ボタン */
.scene-add-btn {
  margin-top: 10px;
  padding: 8px 18px;
  background: #e0f7fa;
  border: 1px solid #00acc1;
  color: #00838f;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.scene-add-btn:hover {
  background: #b2ebf2;
}

.scene-add-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 注意事項 */
.scene-notices {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.scene-notices h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #444;
}

.scene-notices ul {
  margin: 0;
  padding-left: 18px;
}

.scene-notices li {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  line-height: 1.5;
}

/* 同意チェック */
.scene-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.scene-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* 送信ボタン */
.scene-form-actions {
  text-align: center;
  margin-top: 10px;
}

.scene-submit-btn {
  padding: 12px 48px;
  background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
  color: #fff;
  border: none;
  border-radius: 60px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 #005662;
}

.scene-submit-btn:hover {
  opacity: .9;
}

.scene-submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.scene-loading {
  display: inline-block;
  margin-left: 12px;
  font-size: 14px;
  color: #888;
}

/* メッセージ */
.scene-form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
}

.scene-form-message.success {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  color: #2e7d32;
}

.scene-form-message.error {
  background: #ffebee;
  border-left: 4px solid #e53935;
  color: #b71c1c;
}

/* ===== Scene Database Page ===== */

.scene-db-container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 16px;
}

.scene-db-title {
  font-size: 22px;
  margin-bottom: 10px;
  color: #333;
  border-bottom: 3px solid #00acc1;
  padding-bottom: 10px;
}

.scene-db-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 18px;
  line-height: 1.7;
}

/* バッジ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
}

.badge-reviewed {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #90caf9;
}

.badge-verified {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.badge-reader {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
}

/* フィルター */
.scene-db-filters {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-db-filters select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.scene-db-count {
  font-size: 13px;
  color: #777;
}

/* テーブル */
.scene-db-table-wrap {
  overflow-x: auto;
}

.scene-db-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* 列幅 */
.scene-db-table th:nth-child(1) { width: 43%; } /* 作品タイトル */
.scene-db-table th:nth-child(2) { width: 10%; } /* 女優名 */
.scene-db-table th:nth-child(3) { width:  8%; } /* タイムスタンプ */
.scene-db-table th:nth-child(4) { width: 11%; } /* カテゴリ */
.scene-db-table th:nth-child(5) { width: 15%; } /* ステータス */
.scene-db-table th:nth-child(6) { width: 13%; } /* 投稿者 */

.scene-db-table tbody td {
  font-size: 11px !important;
  word-break: break-word;
}

/* タイトル列は長い場合に省略 */
.scene-db-table tbody td:nth-child(1) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-db-table th,
.scene-db-table td {
  padding: 9px 10px;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
}

.scene-db-table thead th {
  background: #f5f5f5;
  font-weight: bold;
  color: #444;
  white-space: nowrap;
}

.scene-db-table tbody tr:hover {
  background: #fafafa;
}

.scene-db-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.scene-db-table th.sortable:hover {
  background: #eeeeee;
}

.sort-icon {
  font-size: 10px;
  color: #aaa;
  margin-left: 2px;
}

.scene-db-table a {
  color: #00838f;
  text-decoration: none;
}

.scene-db-table a:hover {
  text-decoration: underline;
}

.scene-db-table code {
  background: #f5f5f5;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}

.scene-first-badge {
  font-size: 14px;
  margin-left: 4px;
  vertical-align: middle;
  cursor: help;
}

.scene-db-empty {
  text-align: center;
  color: #888;
  padding: 40px 0;
  font-size: 15px;
}

/* 非表示クラス（フィルター・ページネーション共用） */
.scene-filter-hidden,
.scene-page-hidden { display: none !important; }

/* ページネーション */
.scene-db-pager {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.scene-pager-info {
  font-size: 12px;
  color: #777;
  margin-right: 6px;
}

.scene-page-btn {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  color: #444;
  cursor: pointer;
  font-size: 12px;
}

.scene-page-btn:hover {
  background: #f0f0f0;
}

.scene-page-btn.active {
  background: #00acc1;
  color: #fff;
  border-color: #00acc1;
  font-weight: bold;
}

.scene-db-cta {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #555;
}

.scene-db-cta a {
  color: #00838f;
  font-weight: bold;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .scene-form-container {
    padding: 20px 16px;
  }
  .scene-timestamp-wrap {
    gap: 4px;
  }
  .scene-db-filters {
    flex-direction: column;
    align-items: flex-start;
  }
}
