.nav {
  margin-bottom: 0;
}

.video-screenshot.container {
  max-width: 64rem;
}

.screenshot-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #f3f4f6;
  display: block;
  cursor: default;
  text-align: left;
}

.screenshot-card:hover {
  transform: none;
}

.screenshot-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenshot-intro {
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
}

.step-badge {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-screenshot .form-group {
  margin-bottom: 16px;
}

.video-screenshot .form-group:last-child {
  margin-bottom: 0;
}

.video-screenshot .form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.video-screenshot .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-screenshot .form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.video-screenshot input[type="file"].form-input {
  padding: 8px 0;
  border: none;
  font-size: 0.875rem;
  color: #6b7280;
}

.video-screenshot input[type="file"].form-input::file-selector-button {
  margin-right: 12px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.video-screenshot input[type="file"].form-input::file-selector-button:hover {
  background: #dbeafe;
}

.video-screenshot .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-purple {
  background: #7c3aed;
  color: #fff;
}

.btn-purple:hover {
  background: #6d28d9;
}

.btn-gradient-blue {
  background: linear-gradient(to right, #3b82f6, #2563eb);
  color: #fff;
}

.btn-gradient-blue:hover {
  background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.btn-gradient-purple {
  background: linear-gradient(to right, #a855f7, #9333ea);
  color: #fff;
}

.btn-gradient-purple:hover {
  background: linear-gradient(to right, #9333ea, #7e22ce);
}

.btn-gradient-green {
  background: linear-gradient(to right, #10b981, #059669);
  color: #fff;
}

.btn-gradient-green:hover {
  background: linear-gradient(to right, #059669, #047857);
}

.btn-block {
  width: 100%;
}

.btn-load {
  margin-top: 8px;
}

.seek-submit {
  margin-top: 12px;
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-grid .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
}

.capture-btn:active {
  transform: scale(0.95);
}

.player-section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
}

.player-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

@media (min-width: 1024px) {
  .player-layout {
    flex-direction: row;
    align-items: stretch;
  }
}

.player-main {
  flex: 1;
  min-width: 0;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.player-wrap {
  flex: 1;
  min-height: 320px;
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

#player-container {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

#player-container .xgplayer {
  width: 100% !important;
  height: 100% !important;
}

#danmaku-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.player-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .player-sidebar {
    width: 320px;
  }
}

.tab-bar {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.tab-btn {
  padding: 8px 4px;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover {
  color: #374151;
}

.tab-btn.active-blue {
  border-bottom-color: #2563eb;
  color: #2563eb;
}

.tab-btn.active-purple {
  border-bottom-color: #7c3aed;
  color: #7c3aed;
}

.tab-panel {
  flex: 1;
  overflow-y: auto;
  transition: opacity 0.2s ease-in-out;
}

.tab-panel.hidden {
  display: none;
}

.panel-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #f3f4f6;
  margin-bottom: 16px;
}

.panel-card:last-child {
  margin-bottom: 0;
}

.panel-card h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.seek-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seek-row .form-label {
  margin: 0;
  white-space: nowrap;
}

.seek-row .form-input {
  flex: 1;
  min-width: 0;
}

.seek-unit {
  font-size: 0.875rem;
  color: #6b7280;
  white-space: nowrap;
}

.captures-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.capture-item {
  flex-shrink: 0;
  width: 160px;
  scroll-snap-align: start;
}

.thumbnail {
  height: 128px;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.05);
}

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

.thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.thumbnail:hover .thumbnail-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.thumbnail-overlay span {
  color: #fff;
  font-size: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.thumbnail:hover .thumbnail-overlay span {
  opacity: 1;
}

.capture-time {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

.capture-download {
  margin-top: 4px;
  width: 100%;
  padding: 4px 0;
  background: #eff6ff;
  color: #2563eb;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.capture-download:hover {
  background: #dbeafe;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 112px;
  background: #fff;
  border-radius: 8px;
  text-align: center;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
}

.empty-state-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.empty-state-text {
  font-size: 0.75rem;
}

.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.selected {
  border-color: #1f2937;
  box-shadow: 0 0 0 2px #c4b5fd;
}

.option-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.option-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.option-btn {
  padding: 8px 12px;
  font-size: 0.75rem;
  border-radius: 8px;
  border: 2px solid transparent;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.option-btn:hover {
  background: #e5e7eb;
  transform: scale(1.05);
}

.option-btn.selected {
  border-color: #1f2937;
  background: #e5e7eb;
  box-shadow: 0 0 0 2px #c4b5fd;
}

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

.danmaku-actions .btn-purple {
  flex: 1;
}

.danmaku-history-section {
  margin-top: 16px;
}

.danmaku-history-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin: 0 0 8px;
}

.danmaku-history-empty {
  text-align: center;
  padding: 16px;
  color: #9ca3af;
  font-size: 0.75rem;
}

.danmaku-history {
  max-height: 192px;
  overflow-y: auto;
}

.danmaku-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.danmaku-history-item:hover {
  background: #f3f4f6;
}

.danmaku-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.danmaku-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}

.danmaku-meta {
  color: #9ca3af;
  flex-shrink: 0;
}

.danmaku-hint {
  margin-top: 16px;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.6;
}

.danmaku-hint p {
  margin: 4px 0;
}

.tips-list {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.8;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.tips-list li {
  padding: 2px 0;
}

canvas {
  display: none;
}

@media (max-width: 768px) {
  .player-section {
    min-height: auto;
  }

  .player-main,
  .player-wrap,
  #player-container {
    min-height: 240px;
  }

  .btn-grid {
    grid-template-columns: 1fr;
  }

  .option-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
