/* Base Theme Tokens */
:root {
  /* light theme (closer to gitmoji.dev feel) */
  --bg: #fff;
  --fg: #1f2937;
  --muted: #999;
  --card: #ffffff;
  --border: #e6e8eb;
  --link: #0000ff;
  --accent: #f59e0b; /* subtle amber accent like the ✨ */
  --emoji-bg: #f9fafb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.3);
  --shadow-lg: 0 8px 12px rgba(16, 24, 40, 0.3);
  /* code pill (gitmoji.dev-like) */
  --code-bg: #f6f8fa;
  --code-border: #d0d7de;
  --code-fg: #57606a;

  /* per-type stripe colors are set dynamically from emojis.json in script.js */
}

:root[data-theme="dark"] {
  /* dark theme similar to github/gitmoji dark */
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #9aa7b2;
  --card: #161b22;
  --border: #30363d;
  --link: #2f81f7;
  --accent: #f59e0b;
  --emoji-bg: #0f141a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  /* code pill dark */
  --code-bg: rgba(110, 118, 129, 0.15);
  --code-border: #30363d;
  --code-fg: #8b949e;

  /* stripe colors are set dynamically from emojis.json in script.js */
}

/* Global */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Quicksand", sans-serif, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  top: 0;
  background:#ffdd67;
  border-bottom: 1px solid var(--border);
  z-index: 10;
  color: #000;
  text-align: center;
  padding-top: 32px;
  padding-bottom: 32px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.site-title {
  font-size: 52px;
  font-weight: 500;
  margin: 0;
}

.site-title span {
  display: block;
}

.site-title-highlight {
  font-size: 82px;
  font-weight: 700;
  padding: none;
  margin-top: -40px;
}
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 10px;
}
.theme-toggle:hover { filter: brightness(1.02); }

/* Intro */
.intro {
  margin: 32px 0 12px;
  color: var(--muted);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 20px 0 48px;
}

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

.card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border-radius: 4px;
  padding: 8px;
  min-height: 132px;
  padding-left: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
  position: relative;
  overflow: hidden;
  outline: none;
}

.card[role="button"] { cursor: pointer; }
.card[role="button"]:active { outline: none; }
.card[role="button"]:focus { outline: none; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
/* .card[data-copied="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent) inset, var(--shadow-lg); } */

/* Colored stripe behind emoji is set inline in script.js */

.card > * { position: relative; z-index: 1; }

/* Ensure text doesn't overlap colored stripe */
.card .content { padding-left: 4px; }
.emoji {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  font-size: 54px;
  line-height: 1;
}
.emoji[role="button"] { cursor: pointer; }
.emoji[data-copied="true"] { filter: saturate(140%); transform: scale(1.05); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.content { flex: 1; min-width: 0; }
.label {
  font-family: "Nunito Sans", sans-serif;
  font-size: 24px;
  margin: 0 0 0 0;
  font-weight: 700;
}
.label .name {
  position: relative;
  display: inline-block;
}
.label .name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 160ms ease, transform 160ms ease;
}
/* accent underline uses stripe color from emojis.json */
.card .label .name::after { background: var(--stripe-color, currentColor); }
.card:hover .label .name::after,
.card:focus-within .label .name::after { opacity: 1; transform: scaleX(1); }
.description {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
  text-align: center;
}

.note {
  font-size: 12px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%) translateY(-20px);
  background: var(--fg);
  color: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show {
  opacity: 0.95;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9aa7b2;
    --card: #161b22;
    --border: #30363d;
    --link: #2f81f7;
    --accent: #f59e0b;
    --emoji-bg: #0f141a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}


