.sw-fridge-app {
  --ink: #24303b;
  --ink-soft: #55606a;
  --shadow: 0 16px 35px rgba(42, 51, 59, 0.14);
  --top10: #d94141;
  --prequels: #2966c7;
  --original: #0f8a4c;
  --sequels: #ffbf1f;
  --television: #26292d;
  --other: #cb6e1f;
  position: relative;
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1)),
    linear-gradient(90deg, #d6dde3 0%, #f4f7fa 18%, #c2ccd5 48%, #f1f4f7 71%, #bcc8d1 100%);
  border-radius: 28px;
  overflow: hidden;
}

.sw-fridge-app * { box-sizing: border-box; }
.sw-fridge-app h1,
.sw-fridge-app h2,
.sw-fridge-app h3,
.sw-fridge-app .swf-row-label,
.sw-fridge-app .swf-magnet,
.sw-fridge-app .swf-btn,
.sw-fridge-app .swf-remove-zone { font-family: "Gloria Hallelujah", "Trebuchet MS", cursive; }

.swf-steel-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.55), transparent 30%),
    radial-gradient(circle at 87% 8%, rgba(255, 255, 255, 0.4), transparent 20%),
    radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.35), transparent 24%);
}

.swf-hero,
.swf-fridge-header,
.swf-panel-header,
.swf-board-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.swf-panel-header {
  align-items: flex-end;
  flex-wrap: wrap;
}

.swf-panel-header > :first-child {
  flex: 1 1 420px;
  min-width: 0;
}

.swf-hero-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.swf-auth-shell,
.swf-app-shell {
  position: relative;
  z-index: 1;
}

.swf-auth-card {
  max-width: 520px;
  margin: 2rem auto;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.swf-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-soft);
}

.swf-copy,
.swf-mini-stat,
.swf-drop-hint,
.swf-empty,
.swf-trend-list span { color: var(--ink-soft); }

.swf-user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 16px rgba(36, 48, 59, 0.1);
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.swf-panel {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.swf-status {
  margin: 0.8rem 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  font-weight: 700;
}
.swf-status.success { color: #13623e; }
.swf-status.error { color: #942d2d; }
.swf-status.hidden { display: none; }
.hidden { display: none !important; }

.swf-control-grid,
.swf-workspace-grid {
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
}
.swf-control-grid {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  margin-bottom: 1rem;
}
.swf-workspace-grid { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.95fr); }

.swf-search-label {
  min-width: 0;
  flex: 0 1 200px;
  width: 100%;
  max-width: 200px;
  margin-left: auto;
  overflow: hidden;
}

.swf-search-label input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: block;
}

.swf-stack-form { display: grid; gap: 0.9rem; }
.sw-fridge-app label { display: grid; gap: 0.35rem; font-size: 0.95rem; font-weight: 700; }
.sw-fridge-app input,
.sw-fridge-app select,
.sw-fridge-app button { font: inherit; }
.sw-fridge-app input,
.sw-fridge-app select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(56, 67, 77, 0.18);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem 0.9rem;
}

.swf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(36, 48, 59, 0.12);
}
.swf-btn-primary { background: linear-gradient(135deg, #ffe989, #ffc447); }

.swf-remove-zone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 2px dashed rgba(153, 49, 49, 0.45);
  background: rgba(255, 241, 241, 0.92);
  color: #8a2e2e;
}
.swf-remove-zone.drag-target { border-color: rgba(153, 49, 49, 0.9); background: rgba(255, 222, 222, 0.98); }

.swf-magnet-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  min-height: 64px;
  max-height: 260px;
  overflow-y: auto;
  align-content: flex-start;
  padding-right: 0.35rem;
}
.swf-magnet-tray::-webkit-scrollbar { width: 10px; }
.swf-magnet-tray::-webkit-scrollbar-thumb { background: rgba(79, 93, 106, 0.35); border-radius: 999px; }
.swf-magnet-tray::-webkit-scrollbar-track { background: rgba(225, 231, 236, 0.7); border-radius: 999px; }

.swf-fridge {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0.02) 30%, rgba(255, 255, 255, 0.22) 63%, rgba(0, 0, 0, 0.04));
}

.swf-row-label {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(32, 38, 44, 0.2);
}

.swf-board-section {
  margin-top: 1rem;
}
.swf-top10-label { background: var(--top10); }
.swf-label-prequels { background: var(--prequels); }
.swf-label-original_trilogy { background: var(--original); }
.swf-label-sequels { background: var(--sequels); color: #2d2410; }
.swf-label-television { background: var(--television); }
.swf-label-other_films { background: var(--other); }

.swf-top10-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.swf-top-slot,
.swf-bucket-drop {
  border-radius: 18px;
  border: 2px dashed rgba(61, 73, 84, 0.18);
  background: rgba(255, 255, 255, 0.5);
  min-height: 74px;
  padding: 0.8rem;
}
.swf-top-slot.drag-target,
.swf-bucket-drop.drag-target {
  border-color: rgba(214, 120, 48, 0.72);
  background: rgba(255, 245, 210, 0.78);
}

.swf-top-slot.swf-target-armed,
.swf-bucket-drop.swf-target-armed,
.swf-remove-zone.swf-target-armed {
  border-color: rgba(59, 108, 199, 0.45);
  background: rgba(236, 243, 255, 0.88);
}
.swf-slot-title {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.swf-bucket-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}
.swf-bucket-card { display: grid; gap: 0.75rem; }
.swf-bucket-content { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.swf-magnet {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #e9edf0);
  color: #222d37;
  border: 1px solid rgba(60, 67, 75, 0.16);
  box-shadow: 0 5px 10px rgba(29, 36, 43, 0.16);
  user-select: none;
  cursor: grab;
}
.swf-magnet.dragging { opacity: 0.45; }
.swf-magnet.swf-selected {
  outline: 3px solid rgba(41, 102, 199, 0.45);
  transform: translateY(-2px);
}
.swf-magnet-remove {
  border: 1px solid rgba(122, 58, 58, 0.16);
  background: rgba(255, 245, 245, 0.95);
  color: #7a3a3a;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}

.swf-trend-block + .swf-trend-block { margin-top: 1rem; }
.swf-trend-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.swf-trend-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(73, 84, 94, 0.2);
}

.sw-fridge-login {
  padding: 1rem;
  background: #fff8f0;
  border: 1px solid #f0dcc6;
  border-radius: 16px;
}

@media (max-width: 1024px) {
  .swf-control-grid,
  .swf-workspace-grid { grid-template-columns: 1fr; }
  .swf-top10-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swf-bucket-stack { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sw-fridge-app { padding: 1rem; }
  .swf-top10-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swf-hero,
  .swf-fridge-header { flex-direction: column; align-items: stretch; }
  .swf-control-grid {
    margin-top: 0.6rem;
  }
  .swf-board-actions {
    margin-bottom: 0.35rem;
  }
  .swf-search-label {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }
  .swf-magnet {
    min-height: 46px;
  }
}

@media (max-width: 520px) {
  .swf-top10-grid { grid-template-columns: 1fr; }
}
