/* CutePNG Marketplace - Premium Design System (Off-white / Slate / Electric Indigo) */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-focus: #6366f1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.1);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header & Navigation */
.header-glass {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
  padding: 0.4rem 0.2rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.badge-free-nav {
  background: #ecfdf5;
  color: #059669;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.credit-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid rgba(79, 70, 229, 0.15);
  transition: all 0.2s;
}

.credit-pill:hover {
  background: #e0e7ff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.825rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Hero Section */
.hero-wrapper {
  padding: 4.5rem 0 3.5rem 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 580px;
}

/* Search Bar */
.search-box-hero {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.6rem 0.5rem 1.2rem;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  margin-bottom: 1.25rem;
  transition: all 0.2s ease;
}

.search-box-hero:focus-within {
  border-color: var(--primary);
  box-shadow: 0 8px 28px -2px rgba(79, 70, 229, 0.15);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-main);
  background: transparent;
}

.search-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-tag-pill {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  transition: all 0.15s;
}

.search-tag-pill:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Floating Hero Composition */
.hero-composition {
  position: relative;
  height: 420px;
}

.float-card {
  position: absolute;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  transition: transform 0.3s ease;
}

.float-card-1 {
  top: 10px;
  right: 20px;
  width: 280px;
  animation: float 6s ease-in-out infinite;
}

.float-card-2 {
  bottom: 20px;
  left: 10px;
  width: 260px;
  animation: float 7s ease-in-out infinite reverse;
}

.float-card-3 {
  top: 160px;
  right: 180px;
  width: 220px;
  animation: float 8s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Product Card Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.card-preview {
  position: relative;
  height: 220px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-preview svg, .card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .card-preview svg,
.product-card:hover .card-preview img {
  transform: scale(1.03);
}

.badge-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 0.35rem;
  z-index: 5;
}

.badge-free {
  background: #10b981;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.badge-editor {
  background: #6366f1;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-formats {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.format-chip {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-credits {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Categories Bar */
.category-pills {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.pricing-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s;
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.15);
  transform: scale(1.04);
  z-index: 2;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.pricing-credits {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.pricing-bonus {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 1.2rem;
}

.pricing-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Modals & Rewarded Ad Player */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-backdrop.show .modal-box {
  transform: scale(1);
}

.ad-progress-bar {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 9999px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.ad-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  width: 0%;
  transition: width 0.1s linear;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Admin Styling */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #0f172a;
  color: #f8fafc;
}

.admin-sidebar {
  width: 260px;
  background: #1e293b;
  border-right: 1px solid #334155;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.admin-main {
  flex: 1;
  background: #0f172a;
  padding: 2rem;
  overflow-y: auto;
}

.admin-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 2rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.admin-nav a:hover, .admin-nav a.active {
  background: #334155;
  color: #ffffff;
}

.admin-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid #334155;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #1e293b;
  color: #cbd5e1;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-composition { display: none; }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-title { font-size: 2.25rem; }
}
