/* FunEmojis.app - Clean, Modern Light Mode Aesthetic Styles */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent: #ec4899;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f43f5e 100%);
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --emoji-hover-bg: #eef2ff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism Surface */
.glass-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Gradient Text Effect */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Emoji Button Animation */
.emoji-btn {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
  user-select: none;
  cursor: pointer;
}

.emoji-btn:hover {
  transform: scale(1.32);
  z-index: 10;
}

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

/* Ripple Click Animation */
.emoji-btn.clicked {
  animation: clickRipple 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes clickRipple {
  0% {
    transform: scale(0.85);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  50% {
    transform: scale(1.25);
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* Size Variants */
.grid-compact .emoji-btn {
  font-size: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
}

.grid-standard .emoji-btn {
  font-size: 2rem;
  width: 3.5rem;
  height: 3.5rem;
}

.grid-large .emoji-btn {
  font-size: 2.75rem;
  width: 4.5rem;
  height: 4.5rem;
}

/* Toast Notification */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Category Pills Navigation (Clean Wrapped Chips) */
.category-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
}

.category-pill:not(.active):hover {
  border-color: #6366f1;
  color: #4338ca;
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.category-pill.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

/* Top Navbar Navigation Tabs & Hover */
.nav-tab-btn {
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.nav-tab-btn:not(.active-tab) {
  color: #475569;
  background-color: transparent;
}

.nav-tab-btn:not(.active-tab):hover {
  color: #4338ca !important;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.nav-tab-btn.active-tab {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.nav-tab-btn.active-tab:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
  transform: translateY(-1px);
}

/* Navbar Controls (Skin tone & Language Select) Hover */
#skin-tone-select, #lang-select {
  border-color: #cbd5e1;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

#skin-tone-select:hover, #lang-select:hover {
  border-color: #6366f1;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

/* Fancy Font Preview Box */
.font-row {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.font-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Kaomoji Button Hover */
.kaomoji-btn {
  transition: all 0.15s ease;
}

.kaomoji-btn:hover {
  transform: scale(1.05);
}

/* Smooth Accordion FAQ for SEO */
details summary::-webkit-details-marker {
  display: none;
}

details[open] summary svg {
  transform: rotate(180deg);
}

/* Hero Workspace Textarea */
.workspace-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Custom Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 11px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Modal Animation */
#emoji-modal:not(.hidden) > div:last-child {
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Directory Table Hover & Animations */
#list-table-body tr {
  transition: background-color 0.15s ease;
}

.list-emoji-btn:hover {
  transform: scale(1.25);
}
