* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080b12;
  --card: #111722;
  --card-hover: #171f2d;
  --border: #273142;
  --text: #f5f7fa;
  --muted: #8994a8;
  --accent: #4f8cff;
  --accent-hover: #3678ed;
  --danger: #ff4d67;
  --input: #0b1019;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.background {
  position: fixed;
  inset: 0;

  background:
      radial-gradient(
          circle at 20% 20%,
          rgba(79, 140, 255, 0.12),
          transparent 30%
      ),
      radial-gradient(
          circle at 80% 70%,
          rgba(93, 62, 255, 0.08),
          transparent 30%
      );

  pointer-events: none;
}

.app {
  position: relative;
  max-width: 1300px;
  margin: auto;
  padding: 30px;
}

/* HEADER */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}

header h1 {
  font-size: 32px;
}

header h1 span {
  color: var(--accent);
}

header p {
  color: var(--muted);
  margin-top: 5px;
}

/* BUTTONS */

button {
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 14px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* SETTINGS */

.settings {
  display: grid;

  grid-template-columns:
      repeat(auto-fit, minmax(200px, 1fr));

  gap: 20px;

  background: rgba(17, 23, 34, 0.8);

  border: 1px solid var(--border);

  border-radius: 16px;

  padding: 25px;

  margin-bottom: 25px;

  backdrop-filter: blur(15px);
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-group label {
  font-size: 13px;
  color: var(--muted);
}

input,
select {
  background: var(--input);

  border: 1px solid var(--border);

  border-radius: 8px;

  color: white;

  padding: 12px;

  width: 100%;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-row input {
  width: 100%;
}

.range-row span {
  min-width: 45px;
  color: var(--accent);
}

/* UPLOAD AREA */

.upload-zone {
  border: 2px dashed var(--border);

  background: rgba(17, 23, 34, 0.65);

  border-radius: 20px;

  padding: 70px 20px;

  text-align: center;

  cursor: pointer;

  transition: 0.25s;

  margin-bottom: 20px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);

  background:
      rgba(79, 140, 255, 0.08);
}

.upload-icon {
  font-size: 55px;
  margin-bottom: 15px;
  color: var(--accent);
}

.upload-zone h2 {
  margin-bottom: 8px;
}

.upload-zone p,
.upload-zone span {
  color: var(--muted);
}

.upload-zone span {
  display: block;
  font-size: 12px;
  margin-top: 15px;
}

/* ACTIONS */

.actions {
  display: flex;
  gap: 15px;
  margin-bottom: 35px;
}

.primary {
  background: var(--accent);
  color: white;
  padding: 13px 22px;
  border-radius: 9px;
}

.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.secondary {
  background: #202938;
  color: white;
  padding: 13px 22px;
  border-radius: 9px;
}

/* SECTION TITLE */

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

/* IMAGE GRID */

.image-grid {
  display: grid;

  grid-template-columns:
      repeat(auto-fill, minmax(250px, 1fr));

  gap: 20px;
}

/* IMAGE CARD */

.image-card {
  background: var(--card);

  border: 1px solid var(--border);

  border-radius: 14px;

  overflow: hidden;

  transition: 0.2s;
}

.image-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
}

.image-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 15px;
}

.file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-size: 14px;

  margin-bottom: 10px;
}

.file-info {
  color: var(--muted);

  font-size: 12px;

  margin-bottom: 12px;
}

/* CUSTOM NAME INPUT */

.custom-name-group {
  margin-bottom: 15px;
}

.custom-name-group label {
  display: block;

  color: var(--muted);

  font-size: 11px;

  margin-bottom: 6px;
}

.custom-name-input {
  padding: 10px;

  font-size: 13px;

  background: var(--input);

  border: 1px solid var(--border);

  color: white;

  width: 100%;
}

.custom-name-input:focus {
  outline: none;

  border-color: var(--accent);
}

/* CARD BUTTONS */

.card-buttons {
  display: flex;
  gap: 8px;
}

.copy-btn,
.delete-btn {
  flex: 1;

  padding: 9px;

  border-radius: 7px;
}

.copy-btn {
  background: #25344d;
  color: white;
}

.delete-btn {
  background: rgba(255, 77, 103, 0.15);
  color: var(--danger);
}

/* LIBRARY */

.library-section {
  margin-top: 50px;
}

/* TOAST */

.toast {
  position: fixed;

  bottom: 25px;
  right: 25px;

  background: #1b2432;

  border: 1px solid var(--border);

  padding: 14px 20px;

  border-radius: 10px;

  transform: translateY(100px);

  opacity: 0;

  transition: 0.3s;

  z-index: 100;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* MOBILE */

@media (max-width: 600px) {

  .app {
      padding: 18px;
  }

  header {
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
  }

  .actions {
      flex-direction: column;
  }

  .actions button {
      width: 100%;
  }

  .upload-zone {
      padding: 45px 15px;
  }
}