/*
Theme Name: SissyGifs
Theme URI: https://example.com/sissygifs
Author: OpenAI
Description: A grid-style WordPress theme for uploading and browsing animated GIFs with live previews.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: sissygifs
*/

:root {
  --bg: #0f1220;
  --bg-soft: #171b2e;
  --panel: #1f2540;
  --panel-2: #252d4f;
  --text: #eef2ff;
  --muted: #a8b0d6;
  --accent: #8b5cf6;
  --accent-2: #22c55e;
  --border: rgba(255,255,255,0.08);
  --radius: 18px;
  --shadow: 0 20px 45px rgba(0,0,0,0.28);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.18), transparent 30%),
    linear-gradient(180deg, #0b0e18 0%, var(--bg) 100%);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(11,14,24,0.75);
  border-bottom: 1px solid var(--border);
}

.wrap {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.header-inner,
.footer-inner,
.hero-inner,
.toolbar,
.upload-panel,
.content-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  color: #fff;
  box-shadow: 0 10px 24px rgba(139,92,246,0.25);
}

.button.button-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.hero {
  padding: 4.25rem 0 2rem;
}

.hero-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.4rem, 2vw, 2.2rem);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.18), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 1.6rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: #d7dcff;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  line-height: 1.05;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
}

.hero p {
  margin: 0 0 1.3rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-demo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.hero-demo-card,
.gif-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  overflow: hidden;
}

.hero-demo-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0 1rem;
  flex-wrap: wrap;
}

.toolbar h2,
.page-title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.toolbar p,
.page-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.toolbar .toolbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.gif-grid {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gif-card {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.gif-card:hover,
.gif-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(139,92,246,0.55);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}

.gif-thumb {
  position: relative;
  background: #0b0e18;
}

.gif-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gif-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(11,14,24,0.78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08);
}

.gif-meta {
  padding: 0.95rem;
}

.gif-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
}

.gif-excerpt,
.gif-date {
  color: var(--muted);
  font-size: 0.92rem;
}

.gif-excerpt {
  margin: 0.4rem 0 0;
}

.upload-panel {
  margin-bottom: 3rem;
}

.panel {
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.upload-form {
  display: grid;
  gap: 1rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
}

label {
  font-weight: 700;
  font-size: 0.95rem;
}

input[type="text"],
input[type="file"],
textarea,
select,
input[type="search"] {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.045);
  color: var(--text);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.upload-preview-wrap {
  display: none;
  gap: 0.8rem;
  align-items: center;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.03);
}

.upload-preview-wrap.is-visible {
  display: grid;
  grid-template-columns: 120px 1fr;
}

.upload-preview-wrap img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  background: #0b0e18;
}

.notice {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.notice-success {
  color: #dcfce7;
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.3);
}

.notice-error {
  color: #fee2e2;
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.3);
}

.content-shell {
  padding: 2rem 0 3rem;
}

.single-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.single-card img {
  border-radius: 18px;
  width: 100%;
}

.entry-content,
.entry-meta {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 2rem 0 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

.pagination {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto 3rem;
}

.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

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

@media (max-width: 640px) {
  .header-inner {
    padding: 0.8rem 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .upload-preview-wrap.is-visible {
    grid-template-columns: 1fr;
  }
}


/* Minimal grid refresh */
:root {
  --bg: #000000;
  --bg-soft: #050505;
  --panel: #0b0b0b;
  --panel-2: #111111;
  --text: #ffffff;
  --muted: rgba(255,255,255,0.72);
  --accent: #ffffff;
  --border: rgba(255,255,255,0.08);
  --max: 1320px;
  --radius: 0px;
  --shadow: none;
}

body {
  background: #000;
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: min(calc(100% - 1rem), var(--max));
  min-height: 64px;
}

.brand-badge {
  background: #fff;
  color: #000;
  box-shadow: none;
  border-radius: 999px;
  width: 36px;
  height: 36px;
}

.site-nav a {
  color: rgba(255,255,255,0.8);
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  background: #fff;
  color: #000;
  box-shadow: none;
  border-radius: 999px;
}

.button.button-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
}

.hero,
.toolbar,
.hero-card,
.hero-demo,
.hero-demo-card,
.gif-badge,
.gif-meta {
  box-shadow: none;
}

.hero {
  display: none;
}

.minimal-toolbar {
  width: min(calc(100% - 1rem), var(--max));
  margin: 0 auto;
  padding: 1rem 0 0.85rem;
}

.minimal-toolbar-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.minimal-branding h1,
.minimal-branding .page-title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: 0.01em;
}

