/* Dashboard styles */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 24px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.dash-header h1 {
  font-family: 'Silkscreen', monospace;
  font-size: 24px;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

.dash-games {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.dash-game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.3);
}

.dash-game-card:hover {
  border-color: var(--accent);
}

.dash-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #0f1f3a 50%, #061020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 24px;
  font-family: 'Silkscreen', monospace;
  flex-shrink: 0;
}

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

.dash-info {
  flex: 1;
  min-width: 0;
}

.dash-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-info .dash-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.dash-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: 'Silkscreen', monospace;
}

.dash-status.approved {
  background: #0a2618;
  color: #00e676;
}

.dash-status.pending_review {
  background: #1a1500;
  color: #ffd740;
}

.dash-status.rejected {
  background: #1a0a0a;
  color: #ff5555;
}

.dash-status.unlisted {
  background: #111827;
  color: #64748b;
}

.dash-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.3);
  width: 580px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-family: 'Silkscreen', monospace;
  font-size: 18px;
  color: var(--gold);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.edit-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  margin-top: 12px;
}

.edit-form input,
.edit-form textarea,
.edit-form select {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.edit-form input:focus,
.edit-form textarea:focus,
.edit-form select:focus {
  border-color: var(--accent);
}

.edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

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

.btn-secondary {
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 6px 16px;
  font-size: 13px;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-danger {
  background: #5a1e1e;
  border: 2px solid #7a2e2e;
  color: #ff5555;
  padding: 6px 16px;
  font-size: 13px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}

.btn-danger:hover {
  background: #6a2222;
}

/* Edit form image uploads */
.edit-thumb-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.edit-thumb-preview {
  width: 160px;
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.edit-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-thumb-placeholder {
  color: var(--text-dim);
  font-size: 12px;
}

.edit-thumb-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-screenshots-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.edit-screenshot-item {
  position: relative;
  width: 120px;
  aspect-ratio: 16/9;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.edit-screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-screenshot-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #ff5555;
  font-size: 14px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.edit-screenshot-remove:hover {
  background: rgba(90,30,30,0.9);
}

/* Auto-join toggle */
.edit-toggle-row {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.toggle-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

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

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}

.tooltip-trigger:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1f2e;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 400;
  width: 260px;
  line-height: 1.4;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.tooltip-trigger:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
  z-index: 100;
  pointer-events: none;
}
