/* Fallback font with adjusted metrics to match Inter — prevents CLS */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* =========================================================================
   VARIABLES & TOKENS (Premium & Sweet Card Style)
   ========================================================================= */
:root {
  /* Light Theme Focus: Warm, Soft Off-White */
  --bg-color: #f4f6f8;
  --text-color: #0f1419;
  --text-muted: #536471;

  --header-bg: rgba(255, 255, 255, 0.72);
  --header-border: #e1e8ed;

  /* Premium card off-white */
  --card-bg: #ffffff;
  --card-border: #e1e8ed;
  --card-hover-border: #cbd5e0;

  --btn-bg: #eff3f4;
  --btn-hover: #e1e8ed;
  --btn-text: #0f1419;

  --search-bg: #ffffff;
  --search-border: #e1e8ed;
  --search-focus-border: #1da1f2;

  --tag-bg: #f0f3f5;
  --tag-hover: #e2e8f0;
  --tag-text: #657786;

  --primary-color: #0f1419;
  --secondary-color: #ffffff;

  --vote-bg: transparent;
  --vote-active: #f91880;
  --vote-hover: rgba(249, 24, 128, 0.08);
  --vote-icon: #8b98a5;

  --danger-color: #f4212e;
  --danger-hover-bg: rgba(244, 33, 46, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.04);

  --radius-sm: 10px;
  --radius-md: 18px;
  /* Standardize card & input roundedness */
  --radius-lg: 24px;
  --radius-pill: 9999px;
  /* Oval buttons */

  --font-ui: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Font metric overrides for CLS prevention */
  --font-fallback-adjust: 100%;
}

[data-theme="dark"] {
  /* Dark Theme Focus: Absolute Black body, tinted premium cards */
  --bg-color: #000000;
  --text-color: #e7e9ea;
  --text-muted: #71767b;

  --header-bg: rgba(0, 0, 0, 0.75);
  --header-border: #16181c;
  /* Very subtle */

  /* Elegant tinted OLED card design */
  --card-bg: #101214;
  --card-border: #1b1e22;
  --card-hover-border: #292d33;

  --btn-bg: #1f2326;
  --btn-hover: #2f3336;
  --btn-text: #e7e9ea;

  --search-bg: #101214;
  --search-border: #1b1e22;
  --search-focus-border: #1da1f2;

  --tag-bg: #181b1f;
  --tag-hover: #21252a;
  --tag-text: #8b98a5;

  --primary-color: #e7e9ea;
  --secondary-color: #000000;

  --vote-bg: transparent;
  --vote-active: #f91880;
  --vote-hover: rgba(249, 24, 128, 0.15);
  --vote-icon: #71767b;

  --danger-hover-bg: rgba(244, 33, 46, 0.15);

  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* =========================================================================
   BASE RESET & ANTI-FLASH MEASURES
   ========================================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
  /* No 'transition' here = no flash-bang! */
}

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

button,
input,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: var(--text-color);
  flex-shrink: 0;
}

.logo-emoji {
  font-size: 1.3rem;
}

.logo-text {
  color: var(--text-color);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Desktop nav — inline */
.header-nav {
  display: none;
}

/* Divider between nav and icon buttons */
.header-divider {
  display: none;
}

/* Mobile-only nav items (hidden on desktop) */
.nav-mobile-only {
  display: none;
}

.nav-divider-mobile {
  display: none;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
    gap: 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
  }

  .header-nav a:hover {
    color: var(--text-color);
  }

  .header-right {
    gap: 12px;
  }

  .header-divider {
    display: block;
    width: 1px;
    height: 24px;
    background: var(--card-border);
    margin: 0 4px;
    flex-shrink: 0;
  }
}

@media (max-width: 767px) {
  .header-icon-btn {
    display: none;
  }

  .header-divider {
    display: none;
  }

  .nav-mobile-only {
    display: block;
  }

  .nav-divider-mobile {
    height: 1px;
    background: var(--card-border);
    margin: 4px 16px;
    display: block;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-color);
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background-color: var(--btn-bg);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* =========================================================================
   HAMBURGER BUTTON (mobile only)
   ========================================================================= */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.hamburger:hover {
  background-color: var(--btn-bg);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* Animate to X */
.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hide hamburger on desktop */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

/* =========================================================================
   MOBILE NAV DROPDOWN
   ========================================================================= */
@media (max-width: 767px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    padding: 8px 0;
    z-index: 99;
  }

  [data-theme="dark"] .header-nav {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  .header-nav.nav-open {
    display: flex;
    animation: navSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .header-nav a {
    display: block;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    transition: background-color 0.15s;
  }

  .header-nav a:hover,
  .header-nav a:active {
    background-color: var(--btn-bg);
  }
}

/* =========================================================================
   MAIN/FEED STRUCTURE
   ========================================================================= */
.combo-page-container {
  max-width: 860px;
  /* Spacious and elegant width for PC */
  margin: 0 auto;
  padding: 32px 16px 80px 16px;
}

/* Big Aesthetic Search Bar */
.page-search-bar {
  display: flex;
  align-items: center;
  background-color: var(--search-bg);
  border: 1px solid var(--search-border);
  border-radius: var(--radius-pill);
  padding: 0 16px 0 24px;
  height: 60px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.page-search-bar:focus-within {
  border-color: var(--search-focus-border);
  box-shadow: 0 0 0 1px var(--search-focus-border);
}

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

.page-search-btn {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  width: 40px;
  height: 40px;
}

.page-search-btn:hover {
  color: var(--search-focus-border);
}

/* PAGE TITLE */
.combo-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--header-border);
  text-align: center;
  min-height: 80px;
}

.combo-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  /* Large and bold */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-color);
}

