/* Base Custom Styles */
:root {
    --emoji-hover-bg: #fdf8f6;
    --emoji-hover-border: #f2e8e5;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism Header */
.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass-header {
    background: rgba(17, 24, 39, 0.85); /* gray-900 with opacity */
}

/* Custom Scrollbar for better UI */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: #374151; /* gray-700 */
}
 
::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 8px;
    border: 2px solid #f1f1f1;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280; /* gray-500 */
    border-color: #374151;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af; /* gray-400 */
}

/* Emoji Button Styles & Animations */
.emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    background-color: transparent;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.emoji-btn:hover {
    background-color: var(--emoji-hover-bg);
    border-color: var(--emoji-hover-border);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 112, 90, 0.1);
    z-index: 10;
}

.dark .emoji-btn:hover {
    background-color: #374151; /* gray-700 */
    border-color: #4b5563; /* gray-600 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

/* Animation for the copy toast */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-1rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hide scrollbar for textarea but allow scrolling */
textarea {
    scrollbar-width: thin;
}

/* Hide default marker on summary tags across browsers */
summary::-webkit-details-marker {
    display: none;
}
summary {
    list-style: none;
}

#lang-menu {
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

/* Symbol Button Styles */
.symbol-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    background-color: transparent;
    border: 1px solid rgba(229, 231, 235, 0.8);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    color: inherit;
    flex-shrink: 0;
}

.dark .symbol-btn {
    border-color: rgba(55, 65, 81, 0.8);
}

.symbol-btn:hover {
    background-color: var(--emoji-hover-bg);
    border-color: #d2bab0;
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 112, 90, 0.15);
    z-index: 10;
}

.dark .symbol-btn:hover {
    background-color: #374151;
    border-color: #6b7280;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

/* Kaomoji Buttons */
.kaomoji-btn {
    width: auto !important;
    min-width: 4rem;
    padding: 0 0.875rem;
    font-size: 1.05rem;
    font-family: inherit;
    white-space: nowrap;
}

/* Category Pills */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.category-pill.active {
    background-color: #8c5b49;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(140, 91, 73, 0.3);
}

.dark .category-pill.active {
    background-color: #a3705a;
    color: #ffffff;
}

.category-pill:not(.active) {
    background-color: #f3f4f6;
    color: #4b5563;
}

.dark .category-pill:not(.active) {
    background-color: #1f2937;
    color: #9ca3af;
}

.category-pill:not(.active):hover {
    background-color: #e5e7eb;
    color: #111827;
}

.dark .category-pill:not(.active):hover {
    background-color: #374151;
    color: #f3f4f6;
}
