:root {
  --bg: #0b1020;
  --card: rgba(255, 255, 255, 0.06);
  --text: #e8eefc;
  --muted: rgba(232, 238, 252, 0.7);
  --border: rgba(255, 255, 255, 0.12);
  --primary: #4f7cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 10% 10%, rgba(79, 124, 255, 0.25), transparent 55%),
    radial-gradient(900px 600px at 90% 20%, rgba(132, 83, 255, 0.22), transparent 60%), var(--bg);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
}

.header {
  margin-bottom: 16px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.muted {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modalContent {
  position: relative;
  margin: 2% auto;
  padding: 20px;
  width: 95%;
  max-width: 900px;
  max-height: 95vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modalClose {
  position: absolute;
  top: 10px;
  right: 15px;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.modalClose:hover {
  color: var(--primary);
}

.imageWrapper {
  flex: 1;
  overflow: auto;
  max-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.modalImage {
  max-width: 90%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.modalDownload {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: auto;
  flex-shrink: 0;
}

.modalDownload:hover {
  background: #3d6aff;
}

.card {
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label span {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.row.between {
  justify-content: space-between;
}

label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

label.inline span {
  margin: 0;
}

button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  cursor: pointer;
}

button.primary {
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.95), rgba(132, 83, 255, 0.9));
  border: 0;
}

button.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.tableWrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

thead th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.truncate:hover::after {
  content: attr(data-full);
  position: absolute;
  left: 0;
  top: -30px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