.combo-count {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}



/* Submit Form */
.open-submit-card {
  margin-bottom: 40px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  scroll-margin-top: 80px;
}

.open-submit-card:focus-within {
  border-color: var(--search-focus-border);
}

.submit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.submit-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--search-border);
  border-radius: var(--radius-md);
  /* Soft input field */
  background-color: var(--search-bg);
  color: var(--text-color);
  font-size: 1.05rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--card-hover-border);
}

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

.form-actions .form-input {
  flex: 1;
  padding: 12px 16px;
}

.btn-submit-colorful {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-submit-colorful:hover {
  opacity: 0.85;
}

/* =========================================================================
   FEED (Sweet, Distinct Cards - the "Tatlı Tasarım")
   ========================================================================= */
.combo-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Spacious gap between cards */
}

.colorful-combo-item {
  display: flex;
  padding: 24px;
  /* Generous card padding */
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  /* Soft rounded corners */
  box-shadow: var(--shadow-sm);
  /* Soft shadow added */
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 120px;
  contain: content;
}

.colorful-combo-item:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-card);
}

/* Left Vote Column */
.vote-col-fun {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
  flex-shrink: 0;
  padding-top: 4px;
  gap: 6px;
}

.vote-btn-fun {
  color: var(--vote-icon);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  background-color: transparent;
}

.vote-btn-fun svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s;
}

.vote-btn-fun:hover {
  background-color: var(--vote-hover);
  color: var(--vote-active);
}

.vote-btn-fun:hover svg {
  transform: translateY(-2px);
}

.vote-btn-fun.downvote:hover svg {
  transform: translateY(2px);
}

.vote-btn-fun.voted {
  color: var(--vote-active);
}

.vote-score-fun {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-color);
}

.vote-btn-fun.voted+.vote-score-fun {
  color: var(--vote-active);
}

/* Right Content Area */
.combo-content-fun {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-left: 12px;
}

/* Centered & Large combo text */
.combo-body-large {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  line-height: 1.4;
  word-break: break-word;
  color: var(--text-color);
  margin-bottom: 24px;
  padding-right: 4px;

  /* Mathematical Centering: Compensating for the left Vote column */
  margin-right: 58px;

  max-height: 400px;
  overflow-y: auto;
  text-align: center;
  /* Centered large emojis */
}

/* Centered ASCII art */
.combo-body-large.ascii {
  font-size: clamp(0.35rem, 0.85vw, 0.65rem);
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
  overflow-x: hidden;
  font-family: "DejaVu Sans Mono", "Segoe UI Symbol", "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  margin-bottom: 24px;
  text-align: left;
  background: transparent;
  padding: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  display: block;
}

/* Short multiline combos (music player, small text art) */
.combo-body-large.multiline {
  font-size: clamp(1rem, 2vw, 1.4rem);
  line-height: 1.3;
  white-space: pre;
  text-align: center;
  background: transparent;
  padding: 0;
  margin-bottom: 24px;
  overflow-x: auto;
  display: block;
}

/* Custom Scrollbar */
.combo-body-large::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.combo-body-large::-webkit-scrollbar-track {
  background: transparent;
}

.combo-body-large::-webkit-scrollbar-thumb {
  background: var(--header-border);
  border-radius: 10px;
}

.combo-body-large:hover::-webkit-scrollbar-thumb {
  background: var(--text-muted);
}

/* Bottom Action Bar (Tags + Buttons) */
.combo-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Center aligned layout */
  gap: 16px;
  margin-top: auto;
}

