/*
Theme Name: Cool Symbols
Theme URI: https://coolsymbol.cc/
Author: Hayat Ahmad
Description: Single-page symbols & emoji copy-paste site. Ships with 7,241 bundled symbols in 39 categories, live search, one-click copy, tooltips, AdSense slots and a full customizer (branding, colors, labels, content, layout, ads & analytics). Ideal for a coolsymbols-style niche site with no setup.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coolsymbols
Tags: one-column, custom-logo, custom-colors, custom-menu, featured-images, translation-ready
*/

:root {
  --cs-brand: #7c3aed;
  --cs-brand-dark: #6d28d9;
  --cs-brand-light: #f5f3ff;
  --cs-accent: #f43f5e;
  --cs-bg: #faf9fc;
  --cs-ink: #1e1b2e;
  --cs-muted: #64748b;
  --cs-header-bg: #181226;
  --cs-header-link: #ddd6fe;
  --cs-cols: 8;
  --cs-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cs-bg);
  color: var(--cs-ink);
  font-family: var(--cs-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cs-brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  color: var(--cs-ink);
}

/* ---------- Header ---------- */

.cs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cs-header-bg);
  box-shadow: 0 4px 14px rgba(24, 18, 38, 0.25);
}

.cs-header__row {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cs-brand:hover {
  color: #fff;
  text-decoration: none;
}

.cs-brand__logo {
  width: 28px;
  height: 28px;
  display: inline-block;
  flex: none;
}

.cs-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cs-header-link);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-search-toggle:hover,
.cs-search-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

.cs-search-toggle__text {
  display: none;
}

@media (min-width: 700px) {
  .cs-search-toggle__text {
    display: inline;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--cs-header-link);
  }
}

.cs-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.cs-strip::-webkit-scrollbar {
  display: none;
}

.cs-strip__link {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cs-header-link);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-strip__link:hover,
.cs-strip__link:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  outline: none;
}

.cs-strip__link.cs-active {
  background: var(--cs-brand);
  color: #fff;
}

/* ---------- Hero & search ---------- */

.cs-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.cs-hero {
  text-align: center;
  padding: 48px 0 28px;
}

.cs-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cs-hero p {
  max-width: 640px;
  margin: 8px auto 0;
  color: var(--cs-muted);
  font-size: 1.0625rem;
}

.cs-search {
  position: relative;
  max-width: 620px;
  margin: 28px auto 0;
  text-align: left;
}

.cs-search__input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--cs-ink);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cs-search__input:focus {
  border-color: var(--cs-brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.cs-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 18, 38, 0.18);
  padding: 8px;
  display: none;
}

.cs-search__results.cs-open {
  display: block;
}

.cs-search__hint,
.cs-search__empty {
  margin: 0;
  padding: 12px 14px;
  color: var(--cs-muted);
  font-size: 0.875rem;
  text-align: center;
}

.cs-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cs-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}

.cs-result:hover,
.cs-result:focus-visible {
  background: var(--cs-brand-light);
  outline: none;
}

.cs-result__ch {
  width: 34px;
  flex: none;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1;
}

.cs-result__meta {
  min-width: 0;
}

.cs-result__name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cs-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-result__group {
  display: block;
  font-size: 0.75rem;
  color: var(--cs-muted);
}

/* ---------- Sections & chips ---------- */

.cs-container {
  max-width: 1080px;
  margin: 0 auto;
}

.cs-categories__label {
  margin: 36px 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-brand);
}

.cs-board {
  margin-top: 24px;
}

.cs-board__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 2px;
  font-size: 1.15rem;
  font-weight: 700;
}

.cs-board__count {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--cs-muted);
}

.cs-board__desc {
  margin: 0 0 14px;
  color: var(--cs-muted);
  font-size: 0.9375rem;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(var(--cs-cols), 1fr);
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: var(--cs-ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cs-chip:hover,
.cs-chip:focus-visible {
  background: var(--cs-brand-light);
  border-color: var(--cs-brand);
  outline: none;
}

.cs-chip.cs-emoji {
  font-size: 2.25rem;
}

.cs-chip.cs-emoji-normal {
  font-size: 1.5rem;
}

.cs-chip.cs-tip {
  position: relative;
}

.cs-chip.cs-tip::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  z-index: 30;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 6px;
  background: #1e293b;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cs-chip.cs-tip:hover::after,
.cs-chip.cs-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cs-view-all {
  margin-top: 14px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: var(--cs-brand);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cs-view-all:hover,
.cs-view-all:focus-visible {
  background: var(--cs-brand-light);
  outline: none;
}

/* ---------- Ads ---------- */

.cs-ad {
  margin: 32px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.04);
}

.cs-ad ins {
  display: block;
}

/* ---------- About ---------- */

.cs-about {
  margin-top: 48px;
  padding: 28px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.cs-about h2 {
  margin-bottom: 8px;
}

.cs-about p {
  margin: 0;
  color: var(--cs-muted);
  max-width: 720px;
}

/* ---------- Footer ---------- */

.cs-footer {
  margin-top: 48px;
  background: var(--cs-header-bg);
  color: var(--cs-header-link);
  padding: 40px 16px 28px;
}

.cs-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .cs-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.cs-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-footer__logo {
  width: 36px;
  height: 36px;
}

.cs-footer__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.cs-footer__desc {
  margin: 8px 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.cs-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.cs-footer__menu a {
  color: var(--cs-header-link);
  font-size: 0.875rem;
}

.cs-footer__menu a:hover {
  color: #fff;
}

.cs-footer__bottom {
  max-width: 1080px;
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: var(--cs-header-link);
  text-align: center;
}

/* ---------- Toast & scroll top ---------- */

.cs-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

.cs-scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--cs-brand);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
  transition: background 0.15s ease, opacity 0.15s ease;
}

.cs-scroll-top:hover,
.cs-scroll-top:focus-visible {
  background: var(--cs-brand-dark);
  outline: none;
}

.cs-scroll-top.cs-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Pages (page.php / index.php) ---------- */

.cs-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px;
}

.cs-entry__title {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 800;
}

.cs-entry__content p {
  color: #334155;
  line-height: 1.7;
}

.cs-result--group {
  font-weight: 700;
  color: var(--cs-brand);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  :root {
    --cs-cols: 6;
  }
}

@media (max-width: 700px) {
  :root {
    --cs-cols: 5;
  }
}

@media (max-width: 480px) {
  :root {
    --cs-cols: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .cs-chip.cs-tip::after,
  .cs-toast,
  .cs-scroll-top {
    transition: none;
  }
}