:root {
    --cor-primaria: #28a745; 
    --cor-secundaria: #218838; 
    --cor-destaque: #ffc107; 
    --cor-fundo: #e9ecef; 
    --cor-card-fundo: #ffffff;
    --cor-texto: #343a40; 
    --cor-texto-claro: #f8f9fa;
    --cor-borda: #dee2e6;
    --cor-codigo-fundo: #282c34;
    --cor-codigo-texto: #abb2bf;
    --sombra-leve: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --sombra-media: 0 1rem 2rem rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--cor-texto);
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

header {
    background-image: linear-gradient(to right, var(--cor-primaria), var(--cor-secundaria));
    color: var(--cor-texto-claro);
    padding: 40px 0;
    text-align: center;
    box-shadow: var(--sombra-media);
    position: relative;
    overflow: hidden; 
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 70%);
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50%, 50%); }
}

header h1 {
    font-size: 3.5em;
    margin: 0;
    color: var(--cor-texto-claro);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative; 
    z-index: 1;
}

header p {
    margin: 10px 0 0;
    font-size: 1.2em;
    font-weight: 300;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 40px auto;
    padding: 20px;
}

.introducao {
    background-color: var(--cor-card-fundo);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--sombra-leve);
    margin-bottom: 30px;
    border-left: 6px solid var(--cor-destaque);
    animation: fadeIn 1s ease-out;
}

.introducao h2 {
    color: var(--cor-primaria);
    font-size: 2.2em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.introducao h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--cor-destaque);
    border-radius: 2px;
}

.search-bar {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--sombra-leve);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.search-bar i {
    font-size: 1.5em;
    color: var(--cor-primaria);
    margin-right: 15px;
}

.search-bar input {
    flex-grow: 1;
    padding: 12px 15px;
    font-size: 1.1em;
    border: 2px solid var(--cor-borda);
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--cor-destaque);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.macros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.macro-card {
    background-color: var(--cor-card-fundo);
    border-radius: 12px;
    box-shadow: var(--sombra-leve);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out forwards;
    opacity: 0; 
}

.macro-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sombra-media);
}

.macro-card h3 {
    color: var(--cor-secundaria);
    font-size: 1.8em;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.macro-card h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--cor-destaque);
    border-radius: 1.5px;
}

/* --- ESTILOS PARA VÍDEO MP4 RESPONSIVO --- */
.demonstracao {
    margin-top: 25px;
    margin-bottom: 25px;
}

.demonstracao p {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--cor-secundaria);
}

.video-responsive-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-responsive-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- CÓDIGO VBA --- */
.codigo-vba-wrapper {
    margin-top: 25px;
}

.codigo-vba {
    background-color: var(--cor-codigo-fundo);
    color: var(--cor-codigo-texto);
    padding: 0; 
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    font-family: 'Consolas', 'Fira Code', 'Monaco', monospace;
    font-size: 0.95em;
    line-height: 1.4;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: max-height 0.5s ease-in-out; 
    max-height: 80px; 
    opacity: 0.8;
}

.codigo-vba.expanded {
    max-height: 1000px; 
    opacity: 1;
}

.codigo-vba pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

/* --- Destaque VBA --- */
.vba-keyword { color: #569cd6; font-weight: 600; } 
.vba-type { color: #4ec9b0; } 
.vba-function { color: #dcdcaa; } 
.vba-comment { color: #6a9955; font-style: italic; } 
.vba-operator { color: #d4d4d4; } 
.vba-string { color: #ce9178; } 

.toggle-code-btn {
    background-color: #f1f1f1;
    color: var(--cor-texto);
    border: 1px solid var(--cor-borda);
    padding: 8px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s, color 0.3s;
    display: block;
    width: 100%;
    text-align: left;
}

.toggle-code-btn:hover {
    background-color: var(--cor-destaque);
    color: var(--cor-texto);
}

.macro-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.utility-counter {
    display: flex;
    align-items: center;
    font-size: 1em;
    color: var(--cor-texto);
}

.btn-utility {
    background: none;
    border: none;
    color: var(--cor-primaria);
    font-size: 1.1em;
    cursor: pointer;
    margin-right: 8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-utility:hover {
    color: var(--cor-destaque);
    transform: scale(1.1);
}

.btn-utility.voted {
    color: #17a2b8; 
}

.btn-copiar {
    background-color: var(--cor-primaria);
    color: var(--cor-texto-claro);
    border: none;
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    font-weight: 600;
}

.btn-copiar i {
    margin-right: 8px;
}

.btn-copiar:hover {
    background-color: var(--cor-secundaria);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-copiar:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.macro-indisponivel {
    text-align: center;
    padding: 40px;
    background-color: #fdf3e2; 
    border-left: 6px solid var(--cor-destaque);
    color: #725700;
    border-radius: 12px;
    font-style: italic;
    margin-top: 30px;
}

.macro-indisponivel i {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--cor-destaque);
}

/* --- BOTÃO VOLTAR AO TOPO --- */
#btn-topo {
    display: none; 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    z-index: 99; 
    border: none; 
    outline: none; 
    background-color: var(--cor-destaque); 
    color: var(--cor-texto); 
    cursor: pointer; 
    padding: 15px; 
    border-radius: 50%; 
    font-size: 1.5em; 
    box-shadow: var(--sombra-media);
    transition: opacity 0.3s, transform 0.3s;
}

#btn-topo:hover {
    background-color: #ffda6a;
    transform: translateY(-3px);
}

/* --- ANIMAÇÕES --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }

    header p {
        font-size: 1em;
    }

    .container {
        margin: 20px auto;
        padding: 10px;
    }

    .introducao {
        padding: 25px;
    }

    .introducao h2 {
        font-size: 1.8em;
    }

    .macro-card {
        padding: 20px;
    }

    .macro-card h3 {
        font-size: 1.5em;
    }
    
    .btn-copiar {
        width: 100%;
        font-size: 1em;
        padding: 10px 15px;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar i {
        margin-bottom: 10px;
        margin-right: 0;
        text-align: center;
    }
}

/* --- CORREÇÃO FINAL DE LISTAS (SEM BARRAS PRETAS) --- */
ul, ol {
    list-style: none !important;
    list-style-image: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    background: none !important;
}

li {
    background: none !important;
    list-style: none !important;
    list-style-image: none !important;
    position: relative;
    padding-left: 0 !important;
}

.instrucoes ol {
    list-style-type: decimal !important;
    list-style-position: inside !important;
    background: none !important;
}