:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-header: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --shadow: rgba(0, 0, 0, 0.4);
    --code-bg: #161b22;
    --success: #3fb950;
    --card-bg: #0d1117;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-header: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --accent: #0366d6;
    --accent-hover: #0256c7;
    --shadow: rgba(0, 0, 0, 0.1);
    --code-bg: #f6f8fa;
    --success: #28a745;
    --card-bg: #ffffff;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
}

/* Reading Bar */
.reading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

.reading-bar-progress {
    height: 100%;
    width: 0;
    background: var(--gradient);
    transition: width 0.1s ease-in-out;
}

#readingProgress {
    height: 100%;
    width: 0;
    background: var(--gradient);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.dê-uma-estrela {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.dê-uma-estrela:hover {
    color: var(--code-bg);
}

.dê-uma-estrela:active {
    transform: scale(0.95);
}

/* Code Example */
.code-example {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.code-example::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #7c3aed);
}

.code-example pre {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    overflow-x: auto;
    color: var(--text-primary);
}

.code-example code {
    color: var(--text-primary);
}

/* Section */
.section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Search Box */
.search-box {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Table */
.emoji-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.emoji-table thead {
    background: var(--bg-secondary);
}

.emoji-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.emoji-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-primary);
}

.emoji-table td code {
    background: var(--code-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

.emoji-table tr:last-child td {
    border-bottom: none;
}

.emoji-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Emoji Grid */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.emoji-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.emoji-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
    border-color: var(--accent);
}

.emoji-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.emoji-info {
    flex: 1;
}

.emoji-code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 0.25rem;
}

/* Copy Button */
.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 6px;
}

.copy-btn:hover {
    background: var(--bg-secondary);
    color: var(--accent);
    transform: scale(1.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: transparent;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow);
    background: transparent;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    margin-top: 4rem;
    padding: 3rem 0;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
        gap: 3rem;
    }
}

.footer-column h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-column h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column h4:not(:first-child) {
    margin-top: 1.5rem;
}

.footer-column p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-primary);
    transform: translateY(-2px);
}

.svg-footer {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-highlight {
    color: var(--text-primary);
    font-weight: 500;
}
.meuWebsite {
    font-family: "Oleo Script", system-ui;
    font-weight: 400;
    font-style: normal;
    font-size: 1.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .emoji-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .theme-toggle-btn {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .emoji-table {
        font-size: 0.9rem;
    }

    .emoji-table th,
    .emoji-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo span {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .emoji-table {
        font-size: 0.85rem;
    }

    .emoji-card {
        padding: 1rem;
    }

    .emoji-icon {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

::-moz-selection {
    background: var(--accent);
    color: white;
}

/* Focus Styles */
button:focus,
input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Smooth Transitions */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {

    .header-actions,
    .back-to-top,
    .search-box,
    .copy-btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .emoji-table,
    .emoji-card {
        border: 1px solid #000;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }

    [data-theme="light"] {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}

/* Additional Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Button Styles */
button {
    font-family: inherit;
}

/* Link Styles */
a {
    color: var(--accent);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Code Blocks */
pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    font-family: 'Courier New', Consolas, Monaco, monospace;
}

/* Table Responsive */
@media (max-width: 768px) {
    .emoji-table thead {
        display: none;
    }

    .emoji-table,
    .emoji-table tbody,
    .emoji-table tr,
    .emoji-table td {
        display: block;
        width: 100%;
    }

    .emoji-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.5rem;
    }

    .emoji-table td {
        text-align: right;
        padding: 0.5rem;
        position: relative;
        border: none;
    }

    .emoji-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        font-weight: bold;
        text-align: left;
        color: var(--text-secondary);
    }

    .emoji-table td:first-child {
        font-weight: bold;
        text-align: left;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.75rem;
    }

    .emoji-table td:first-child::before {
        content: '';
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

/* Loading State */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--accent);
    color: white;
}

/* Card Hover Effects */
.emoji-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.emoji-card:hover::before {
    opacity: 0.05;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .code-example {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .emoji-table {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .emoji-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .emoji-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* Alert Box */
.alert-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--accent);
    background: var(--bg-secondary);
}

.alert-box.info {
    border-left-color: #17a2b8;
}

.alert-box.warning {
    border-left-color: #ffc107;
}

.alert-box.error {
    border-left-color: #dc3545;
}

.alert-box.success {
    border-left-color: var(--success);
}

/* Stats Counter */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.category-tag {
    padding: 0.35rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.category-tag:hover,
.category-tag.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results-text {
    font-size: 1.1rem;
}

/* Keyboard Shortcuts Hint */
.keyboard-hint {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Success Message */
.success-message {
    color: var(--success);
    font-weight: 500;
}

/* Error Message */
.error-message {
    color: #dc3545;
    font-weight: 500;
}

/* Smooth appearance for dynamically added elements */
.dynamic-element {
    animation: fadeIn 0.3s ease;
}

/* Toggle Theme Button */
.theme-toggle-btn {
    /* Posicionamento Flutuante */
    position: fixed;
    top: 20px;
    /* Distância do topo */
    right: 20px;
    /* Distância da direita */
    z-index: 9999;
    /* Garante que fique acima de fotos e menus */

    /* Estilo e Tamanho */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Deixa ele redondinho */
    border: none;
    cursor: pointer;

    /* Cores (Usando a paleta da Padaria para ficar harmônico) */
    background-color: #FDF5E6;
    /* Cor creme/clara */
    color: #4E342E;
    /* Cor café para o ícone */

    /* Sombra para dar destaque (efeito 3D suave) */
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);

    /* Centralizar o ícone sol/lua */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    /* Tamanho do ícone */

    /* Animação suave ao passar o mouse */
    transition: all 0.3s ease;
}

/* Efeito ao passar o mouse (Hover) */
.theme-toggle-btn:hover {
    transform: scale(1.1);
    /* Aumenta um pouquinho */
    color: #fff;
    /* Ícone fica branco */
    box-shadow: 0 6px 15px rgba(217, 142, 50, 0.4);
    /* Sombra dourada */
}

/* Ajuste para Mobile (opcional, para não cobrir nada importante em telas pequenas) */
@media (max-width: 768px) {
    .theme-toggle-btn {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}