.minimal-branding p,
.minimal-branding .page-subtitle {
  margin: 0.25rem 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 0.95rem;
}

.minimal-toolbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.gif-grid.gif-grid-minimal {
  width: min(calc(100% - 1rem), var(--max));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 auto 1rem;
}

.gif-card,
.gif-card-minimal,
.gif-card-minimal .gif-thumb {
  border: 0;
  border-radius: 0;
  background: #000;
  overflow: hidden;
}

.gif-card-minimal {
  position: relative;
  transform: none !important;
}

.gif-card-minimal:hover,
.gif-card-minimal:focus-within {
  border-color: transparent;
  background: #000;
}

.gif-card-minimal .gif-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
}

.gif-card-minimal .gif-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.gif-card-minimal:hover .gif-thumb img,
.gif-card-minimal:focus-within .gif-thumb img {
  transform: scale(1.02);
  opacity: 0.92;
}

.gif-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: end;
  padding: 1rem 0.8rem 0.7rem;
  min-height: 38%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.82) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.gif-card-minimal:hover .gif-overlay,
.gif-card-minimal:focus-within .gif-overlay {
  opacity: 1;
}

.gif-overlay .gif-title {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.content-shell {
  padding-top: 0;
}

.panel,
.single-card {
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1rem;
  color: rgba(255,255,255,0.5);
}

.pagination {
  margin-top: 0.75rem;
}

.pagination .page-numbers {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

@media (max-width: 980px) {
  .gif-grid.gif-grid-minimal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner,
  .minimal-toolbar,
  .gif-grid.gif-grid-minimal,
  .pagination {
    width: min(calc(100% - 0.5rem), var(--max));
  }

  .gif-grid.gif-grid-minimal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .minimal-branding p,
  .minimal-branding .page-subtitle {
    font-size: 0.88rem;
  }
}


.single-media {
  margin-bottom: 1rem;
}

.single-media img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  background: #000;
}


/* Minimal grid update */
body {
  background: #000;
}

.site-header,
.site-footer {
  display: none;
}

.minimal-toolbar {
  padding: 1.75rem 1rem 1rem;
}

.minimal-toolbar-inner {
  width: min(calc(100% - 2rem), 1800px);
  margin: 0 auto;
}

.minimal-branding h1,
.page-title {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.05;
}

.minimal-branding p,
.page-subtitle {
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
}

.minimal-toolbar-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.gif-grid.gif-grid-minimal {
  width: min(calc(100% - 2rem), 1800px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 0 0 2rem;
}

.gif-card.gif-card-minimal {
  margin: 0;
}

.gif-card-minimal .gif-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
}

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

.gif-card-minimal .gif-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 0.75rem 0.7rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.82));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gif-card-minimal .gif-thumb:hover .gif-overlay,
.gif-card-minimal .gif-thumb:focus .gif-overlay,
.gif-card-minimal .gif-thumb:focus-visible .gif-overlay {
  opacity: 1;
}

.gif-card-minimal .gif-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.gif-load-more {
  width: min(calc(100% - 2rem), 1800px);
  margin: 0 auto 2rem;
  min-height: 48px;
  display: grid;
  place-items: center;
}

.gif-load-more-status {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
}

.gif-load-more.is-hidden {
  display: none;
}

@media (max-width: 1400px) {
  .gif-grid.gif-grid-minimal {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .gif-grid.gif-grid-minimal {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .gif-grid.gif-grid-minimal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
}

@media (max-width: 560px) {
  .gif-grid.gif-grid-minimal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
}
