/* ============================================
   未明シアター — LP アップロードページ専用CSS
   ============================================ */

:root {
  --green: #4ec994;
  --red:   #e05555;
}

/* ===== HEADER LINK BTN ===== */
.header-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--accent), var(--gold-light, #e8c97e));
  border-radius: 50px;
  color: #0a0a0a;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(200,169,110,0.3);
}
.header-link-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,169,110,0.45); }

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.03em;
}

.tab-btn:hover { background: var(--surface2); color: var(--text); }

.tab-btn.active {
  background: linear-gradient(135deg, rgba(200,169,110,0.2), rgba(155,89,182,0.15));
  color: var(--accent);
  border: 1px solid rgba(200,169,110,0.3);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent);
  border-radius: 10px;
  color: #0a0a0a;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ===== TAB PANELS ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== DROP ZONE ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(200,169,110,0.05);
}

.drop-zone-inner {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drop-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.drop-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-sub);
}

.drop-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.drop-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.drop-select-btn {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.85rem;
  padding: 4px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.drop-select-btn:hover { background: var(--accent); color: #0a0a0a; }

.drop-zone-loaded {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
}

.drop-loaded-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.drop-loaded-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.drop-clear-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  padding: 5px 14px;
  cursor: pointer;
  margin-top: 4px;
  transition: var(--transition);
}
.drop-clear-btn:hover { border-color: var(--red); color: var(--red); }

/* ===== PUBLISH TOGGLE ===== */
.publish-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-input { display: none; }

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--border);
  border-radius: 14px;
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-input:checked + .toggle-switch {
  background: var(--green);
}

.toggle-input:checked + .toggle-switch::after {
  left: 27px;
  background: #fff;
}

.toggle-text {
  font-size: 0.88rem;
  font-weight: 600;
}

.toggle-on  { display: none; color: var(--green); }
.toggle-off { display: inline; color: var(--text-muted); }

.toggle-input:checked ~ .toggle-text .toggle-on  { display: inline; }
.toggle-input:checked ~ .toggle-text .toggle-off { display: none; }

.toggle-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== LIST TOOLBAR ===== */
.list-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px 11px 40px;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input::placeholder { color: var(--text-muted); }

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--accent); }

/* ===== WORKS GRID ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ===== WORK CARD ===== */
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.work-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}

.work-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--border);
}

.work-card-body {
  padding: 16px;
}

.work-card-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-card-catchcopy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.status-badge.published {
  background: rgba(78,201,148,0.15);
  color: var(--green);
  border: 1px solid rgba(78,201,148,0.3);
}

.status-badge.draft {
  background: rgba(136,136,153,0.15);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.work-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: var(--transition);
}

.work-card:hover .work-card-actions { opacity: 1; }

.work-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.work-action-btn.preview { background: rgba(74,143,232,0.85); color: #fff; }
.work-action-btn.delete  { background: rgba(224,85,85,0.85);   color: #fff; }
.work-action-btn:hover   { transform: scale(1.1); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 4rem;
  color: var(--border);
  margin-bottom: 20px;
}

.empty-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #0a0a0a; font-weight: 700; }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* ===== DETAIL MODAL ===== */
.detail-modal-inner {
  max-width: 700px;
  margin: auto;
  width: 95%;
  max-height: 90vh;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.detail-modal-body {
  overflow-y: auto;
  padding: 28px 32px;
  flex: 1;
}

.detail-thumb {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
  object-fit: cover;
  max-height: 220px;
}

.detail-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
  margin-bottom: 20px;
}

.detail-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.detail-catchcopy {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
  letter-spacing: 0.04em;
}

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

.detail-info-item {
  background: var(--surface2);
  border-radius: 10px;
  padding: 12px 16px;
}

.detail-info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-weight: 600;
}

.detail-info-value {
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-all;
}

.detail-info-value a {
  color: var(--accent);
  text-decoration: none;
}
.detail-info-value a:hover { text-decoration: underline; }

.detail-sns-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* ===== EDIT MODAL ===== */
.edit-modal-inner {
  max-width: 600px;
  margin: auto;
  width: 95%;
  max-height: 90vh;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.edit-modal-body {
  overflow-y: auto;
  flex: 1;
}

/* ===== CONFIRM MODAL ===== */
.modal-overlay {
  align-items: center;
  justify-content: center;
}

.confirm-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.confirm-icon {
  font-size: 2.5rem;
  color: var(--red);
  margin-bottom: 16px;
}

.confirm-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-cancel-btn {
  padding: 10px 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}
.confirm-cancel-btn:hover { border-color: var(--accent); color: var(--accent); }

.confirm-delete-btn {
  padding: 10px 28px;
  background: var(--red);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.confirm-delete-btn:hover { background: #c04444; }

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
  .tab-btn { font-size: 0.78rem; padding: 10px 12px; }
  .works-grid { grid-template-columns: 1fr; }
  .detail-modal-inner { max-width: 100%; border-radius: 12px 12px 0 0; margin-top: auto; }
  .detail-info-grid { grid-template-columns: 1fr; }
  .edit-modal-inner { max-width: 100%; border-radius: 12px 12px 0 0; margin-top: auto; }
}
