/*
Theme Name: Midnight Anime Minimal
Author: Midnight Anime
Version: 1.0
Description: Ultra-light custom theme that shows eBay listings on the home page with a dynamic collage banner and a simple blog.
*/

:root{
  --ink: #0b0b12; 
  --ink2: #1a1040; 
  --accent: #6b73ff; 
  --accent-light: #8b93ff;
  --text: #111; 
  --text-light: #333;
  --muted: #666;
  --surface: #fff;
  --surface-alt: #fafafa;
  --border: #eee;
  --shadow: rgba(0,0,0,0.1);
  --shadow-strong: rgba(0,0,0,0.15);
  --success: #10b981;
  --radius: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); 
  background: var(--surface);
  scroll-behavior: smooth;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

h1, h2, h3, h4 {
  margin: 0 0 1rem 0;
  font-weight: 700;
  line-height: 1.3;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
}

.note {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Enhanced Footer */
.footer {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink2) 100%);
  color: white;
  padding: 32px 0;
  margin-top: 48px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.footer-text {
  opacity: 0.8;
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Brand & Buttons */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  filter: drop-shadow(0 4px 12px rgba(255,255,255,0.2));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05) rotate(5deg);
}

.brand-name {
  font-weight: 800;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  opacity: 0.92;
  max-width: 70ch;
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 1rem 0 2rem 0;
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 115, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(107, 115, 255, 0.4);
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.pulse-btn {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.btn-icon {
  transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
  transform: translateX(2px);
}

.backlink {
  color: #fff;
  opacity: 0.85;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.backlink:hover {
  opacity: 1;
  background: rgba(255,255,255,0.1);
  transform: translateX(-2px);
}

/* Hero / Banner */
.hero {
  position: relative;
  color: #fff;
  padding: 80px 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at -10% -50%, rgba(255,255,255,0.08), transparent 60%),
    radial-gradient(800px 500px at 110% 0%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, var(--ink2) 50%, #2d1b69 100%);
  background-size: 100% 100%, 100% 100%, 400% 400%;
  animation: bannerShift 20s ease-in-out infinite;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(11,11,18,0.85), rgba(11,11,18,0.7));
  backdrop-filter: blur(1px);
}

.hero-compact {
  padding: 48px 0;
}

.hero .hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes bannerShift {
  0% { background-position: 0% 0%, 0% 0%, 0% 50%; }
  33% { background-position: 0% 0%, 0% 0%, 50% 100%; }
  66% { background-position: 0% 0%, 0% 0%, 100% 0%; }
  100% { background-position: 0% 0%, 0% 0%, 0% 50%; }
}

/* Floating Particles */
.particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: float-particle linear infinite;
}

.particle:nth-child(odd) {
  background: rgba(107, 115, 255, 0.4);
  width: 3px;
  height: 3px;
}

.particle:nth-child(3n) {
  background: rgba(255,255,255,0.3);
  width: 2px;
  height: 2px;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Enhanced Collage Grid */
.collage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 16vw;
  opacity: 0.2;
  filter: saturate(1.2) contrast(1.1) brightness(0.9);
  padding: 20px;
}

@media(min-width: 900px) {
  .collage {
    grid-auto-rows: 120px;
  }
}

.collage .cell {
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  will-change: transform, opacity;
  animation: float-cell 16s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.collage .cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.collage .cell:hover::before {
  opacity: 1;
}

.fallback-cell {
  animation: float-cell 16s ease-in-out infinite, fade-in 1s ease-out;
}

.loaded-cell {
  animation: float-cell 16s ease-in-out infinite, slide-in 0.8s ease-out;
}

@keyframes float-cell {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(1deg); }
  50% { transform: translateY(-4px) rotate(-0.5deg); }
  75% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-accent {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Enhanced Listings */
.listings-wrapper {
  margin: 2rem 0;
}

/* Updates / Blog */
.updates {
  background: 
    linear-gradient(135deg, var(--surface-alt) 0%, #f8fafc 100%);
  padding: 48px 0;
  border-top: 1px solid var(--border);
  position: relative;
}

.updates::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 2rem 0;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow);
  border-color: rgba(107, 115, 255, 0.2);
}

.post-card:hover::before {
  transform: scaleX(1);
}

.post-card-header {
  margin-bottom: 12px;
}

.post-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.post-card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-card h3 a:hover {
  color: var(--accent);
}

.post-card .meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.post-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.readmore {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.readmore:hover {
  color: var(--accent-light);
  transform: translateX(2px);
}

.readmore svg {
  transition: transform 0.3s ease;
}

.readmore:hover svg {
  transform: translateX(2px);
}

.more-updates {
  text-align: center;
  margin-top: 3rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}

.empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Single Post Layout */
.post-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 1rem 0;
  line-height: 1.2;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.content h2, .content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
}

.content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .collage {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 20vw;
    gap: 6px;
    padding: 10px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 48px 0;
  }
  
  .collage {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 25vw;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .post-card {
    padding: 20px;
  }
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hero {
    animation: none;
  }
  
  .collage .cell {
    animation: none;
  }
  
  .particle {
    animation: none;
  }
  
  .pulse-btn {
    animation: none;
  }
  
  .pulse-dot {
    animation: none;
  }
}
  
  body {
    background: var(--surface);
  }
  
  .updates {
    background: linear-gradient(135deg, var(--surface-alt) 0%, #252525 100%);
  }
}

/* Optional: Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

/* Auction Nudge Enhancements */
div.auction-nudge-items {
  gap: 20px !important;
  margin: 2rem 0 !important;
}

.auction-nudge-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
}

.auction-nudge-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 20px var(--shadow) !important;
}

