/* ==============================================================================
   Island Engines — Video Credits & Assets List
   Harmonized with the official Bold Sodor Aesthetic!
   Heavy borders, dark navy canvas, Titan / Fredoka typography, and gold brass accents.
   ============================================================================== */

/* Section Title with Sodor Display Font */
.section-title {
  font-family: var(--font-display) !important;
  color: var(--color-gold-bright);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000;
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-muted);
}

.stat-pill {
  background: var(--bg-card);
  border: 2px solid #1e293b;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-muted);
  box-shadow: 0 3px 0 #000;
}

.stat-pill strong {
  color: var(--color-gold-bright);
  font-weight: 800;
}

/* ==============================================================================
   Notice Box
   ============================================================================== */
.main-content {
  padding: 1.5rem 0;
}

.notice-box {
  background: var(--bg-card);
  border: 2px solid #1e293b;
  border-left: 6px solid var(--color-brass);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 0 #000, 0 10px 24px rgba(0, 0, 0, 0.5);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: var(--color-brass);
}

.notice-box p {
  color: #cbd5e1;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notice-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.25rem;
}

.notice-list li::before {
  content: "•";
  position: absolute;
  left: 0.35rem;
  color: var(--color-brass);
  font-weight: bold;
}

.notice-list strong {
  color: #f1f5f9;
}

/* ==============================================================================
   Controls & Filters
   ============================================================================== */
.controls-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-bar {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 2.6rem;
  background: #091022;
  border: 2px solid #1e293b;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: var(--font-heading);
  font-weight: 600;
  box-shadow: 0 3px 0 #000;
  transition: all 0.2s ease;
}

#search-input:focus {
  outline: none;
  border-color: var(--color-brass);
  background: #0d1527;
  box-shadow: 0 4px 0 #000, 0 0 15px rgba(245, 158, 11, 0.3);
}

.clear-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  display: none;
}

.clear-btn:hover {
  background: rgba(239, 68, 68, 0.8);
}

.controls-right-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.count-indicator {
  font-size: 0.84rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-muted);
  background: #091022;
  border: 2px solid #1e293b;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  box-shadow: 0 3px 0 #000;
  white-space: nowrap;
}

.btn-copy-kuids {
  background: linear-gradient(180deg, #ffde59 0%, #f59e0b 100%);
  border: 2px solid #000;
  color: #000;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-family: var(--font-heading);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #000;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.btn-copy-kuids:hover {
  background: #ffde59;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #000;
}

.btn-copy-kuids:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #000;
}

.tab-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-btn {
  background: #0d1527;
  border: 2px solid #1f2e4d;
  color: var(--text-muted);
  padding: 0.48rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #000;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn:hover {
  border-color: var(--color-brass);
  color: #ffffff;
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(180deg, #ffde59 0%, #f59e0b 100%);
  border-color: #000;
  color: #000;
  font-weight: 800;
  box-shadow: 0 3px 0 #000;
  transform: translateY(-2px);
}

.active-author-filter {
  background: rgba(2, 132, 199, 0.15);
  border: 2px solid var(--color-sodor-blue);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 0 #000;
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-brass);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.88rem;
  font-family: var(--font-heading);
}

/* ==============================================================================
   Catalog Grid & Bold Item Cards
   ============================================================================== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.1rem;
  content-visibility: auto;
}

.item-card {
  background: #0d1527;
  border: 2px solid #1f2e4d;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 0 #000, 0 8px 18px rgba(0, 0, 0, 0.4);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  contain-intrinsic-size: 0 130px;
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brass);
  box-shadow: 0 6px 0 #000, 0 14px 28px rgba(0, 0, 0, 0.6);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.item-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  word-break: break-word;
}

.badge-tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  box-shadow: 0 2px 0 #000;
  white-space: nowrap;
}

.badge-music { background: #2e1065; color: #d8b4fe; border: 1px solid #581c87; }
.badge-routes { background: #1e1b4b; color: #a5b4fc; border: 1px solid #4338ca; }
.badge-rolling_stock { background: #082f49; color: #7dd3fc; border: 1px solid #0369a1; }
.badge-buildings { background: #451a03; color: #fde047; border: 1px solid #854d0e; }
.badge-infrastructure { background: #064e3b; color: #6ee7b7; border: 1px solid #047857; }
.badge-characters { background: #431407; color: #fdba74; border: 1px solid #9a3412; }
.badge-scenery { background: #1e293b; color: #cbd5e1; border: 1px solid #334155; }

.item-author {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.author-btn {
  color: var(--color-brass);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}

.author-btn:hover {
  text-decoration: underline;
}

.milo-badge {
  color: #38bdf8;
  font-weight: 600;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.5rem;
  font-size: 0.78rem;
}

.kuid-code {
  font-family: var(--font-code);
  font-size: 0.74rem;
  background: #0d1219;
  color: #94a3b8;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  border: 1px solid #1e293b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.kuid-code:hover {
  color: #ffffff;
  border-color: var(--color-sodor-blue);
}

.item-source {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

/* ==============================================================================
   Creators Section
   ============================================================================== */
.creators-section {
  margin-top: 3.5rem;
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.creators-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.creator-tag {
  background: #0d1527;
  border: 2px solid #1f2e4d;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 3px 0 #000;
  transition: all 0.15s ease;
}

.creator-tag:hover {
  border-color: var(--color-brass);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #000;
}

.creator-count {
  font-size: 0.74rem;
  color: var(--color-gold-bright);
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 6px;
  border-radius: 9999px;
}

/* ==============================================================================
   Empty State & Buttons
   ============================================================================== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-card);
  border: 1px dashed #1e293b;
  border-radius: var(--radius-card);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-simple {
  background: var(--color-sodor-blue);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-simple:hover {
  background: var(--color-sodor-blue);
}

/* ==============================================================================
   Footer
   ============================================================================== */
.footer {
  border-top: 1px solid #1e293b;
  padding: 2rem 0;
  margin-top: 4rem;
  background: var(--bg-surface);
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-container p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================================================
   Toast Notification
   ============================================================================== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0284c7;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.15s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
