:root {
    --primary-color: #8B5CF6;
    --primary-color-dark: #6D28D9;
    --secondary-color: #EC4899;
    --accent-color: #22D3EE;
    
    --bg-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-bg-dark: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --sidebar-bg-light: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    
    --text-color: #334155;
    --text-light: #F1F5F9;
    --text-muted: #94A3B8;
    --header-text: #FFFFFF;
    
    /* CORES PERSONALIZADAS PARA SIDEBAR */
    --sidebar-title-color: #FFFFFF;
    --sidebar-category-color: #FFFFFF;
    --sidebar-link-color: #FFFFFF;
    --sidebar-link-hover-color: #FFFFFF;
    --sidebar-link-active-color: #FFFFFF;
    
    --border-color: rgba(255, 255, 255, 0.2);

    --main-gradient: linear-gradient(120deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --hover-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    --card-hover-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);

    --sidebar-width: 280px;
    --header-height: 80px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    
    /* Scrollbar variables */
    --scrollbar-width: 4px;
    --scrollbar-track: rgba(255, 255, 255, 0.02);
    --scrollbar-thumb: linear-gradient(45deg, rgba(139, 92, 246, 0.8), rgba(236, 72, 153, 0.8));
    --scrollbar-thumb-hover: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

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

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 2px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

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

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.8) transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(-45deg, #667eea, #764ba2, #8B5CF6, #EC4899);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

h1 {
    background: var(--main-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg-dark);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #374151;
}

.sidebar-header i {
    color: var(--accent-color) !important;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    color: var(--sidebar-title-color);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav .category-title {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--sidebar-category-color);
    padding: 1rem 1.5rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-link-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    margin: 2px 8px 2px 0;
}

.sidebar-nav .nav-item a span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav .nav-item a:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.1));
    color: var(--sidebar-link-hover-color);
    border-left: 3px solid var(--primary-color);
    transform: translateX(4px);
    text-decoration: none;
}

.sidebar-nav .nav-item a.active {
    background: linear-gradient(to right, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0));
    color: var(--sidebar-link-active-color);
    font-weight: bold;
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav .nav-item a.active .lucide {
    color: var(--accent-color);
}

