/* ══════════════════════════════════════════════
   FILE DROP v2 — Strict Black & White Design
   ══════════════════════════════════════════════ */

/* ─── Reset & Variables ─── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-elevated: #161616;
  --bg-hover: #1a1a1a;
  --bg-input: #0e0e0e;
  --border: #1e1e1e;
  --border-hover: #333333;
  --text: #e8e8e8;
  --text-muted: #888888;
  --text-dim: #555555;
  --accent: #ffffff;
  --danger: #ff4444;
  --danger-hover: #cc3333;
  --success: #22c55e;
  --pending: #f59e0b;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: var(--text);
  text-decoration: none;
}

/* ─── Navigation ─── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity var(--transition);
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__logo-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav__link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav__link--accent {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
}

.nav__link--accent:hover {
  background: #ddd;
  color: var(--bg);
}

.nav__link--dim {
  color: var(--text-dim);
}

.nav__link--btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.nav__form {
  display: inline;
}

/* ─── Layout ─── */

.main {
  min-height: calc(100vh - 56px);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ─── Hero ─── */

.hero {
  text-align: center;
  padding: 48px 0 56px;
}

.hero__logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.hero__icon {
  width: 52px;
  height: 52px;
  color: var(--accent);
  flex-shrink: 0;
  animation: heroIconPulse 3s ease-in-out infinite;
}

@keyframes heroIconPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.6)); }
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-dim);
}

/* ─── Section ─── */

.section__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
}

/* ─── Cards Grid ─── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card__banner {
  width: 100%;
  height: 140px;
  background: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  position: relative;
}

.card__banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  opacity: 0.3;
}

.card__avatar-wrap {
  display: flex;
  justify-content: center;
  margin-top: -28px;
  position: relative;
  z-index: 1;
}

.card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  object-fit: cover;
  background: var(--bg-elevated);
}

.card__avatar--default {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.card__body {
  padding: 12px 20px 20px;
  text-align: center;
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__description {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.card__author {
  color: var(--text-muted);
  transition: color var(--transition);
}

.card__author:hover {
  color: var(--accent);
}

.card__size {
  font-family: var(--font-mono);
}

.card__dot {
  opacity: 0.4;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-family: var(--font);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

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

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.btn--primary:hover {
  background: #d4d4d4;
  border-color: #d4d4d4;
}

.btn--full {
  width: 100%;
  padding: 12px;
}

.btn--download {
  width: 100%;
  padding: 10px;
  border-color: var(--border-hover);
}

.btn--download:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--danger {
  color: var(--danger);
  border-color: transparent;
}

.btn--danger:hover {
  border-color: var(--danger);
  background: rgba(255, 68, 68, 0.1);
}

.btn--approve {
  color: var(--success);
  border-color: transparent;
}

.btn--approve:hover {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.btn--sm {
  padding: 5px 10px;
  font-size: 0.75rem;
}

.btn__icon {
  width: 14px;
  height: 14px;
}

/* ─── Empty State ─── */

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.empty-state--sm {
  padding: 32px 20px;
}

.empty-state__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ─── Auth Card ─── */

.auth-card {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.auth-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 20px;
}

.link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link:hover {
  opacity: 0.8;
}

/* ─── Forms ─── */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.875rem;
  font-family: var(--font);
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 160px;
  line-height: 1.5;
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23888' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.form-hint--inline {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ─── Alerts ─── */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.alert--error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: var(--danger);
}

.alert--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--success);
}

/* ─── Drop Zone ─── */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1.5px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.dropzone:hover,
.dropzone--active {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.dropzone__icon {
  width: 40px;
  height: 40px;
  stroke: var(--text-dim);
  transition: stroke var(--transition);
}

.dropzone:hover .dropzone__icon,
.dropzone--active .dropzone__icon {
  stroke: var(--accent);
}

.dropzone__text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dropzone__text strong {
  color: var(--accent);
  font-weight: 500;
}

.dropzone__hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ─── Upload: Image Inputs ─── */

.upload-images {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-bottom: 4px;
}

.image-upload {
  position: relative;
  cursor: pointer;
}

.image-upload__preview {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  overflow: hidden;
  transition: border-color var(--transition);
}

.image-upload__preview--wide {
  aspect-ratio: 16/9;
}

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

.image-upload:hover .image-upload__preview {
  border-color: var(--border-hover);
}

.image-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload__label {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ─── Progress ─── */

.progress {
  display: none;
  margin-bottom: 24px;
}

.progress--visible {
  display: block;
}

.progress__info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress__filename {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.progress__percent {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.progress__track {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.15s linear;
}

.progress__status {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.progress__status--success { color: var(--success); }
.progress__status--error { color: var(--danger); }

/* ─── Profile ─── */

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 0 40px;
}

.profile-header__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-header__initial {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dim);
}

.profile-header__name {
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-header__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.profile-header__date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ─── Badges ─── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge--admin {
  border-color: var(--accent);
  color: var(--accent);
}

.badge--moderator {
  border-color: var(--pending);
  color: var(--pending);
}

.badge--approved {
  border-color: var(--success);
  color: var(--success);
}

.badge--pending {
  border-color: var(--pending);
  color: var(--pending);
}

.badge--rejected {
  border-color: var(--danger);
  color: var(--danger);
}

/* ─── Admin ─── */

.admin-section {
  margin-bottom: 48px;
}

.admin-section__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  transition: background var(--transition);
  gap: 16px;
}

.admin-row:hover {
  background: var(--bg-hover);
}

.admin-row__info {
  min-width: 0;
  flex: 1;
}

.admin-row__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-role-form__row {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 10px;
  align-items: center;
}

/* ─── Error Page ─── */

.error-page {
  text-align: center;
  padding: 120px 20px;
}

.error-page__code {
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.error-page__message {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ─── Animations ─── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeInUp 0.4s ease both;
}

.cards-grid .card:nth-child(2) { animation-delay: 0.05s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.1s; }
.cards-grid .card:nth-child(4) { animation-delay: 0.15s; }
.cards-grid .card:nth-child(5) { animation-delay: 0.2s; }
.cards-grid .card:nth-child(6) { animation-delay: 0.25s; }

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .container { padding: 24px 16px 60px; }
  .hero { padding: 32px 0 40px; }
  .hero__title { font-size: 1.75rem; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .upload-images { grid-template-columns: 1fr; }
  .admin-role-form__row { grid-template-columns: 1fr; }
  .admin-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-header__meta { justify-content: center; }
}

@media (max-width: 480px) {
  .nav__link { padding: 6px 8px; font-size: 0.72rem; }
  .cards-grid { grid-template-columns: 1fr; }
}
