/* MemeForge • High-Culture Psychonaut Meme Studio Stylesheet */
:root {
  --bg: #06080e;
  --card-bg: rgba(15, 23, 42, 0.75);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --gold: #fbbf24;
  --cyan: #00f0ff;
  --pink: #ff007f;
  --simp-yellow: #fed41d;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  padding-bottom: 5rem;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(251, 191, 36, 0.05) 0%, transparent 40%);
}

/* Header */
header.site-header {
  height: 64px;
  background: rgba(10, 15, 28, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.brand-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(254, 212, 29, 0.15);
  color: var(--simp-yellow);
  border: 1px solid rgba(254, 212, 29, 0.35);
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.85rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Studio Workspace */
.meme-studio {
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .meme-studio {
    grid-template-columns: 1fr;
  }
}

/* Canvas Viewport */
.canvas-card {
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.canvas-viewport {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

#memeCanvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* CRT Screen Effect */
.crt-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.crt-active .crt-overlay {
  opacity: 1;
}

.canvas-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  width: 100%;
  max-width: 640px;
}

.btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
  color: #000;
}

.btn-gold:hover {
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: #fff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Controls Panel */
.controls-card {
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.control-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.4rem;
  display: block;
}

.text-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.text-field:focus {
  border-color: var(--cyan);
}

.font-toggles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.font-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.45rem 0.2rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.font-btn.active {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.filter-btn.active {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

/* Gallery Section */
.gallery-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.meme-card {
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.meme-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.meme-card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.meme-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meme-card-info h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: #fff;
}

.meme-card-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.remix-btn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.remix-btn:hover {
  background: var(--gold);
  color: #000;
}