.sidebar-nav .lucide {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.sidebar-nav .nav-item a:hover .lucide {
    color: var(--sidebar-link-hover-color);
}

.content-area {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 2rem 3rem;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    color: var(--header-text);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.content-header p {
    font-size: 1.1rem;
    color: #e0e7ff;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: var(--text-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    display: flex;
    flex-direction: column;
}

.category-card .card-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.category-card p {
    font-size: 0.9rem;
    color: #64748B;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.category-card a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    height: 100%;
}

/* MELHORIAS PARA MOBILE */

/* Menu hambúrguer para mobile */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.mobile-menu-toggle:hover {
    background: var(--primary-color-dark);
}

/* Overlay para mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Media Queries Melhoradas */

/* Tablets */
@media (max-width: 992px) {
    .sidebar { 
        width: 70px; 
    }
    .sidebar-header h2, 
    .sidebar-nav .category-title, 
    .sidebar-nav .nav-item span { 
        display: none; 
    }
    .sidebar-header { 
        justify-content: center; 
    }
    .sidebar-nav .nav-item a { 
        justify-content: center; 
        border-left: none; 
    }
    .sidebar-nav .nav-item a.active { 
        background: var(--primary-color-dark); 
        border-left: none; 
    }
    .content-area { 
        margin-left: 70px; 
        width: calc(100% - 70px); 
        padding: 1.5rem; 
    }
    
    /* Ajustes de fonte para tablets */
    .content-header h1 { 
        font-size: 2rem; 
    }
    .content-header p { 
        font-size: 1rem; 
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .app-layout { 
        flex-direction: column; 
    }
    
    .sidebar {
        position: fixed;
        width: 280px;
        height: 100vh;
        left: -280px;
        top: 0;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .content-area { 
        margin-left: 0; 
        width: 100%; 
        padding: 4rem 1rem 1rem 1rem;
    }
    
    /* Ajustes de fonte para mobile */
    .content-header h1 { 
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .content-header p { 
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    /* Grid responsivo para mobile */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Cards otimizados para mobile */
    .card {
        padding: 1.25rem;
    }
    
    .category-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .category-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .category-card .card-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0.75rem;
    }
}

/* Mobile pequeno (iPhone SE, etc.) */
@media (max-width: 480px) {
    .content-area {
        padding: 4rem 0.75rem 1rem 0.75rem;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .content-header p {
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .category-card h3 {
        font-size: 1rem;
    }
    
    .category-card p {
        font-size: 0.8rem;
    }
}

/* Resto do CSS original mantido */
.utility-container {
    max-width: 900px;
}

.utility-container .card {
    padding: 2rem;
}

textarea, input[type="text"], input[type="number"], input[type="color"], input[type="file"], input[type="date"], input[type="datetime-local"], select {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #FFFFFF;
    color: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button {
    color: var(--header-text);
    border: none;
    cursor: pointer;
    font-weight: bold;
    background: var(--main-gradient);
    background-size: 200% auto;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background-position: right center;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
    transform: translateY(-3px);
}

.output-area {
    background-color: #FFFFFF;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    min-height: 50px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    border: 1px dashed var(--border-color);
    color: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.welcome-card {
    text-align: center;
    padding: 3rem;
    border: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.welcome-card h2 {
    background: var(--main-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Classes utilitárias */
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-05 { gap: 0.5rem; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.w-full { width: 100%; }
.h-auto { height: auto; }
.text-center { text-align: center; }
.font-bold { font-weight: bold; }
.font-mono { font-family: monospace; }
.whitespace-normal { white-space: normal; }
.bg-subtle { background-color: var(--bg-color); }
.cursor-pointer { cursor: pointer; }
.rounded { border-radius: 8px; }
.p-0 { padding: 0; }
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 1rem !important; }
.mt-1-5 { margin-top: 1.5rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mb-05 { margin-bottom: 0.5rem !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-1-5 { margin-bottom: 1.5rem !important; }
.my-2 { margin-top: 2rem; margin-bottom: 2rem; }
.p-2 { padding: 2rem; }
.d-block { display: block; }

/* Resto das classes específicas mantidas */
.generator-layout { display: flex; gap: 2rem; }
.generator-controls { flex: 1; }
.generator-preview-area { flex: 1; display: grid; place-items: center; }
.box-shadow-preview { width: 150px; height: 150px; background-color: var(--secondary-color); border-radius: 8px; }
.control-group { margin-bottom: 1rem; }
.control-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
.control-group input { margin-bottom: 0; }
.color-picker-wrapper { display: flex; gap: 2rem; align-items: center; }
.color-input-widget { width: 100px; height: 100px; padding: 0; border: none; cursor: pointer; }
.color-values-display { flex-grow: 1; }
.hr-separator { margin: 2rem 0; border: none; border-top: 1px solid var(--border-color); }
#output.monospace-normal { font-family: monospace; white-space: normal; }
.copy-feedback { font-size: 0.9em; color: var(--primary-color); }

.grid-cols-2 { grid-template-columns: 1fr 1fr; }
.grid-cols-auto-fit { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-cols-3-special { grid-template-columns: 1fr auto 1fr; }

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.emoji-item {
    font-size: 2rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 5px;
    border-radius: 4px;
}

.emoji-item:hover {
    transform: scale(1.2);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.bmi-result strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.bmi-underweight { background-color: #FEF3C7; color: #92400E; border-color: #FBBF24; }
.bmi-normal { background-color: #D1FAE5; color: #065F46; border-color: #34D399; }
.bmi-overweight { background-color: #FEF3C7; color: #92400E; border-color: #FBBF24; }
.bmi-obese { background-color: #FEE2E2; color: #991B1B; border-color: #F87171; }

.nav-icon-sm { width: 20px; height: 20px; margin-right: 10px; margin-bottom: 1rem; }
.color-input-widget-sm { height: 40px !important; padding: 5px !important; width: 100%; }

.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #374151;
    color: #e0e7ff;
    font-size: 0.9rem;
}

.site-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.site-footer nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

@media (max-width: 768px) {
    .site-footer .footer-content {
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
        text-align: center;
    }
    
    .generator-layout { 
        flex-direction: column; 
    }
}

#content-render h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}
#content-render h4 {
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    font-size: 1.2rem;
}
#content-render ul, #content-render ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
#content-render p, #content-render li {
    line-height: 1.7;
}
#content-render table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
#content-render th, #content-render td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}
#content-render th {
    background-color: var(--bg-color);
}
#content-render code {
    background-color: #e0e7ff;
    color: var(--text-color);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
}