/* Muted, Pill-shaped Tags */
.combo-tags-fun {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.tag-fun {
  background-color: var(--tag-bg);
  color: var(--tag-text);
  /* Muted color */
  font-weight: 500;
  font-size: 0.85rem;
  padding: 4px 12px;
  /* Elegant pill shape */
  border-radius: 12px;
  transition: all 0.2s;
  text-transform: lowercase;
}

.tag-fun:hover {
  background-color: var(--tag-hover);
  color: var(--text-color);
  /* Awakens on hover */
}

/* Functional Buttons Container (Report & Copy) tightly aligned Right */
.action-buttons-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Discrete Report Button */
.btn-report {
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  opacity: 0.6;
  /* Ghost-like appearance on page */
}

.btn-report svg {
  width: 18px;
  height: 18px;
}

.btn-report:hover {
  opacity: 1;
  color: var(--danger-color);
  background-color: var(--danger-hover-bg);
}

/* Copy Button Fixed Width & Alignment */
.btn-copy-fun {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  /* Round button for sweet design */
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.1s;
  min-width: 80px;
}

.btn-copy-fun:hover {
  opacity: 0.85;
}

.btn-copy-fun:active {
  transform: scale(0.96);
  /* Small tactile feedback on click */
}

/* =========================================================================
   MEDIA QUERIES: FLAWLESS RESPONSIVENESS
   ========================================================================= */
/* Tablet & Small Desktop */
@media (max-width: 800px) {
  .combo-page-container {
    padding: 24px 12px 60px 12px;
  }

  .open-submit-card {
    padding: 20px 16px;
  }
}

/* Base Mobile Size */
@media (max-width: 600px) {
  .header-container {
    padding: 0 12px;
    height: 56px;
  }

  .logo {
    font-size: 1.2rem;
    gap: 6px;
  }

  .colorful-combo-item {
    padding: 16px 12px;
  }

  .combo-content-fun {
    padding-left: 8px;
  }

  .vote-col-fun {
    width: 40px;
    gap: 4px;
  }

  .vote-btn-fun {
    width: 32px;
    height: 32px;
  }

  .vote-btn-fun svg {
    width: 18px;
    height: 18px;
  }

  .vote-score-fun {
    font-size: 0.85rem;
  }

  .vote-col-fun + .combo-content-fun .combo-body-large {
    margin-left: 0;
    margin-right: 0;
    width: calc(100% + 48px);
    transform: translateX(-48px);
    text-align: center;
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .combo-body-large {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .vote-col-fun + .combo-content-fun .combo-body-large.ascii,
  .combo-body-large.ascii {
    font-size: clamp(0.3rem, 1.2vw, 0.55rem);
    width: auto;
    transform: none;
    margin-left: auto;
    margin-right: auto;
  }

  .combo-body-large.multiline {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  }

  .combo-actions-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .action-buttons-wrap {
    width: 100%;
    justify-content: flex-end;
  }

  .submit-form {
    gap: 12px;
  }

  .form-input {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .btn-submit-colorful {
    width: 100%;
    text-align: center;
    padding: 12px 24px;
  }

  .page-search-bar {
    height: 50px;
    margin-bottom: 24px;
    padding: 0 12px 0 16px;
  }

  .page-search-input {
    font-size: 1rem;
  }

  .combo-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .combo-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }

  .open-submit-card {
    padding: 16px 14px;
    margin-bottom: 28px;
  }

  .submit-header h2 {
    font-size: 1.05rem;
  }

  .combo-feed {
    gap: 16px;
  }

  .footer {
    padding: 32px 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
  }
}

/* Tiny Mobile (iPhone SE, smaller Androids) */
@media (max-width: 400px) {
  .header-container {
    padding: 0 10px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .combo-title {
    font-size: 1.3rem;
  }

  .combo-body-large {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }

  .colorful-combo-item {
    padding: 12px 10px;
    border-radius: var(--radius-sm);
  }

  .btn-copy-fun {
    padding: 6px 16px;
    font-size: 0.8rem;
    min-width: 70px;
  }

  .tag-fun {
    font-size: 0.78rem;
    padding: 3px 10px;
  }

  .open-submit-card {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
  }
}

/* =========================================================================
   HOMEPAGE SPECIFIC (Hero & Categories)
   ========================================================================= */
.home-page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px 80px 20px;
}

.hero-section {
  text-align: center;
  margin-bottom: 60px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-color);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.5;
}

.hero-search-box {
  display: flex;
  align-items: center;
  background-color: var(--search-bg);
  border: 1px solid var(--search-border);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 24px;
  height: 72px;
  max-width: 680px;
  margin: 0 auto 32px auto;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.hero-search-box:focus-within {
  border-color: var(--search-focus-border);
  box-shadow: 0 0 0 1px var(--search-focus-border);
}

.hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.15rem;
  color: var(--text-color);
  outline: none;
  padding: 0 16px;
}

.hero-search-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 32px;
  height: 100%;
  border-radius: var(--radius-pill);
  transition: opacity 0.2s;
}

.hero-search-btn:hover {
  opacity: 0.85;
}

.hero-tags {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.hero-tag {
  background-color: var(--tag-bg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.hero-tag:hover {
  background-color: var(--search-focus-border);
  color: #fff;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  /* Soft big round corners */
  padding: 32px 20px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
  /* Hover lift up effect */
}

.cat-emoji {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 12px;
}

.cat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
}

@media (max-width: 600px) {
  .home-page-container {
    padding: 32px 16px 60px 16px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .hero-search-box {
    flex-direction: column;
    height: auto;
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .hero-search-box svg {
    display: none;
  }

  .hero-search-input {
    width: 100%;
    padding: 0;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1rem;
  }

  .hero-search-btn {
    width: 100%;
    height: 48px;
    font-size: 0.95rem;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tag {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .cat-card {
    padding: 18px 8px;
  }

  .cat-emoji {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .cat-title {
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .cat-card {
    padding: 14px 6px;
  }

  .cat-emoji {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .cat-title {
    font-size: 0.72rem;
  }
}

/* =========================================================================
   LATEST / RECENTLY ADDED SECTION (Homepage)
   ========================================================================= */
.latest-section {
  margin-top: 20px;
}

.latest-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-color);
  margin-bottom: 20px;
}

.latest-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 600px) {
  .latest-title {
    font-size: 1.2rem;
  }

  .latest-tags-wrap {
    gap: 8px;
  }

  .hero-tags {
    gap: 8px;
  }
}

/* =========================================================================
   404 ERROR PAGE
   ========================================================================= */
.error-page-header {
  text-align: center;
}

.error-page-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.error-page-action {
  text-align: center;
  padding: 20px 0 40px;
}

.error-home-btn {
  display: inline-block;
  padding: 12px 32px;
  text-decoration: none;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  padding: 40px 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

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

/* =========================================================================
   TOAST NOTIFICATION
   ========================================================================= */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-color);
  color: var(--secondary-color);
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Utility: override hidden for flex display */
.emoji-picker-dropdown:not([hidden]) {
  display: flex;
}

.tag-search-dropdown:not([hidden]) {
  display: block;
}

/* Search bar icon */
.search-bar-icon {
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

/* Submit header icon */
.submit-icon {
  color: var(--search-focus-border);
  flex-shrink: 0;
}

/* Captcha row */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

/* Tag input wrapper flex */
.tag-input-wrapper {
  position: relative;
  flex: 1;
}

/* Empty state */
.combo-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.combo-empty-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.combo-empty-text {
  font-size: 1.1rem;
}

/* =========================================================================
   EMOJI PICKER DROPDOWN — Premium Design
   ========================================================================= */
.emoji-input-wrapper {
  position: relative;
}

/* Textarea gets rounded bottom corners removed when picker is open */
.emoji-input-wrapper.picker-open .form-input {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  border-color: var(--card-hover-border);
}

.emoji-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--card-bg);
  border: 1px solid var(--card-hover-border);
  border-top: 1px solid var(--card-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow: hidden;
  flex-direction: column;
  animation: emojiPickerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .emoji-picker-dropdown {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

@keyframes emojiPickerSlideIn {
  from { opacity: 0; transform: translateY(-6px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 320px; }
}

.emoji-picker-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-muted);
  background: var(--btn-bg);
}

.emoji-picker-search-row svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.emoji-picker-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.2s;
}

.emoji-picker-close:hover {
  color: var(--text-color);
}

.emoji-search-field {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
}

.emoji-search-field::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.emoji-results {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 4px;
  align-content: flex-start;
}

.emoji-results::-webkit-scrollbar {
  width: 5px;
}

.emoji-results::-webkit-scrollbar-track {
  background: transparent;
}

.emoji-results::-webkit-scrollbar-thumb {
  background: var(--header-border);
  border-radius: 10px;
}

.emoji-results::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.emoji-hint {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.emoji-hint::before {
  content: '🔍';
  font-size: 1.6rem;
  opacity: 0.5;
}

.emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  font-size: 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.emoji-item:hover {
  background-color: var(--btn-bg);
  transform: scale(1.15);
}

.emoji-item:active {
  transform: scale(0.92);
  background-color: var(--btn-hover);
}

/* Tooltip — appears on top to avoid clipping */
.emoji-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: var(--secondary-color);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 60;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: tooltipFadeIn 0.15s ease;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.emoji-loading,
.emoji-no-results {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.emoji-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: emojiSpin 0.6s linear infinite;
}

@keyframes emojiSpin {
  to { transform: rotate(360deg); }
}

.emoji-no-results::before {
  content: '😕';
  font-size: 1.2rem;
}

/* =========================================================================
   TAG INPUT — Premium Chips + Search Dropdown
   ========================================================================= */
.tag-input-wrapper {
  position: relative;
}

.tag-chips-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 48px;
  border: 1px solid var(--search-border);
  border-radius: var(--radius-md);
  background-color: var(--search-bg);
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tag-chips-container:focus-within {
  border-color: var(--card-hover-border);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--tag-bg), var(--btn-bg));
  color: var(--text-color);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 10px 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  border: 1px solid var(--card-border);
  animation: chipPopIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chipPopIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.tag-chip-remove {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  margin-left: 2px;
}

.tag-chip-remove:hover {
  color: #fff;
  background-color: var(--danger-color);
}

.tag-input-field {
  flex: 1;
  min-width: 80px;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 0.95rem;
  outline: none;
  padding: 4px 0;
}

.tag-input-field::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Tag dropdown with rounded bottom corners */
.tag-input-wrapper.dropdown-open .tag-chips-container {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  border-color: var(--card-hover-border);
}

.tag-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--card-bg);
  border: 1px solid var(--card-hover-border);
  border-top: 1px solid var(--card-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow-y: auto;
  animation: tagDropdownSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .tag-search-dropdown {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

@keyframes tagDropdownSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tag-search-dropdown::-webkit-scrollbar {
  width: 5px;
}

.tag-search-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.tag-search-dropdown::-webkit-scrollbar-thumb {
  background: var(--header-border);
  border-radius: 10px;
}

.tag-search-results {
  padding: 6px;
}

.tag-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s;
  font-size: 0.9rem;
}

.tag-suggest-item:hover {
  background-color: var(--btn-bg);
}

.tag-suggest-item:active {
  background-color: var(--btn-hover);
}

.tag-suggest-name {
  font-weight: 600;
  color: var(--text-color);
}

.tag-suggest-name::before {
  content: '#';
  color: var(--text-muted);
  margin-right: 1px;
}

.tag-suggest-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* =========================================================================
   MOBILE ADJUSTMENTS for Emoji Picker & Tag Input
   ========================================================================= */
@media (max-width: 600px) {
  .emoji-picker-dropdown {
    max-height: 260px;
  }

  .emoji-results {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 2px;
    padding: 6px;
  }

  .emoji-item {
    font-size: 1.3rem;
  }

  /* Hide tooltip on mobile (touch devices) */
  .emoji-item[title]:hover::after {
    display: none;
  }

  .tag-chips-container {
    min-height: 44px;
    padding: 6px 10px;
  }

  .form-actions {
    flex-direction: column;
  }

  .tag-input-wrapper {
    width: 100%;
  }
}

/* =========================================================================
   EDITOR PAGES (Emoji Art Editor & Dot Art Editor)
   ========================================================================= */
.editor-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 80px 16px;
}

.editor-header {
  text-align: center;
  margin-bottom: 28px;
}

.editor-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-color);
  margin-bottom: 8px;
}

.editor-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Toolbar */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toolbar-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-x {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.toolbar-input {
  width: 60px;
  padding: 8px 10px;
  border: 1px solid var(--search-border);
  border-radius: 10px;
  background: var(--search-bg);
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.toolbar-input:focus {
  border-color: var(--card-hover-border);
}

.toolbar-input-wide {
  width: 140px;
  text-align: left;
}

.toolbar-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 1px solid var(--card-border);
  transition: all 0.15s;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background: var(--btn-hover);
  border-color: var(--card-hover-border);
}

.toolbar-btn:active {
  transform: scale(0.97);
}

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

.toolbar-btn-primary:hover {
  opacity: 0.85;
  border-color: transparent;
}

.toolbar-btn-active {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-color: transparent;
}

.toolbar-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: flex-end;
}

/* Brush preview */
.brush-preview {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--btn-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

/* Quick palette */
.quick-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.palette-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--btn-bg);
  cursor: pointer;
  transition: all 0.15s;
}

.palette-btn:hover {
  transform: scale(1.15);
  border-color: var(--card-hover-border);
}

.palette-btn:active {
  transform: scale(0.92);
}

/* Toolbar emoji search dropdown */
.toolbar-emoji-search {
  position: relative;
}

.toolbar-emoji-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  width: 280px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  display: none;
}

.toolbar-emoji-results[style*="block"] {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ter-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.ter-item:hover {
  background: var(--btn-bg);
  transform: scale(1.15);
}

.ter-empty {
  width: 100%;
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================================================
   EMOJI CANVAS (Grid)
   ========================================================================= */
.canvas-wrapper {
  overflow-x: auto;
  padding: 4px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.emoji-canvas {
  display: grid;
  gap: 0;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  max-width: 100%;
  width: fit-content;
  margin: 0 auto;
}

.canvas-cell {
  width: clamp(14px, 2vw, 24px);
  height: clamp(14px, 2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.45rem, 1.3vw, 0.75rem);
  border: 1px solid var(--card-border);
  transition: background-color 0.1s;
  line-height: 1;
  overflow: hidden;
}

.canvas-cell:hover {
  background-color: var(--btn-bg);
}

/* =========================================================================
   DOT CANVAS (Braille)
   ========================================================================= */
.dot-canvas {
  display: grid;
  gap: 0;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  width: fit-content;
  margin: 0 auto;
}

.dot-cell {
  width: clamp(6px, 0.9vw, 10px);
  height: clamp(6px, 0.9vw, 10px);
  border: 1px solid var(--card-border);
  background: transparent;
  border-radius: 1px;
  transition: background-color 0.1s;
}

.dot-cell:hover {
  background-color: var(--btn-hover);
}

.dot-cell.dot-on {
  background-color: var(--text-color);
}

/* =========================================================================
   OUTPUT AREA
   ========================================================================= */
.editor-output {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.output-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--search-border);
  border-radius: 10px;
  background: var(--search-bg);
  color: var(--text-color);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  line-height: 1.2;
}

.output-textarea-mono {
  font-family: "DejaVu Sans Mono", "Segoe UI Symbol", "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0;
  font-variant-ligatures: none;
}

/* =========================================================================
   EDITOR RESPONSIVE
   ========================================================================= */
@media (max-width: 600px) {
  .editor-page {
    padding: 20px 12px 60px 12px;
  }

  .editor-header {
    margin-bottom: 20px;
  }

  .editor-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .editor-subtitle {
    font-size: 0.9rem;
  }

  .editor-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .toolbar-actions {
    margin-left: 0;
    justify-content: stretch;
  }

  .toolbar-actions .toolbar-btn {
    flex: 1;
    text-align: center;
  }

  .toolbar-group {
    width: 100%;
  }

  .toolbar-row {
    flex-wrap: wrap;
  }

  .quick-palette {
    max-width: 100%;
  }

  .canvas-cell {
    width: 12px;
    height: 12px;
    font-size: 0.35rem;
  }

  .dot-cell {
    width: 4px;
    height: 4px;
  }

  .canvas-wrapper {
    padding: 2px;
  }

  .editor-output {
    padding: 12px;
  }

  .output-textarea {
    font-size: 0.85rem;
  }

  /* Generator mobile */
  .gen-upload-area {
    padding: 24px 12px;
  }

  .gen-settings-card {
    padding: 16px;
  }

  .gen-settings-title {
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .canvas-cell {
    width: 10px;
    height: 10px;
    font-size: 0.3rem;
  }

  .dot-cell {
    width: 3px;
    height: 3px;
  }

  .toolbar-btn {
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .toolbar-input {
    width: 50px;
    padding: 7px 8px;
    font-size: 0.85rem;
  }
}

/* Editor copy button spacing */
.editor-copy-btn {
  margin-top: 8px;
}

/* Generator specific */
.gen-upload-btn {
  cursor: pointer;
}

.gen-options-row {
  gap: 12px;
}

.gen-placeholder-icon {
  font-size: 2rem;
  opacity: 0.4;
}

.gen-output-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Toolbar range slider */
.toolbar-range {
  width: 100%;
  accent-color: var(--text-color);
  cursor: pointer;
  height: 6px;
}

/* Toolbar checkbox label */
.toolbar-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-check input[type="checkbox"] {
  accent-color: var(--text-color);
  cursor: pointer;
}

/* Gen preview row */
.gen-preview-row {
  margin-bottom: 20px;
}

.gen-image-preview {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gen-image-preview canvas {
  max-width: 100%;
  max-height: 300px;
  height: auto;
  border-radius: 8px;
}

/* =========================================================================
   DOT ART GENERATOR SPECIFIC
   ========================================================================= */
/* (generator styles moved to gen-* section above) */

.gen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================================================
   DOT ART GENERATOR — Settings & Upload
   ========================================================================= */
.gen-upload-area {
  background: var(--card-bg);
  border: 2px dashed var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  margin-bottom: 20px;
}

.gen-upload-area:hover,
.gen-upload-area.drag-over {
  border-color: var(--card-hover-border);
  background: var(--btn-bg);
}

.gen-upload-area canvas {
  max-width: 100%;
  max-height: 300px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

.gen-tip {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.gen-settings-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.gen-settings-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.gen-settings-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.gen-setting-row {
  margin-bottom: 18px;
}

.gen-setting-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 6px;
  display: block;
}

.gen-setting-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.gen-mode-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.gen-mode-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.15s;
}

.gen-mode-btn:hover {
  background: var(--btn-hover);
}

.gen-mode-btn.gen-mode-active {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-color: transparent;
}

.gen-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gen-slider {
  flex: 1;
  accent-color: var(--text-color);
  cursor: pointer;
  height: 6px;
}

.gen-slider-label-left,
.gen-slider-label-right {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 90px;
}

.gen-slider-label-left {
  text-align: right;
}

.gen-slider-label-right {
  text-align: left;
}

@media (max-width: 600px) {
  .gen-slider-label-left,
  .gen-slider-label-right {
    display: none;
  }

  .gen-mode-btns {
    flex-direction: column;
  }
}

/* ===== Info & Guide Content ===== */
.info-content {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 0 1rem 2rem;
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.info-block h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.info-block p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.info-block ol,
.info-block ul {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.info-block li {
    margin-bottom: 0.35rem;
}

.info-block ol ul {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.info-block kbd {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.85rem;
    font-family: inherit;
}

.info-block a {
    color: var(--accent-color, #6c5ce7);
    text-decoration: none;
}

.info-block a:hover {
    text-decoration: underline;
}

.qa-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--card-border);
}

.qa-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-tools {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.related-tools h2 {
    margin-bottom: 0.5rem;
}

.related-tools ul {
    list-style: none;
    padding-left: 0;
}

.related-tools li {
    margin-bottom: 0.5rem;
}

/* ===== Page Header & Legal Pages ===== */
.legal-card {
    margin-top: 20px;
}

.page-header {
    text-align: left;
    padding-bottom: 20px;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-color);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.legal-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

.legal-body h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 32px 0 16px 0;
}

.legal-body p {
    margin-bottom: 20px;
}

.legal-body ul {
    margin-bottom: 20px;
    padding-left: 1.5rem;
}

.legal-body li {
    margin-bottom: 6px;
}

.legal-body a {
    color: var(--accent-color, #6c5ce7);
    text-decoration: none;
}

.legal-body a:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-extras {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--card-border);
}

.contact-extras h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact-extras ul {
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.contact-extras li {
    margin-bottom: 6px;
}

/* =========================================================================
   COMMUNITY BANNER (low-combo encouragement)
   ========================================================================= */
.community-banner {
  text-align: center;
  padding: 40px 24px;
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-md);
  margin-top: 24px;
}

.community-banner-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.community-banner-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
}

.community-banner-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 20px;
}

.community-banner-btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  transition: opacity 0.2s;
}

.community-banner-btn:hover {
  opacity: 0.85;
}

@media (max-width: 600px) {
  .community-banner {
    padding: 32px 16px;
  }

  .community-banner-title {
    font-size: 1.05rem;
  }

  .community-banner-text {
    font-size: 0.85rem;
  }
}

.community-nudge-top {
  margin-top: 0;
  margin-bottom: 24px;
  border-top: none;
  border-bottom: 1px solid var(--card-border);
}

/* Subtle nudge for pages with 3+ combos */
.community-nudge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--card-border);
}

.community-nudge-emoji {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.community-nudge-link {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.community-nudge-link:hover {
  opacity: 0.7;
}

@media (max-width: 600px) {
  .community-nudge {
    font-size: 0.82rem;
    padding: 14px 12px;
  }
}

/* Inline nudge inside feed */
.community-nudge-inline {
  margin-top: 0;
  border-top: none;
  border-bottom: none;
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
}

/* =========================================================================
   REPORT MODAL
   ========================================================================= */
.report-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: reportFadeIn 0.2s ease;
}

.report-overlay.active {
  display: flex;
}

@keyframes reportFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.report-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  animation: reportSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .report-modal {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@keyframes reportSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.report-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
}

.report-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.15s;
}

.report-close:hover {
  background: var(--btn-bg);
  color: var(--text-color);
}

.report-field {
  margin-bottom: 16px;
}

.report-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.report-field select.form-input,
.report-field textarea.form-input {
  width: 100%;
}

.report-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-captcha span {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.report-captcha .form-input {
  width: 80px;
}

.report-submit {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .report-modal {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .report-modal-header h3 {
    font-size: 1rem;
  }

  .report-field label {
    font-size: 0.8rem;
  }

  .report-captcha {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* =========================================================================
   UTILITY CLASSES (replacing inline styles)
   ========================================================================= */
.honeypot-field {
  position: absolute;
  left: -9999px;
}

.captcha-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.captcha-input {
  width: 80px;
}

.hero-tags-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-right: 8px;
}

.hero-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* =========================================================================
   LEGAL PAGES MOBILE RESPONSIVE
   ========================================================================= */
@media (max-width: 600px) {
  .page-title {
    font-size: 1.6rem;
  }

  .page-subtitle {
    font-size: 0.85rem;
  }

  .legal-body {
    font-size: 0.95rem;
  }

  .legal-body h2 {
    font-size: 1.1rem;
    margin: 24px 0 12px 0;
  }

  .legal-card {
    padding: 16px 14px;
  }

  .contact-extras h2 {
    font-size: 1.05rem;
  }
}

@media (max-width: 400px) {
  .page-title {
    font-size: 1.3rem;
  }

  .legal-body {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .legal-body h2 {
    font-size: 1rem;
  }
}

/* =========================================================================
   INFO CONTENT / FAQ MOBILE RESPONSIVE
   ========================================================================= */
@media (max-width: 600px) {
  .info-content {
    margin-top: 2rem;
    padding: 0 0.5rem 1.5rem;
  }

  .info-block h2 {
    font-size: 1.1rem;
  }

  .info-block h3 {
    font-size: 0.95rem;
  }

  .info-block p,
  .info-block ol,
  .info-block ul {
    font-size: 0.88rem;
  }

  .related-tools {
    padding: 1rem;
    border-radius: 10px;
  }

  .qa-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }
}

/* =========================================================================
   FOOTER MOBILE RESPONSIVE
   ========================================================================= */
@media (max-width: 400px) {
  .footer {
    padding: 24px 12px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }
}

/* =========================================================================
   FAVORITES BUTTON (Header)
   ========================================================================= */
.header-fav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-color);
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.header-fav-btn:hover {
  background-color: var(--btn-bg);
}

.fav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--vote-active);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.fav-badge.has-favs {
  display: flex;
}

/* Random Button (Header) */
.header-random-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-color);
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.header-random-btn:hover {
  background-color: var(--btn-bg);
}

/* =========================================================================
   FAVORITE BUTTON (Card)
   ========================================================================= */
.btn-fav {
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  opacity: 0.6;
}

.btn-fav svg {
  width: 18px;
  height: 18px;
}

.btn-fav .fav-icon-full {
  display: none;
}

.btn-fav:hover {
  opacity: 1;
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
}

.btn-fav.is-fav {
  opacity: 1;
  color: #e74c3c;
}

.btn-fav.is-fav .fav-icon-empty {
  display: none;
}

.btn-fav.is-fav .fav-icon-full {
  display: block;
}

/* =========================================================================
   SHARE BUTTON (Card)
   ========================================================================= */
.btn-share {
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  opacity: 0.6;
}

.btn-share svg {
  width: 18px;
  height: 18px;
}

.btn-share:hover {
  opacity: 1;
  color: var(--search-focus-border);
  background-color: rgba(29, 161, 242, 0.1);
}

/* =========================================================================
   SHARE MODAL
   ========================================================================= */
.share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.share-overlay.active {
  display: flex;
}

.share-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 380px;
  padding: 24px;
  animation: reportSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.share-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s;
  text-decoration: none;
}

.share-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.share-whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #25d366;
}

.share-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
}

.share-x {
  background: var(--btn-bg);
  color: var(--text-color);
}

.share-x:hover {
  background: var(--btn-hover);
}

.share-facebook {
  background: rgba(24, 119, 242, 0.1);
  color: #1877f2;
}

.share-facebook:hover {
  background: rgba(24, 119, 242, 0.2);
}

.share-reddit {
  background: rgba(255, 69, 0, 0.1);
  color: #ff4500;
}

.share-reddit:hover {
  background: rgba(255, 69, 0, 0.2);
}

.share-pinterest {
  background: rgba(230, 0, 35, 0.1);
  color: #e60023;
}

.share-pinterest:hover {
  background: rgba(230, 0, 35, 0.2);
}

/* =========================================================================
   RELATED TAGS SECTION
   ========================================================================= */
.related-tags-section {
  margin-top: 32px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.related-tags-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 14px;
}

.related-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-tag-pill {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.related-tag-pill:hover {
  background: var(--search-focus-border);
  color: #fff;
}

/* =========================================================================
   LOAD MORE BUTTON
   ========================================================================= */
.load-more-wrap {
  text-align: center;
  margin-top: 24px;
}

.btn-load-more {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--text-color);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 48px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-load-more:hover {
  background: var(--btn-hover);
  border-color: var(--card-hover-border);
}

/* Hide combos beyond 100 initially */
.combo-feed .colorful-combo-item:nth-child(n+101),
.combo-feed .community-nudge-inline:nth-child(n+101) {
  display: none;
}

.combo-feed.show-all .colorful-combo-item,
.combo-feed.show-all .community-nudge-inline {
  display: flex;
}

.combo-feed.show-all .community-nudge-inline {
  display: flex;
}

@media (max-width: 600px) {
  .related-tags-section {
    padding: 16px;
    margin-top: 24px;
  }

  .related-tags-title {
    font-size: 1rem;
  }

  .related-tag-pill {
    font-size: 0.82rem;
    padding: 5px 12px;
  }
}

/* =========================================================================
   FANCY TEXT GENERATOR
   ========================================================================= */
.fancy-input-wrap {
  margin-bottom: 32px;
}

.fancy-results,
.fancy-decorate {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.fancy-style-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}

.fancy-style-card:hover {
  border-color: var(--card-hover-border);
}

.fancy-style-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 110px;
  flex-shrink: 0;
}

.fancy-style-preview {
  flex: 1;
  font-size: 1.15rem;
  color: var(--text-color);
  word-break: break-word;
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fancy-style-card .btn-copy-fun {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .fancy-style-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .fancy-style-name {
    min-width: auto;
  }

  .fancy-style-preview {
    font-size: 1rem;
    width: 100%;
  }

  .fancy-style-card .btn-copy-fun {
    align-self: flex-end;
  }
}
