/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Seções principais */
.info-section, .recommendations, .prompts-section, .usage-section {
    background: white;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.info-section h2, .recommendations h2, .prompts-section h2, .usage-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

/* Contributors */
.contributors {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.contributors h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.contributors ul {
    list-style: none;
    margin-bottom: 15px;
}

.contributors li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.contributors li:last-child {
    border-bottom: none;
}

/* Platform info */
.platform-info, .safety-info {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #3498db;
}

.safety-info {
    background: #fff3cd;
    border-left-color: #ffc107;
}

/* Acordeões */
.category {
    margin-bottom: 40px;
}

.category h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 10px;
}

.accordion-item {
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.accordion-header {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    position: relative;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header.active {
    background: #3498db;
    color: white;
}

.accordion-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.accordion-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-left: 15px;
    flex-grow: 1;
}

.accordion-header.active .accordion-description {
    color: rgba(255,255,255,0.8);
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.accordion-content.active {
    max-height: 2000px;
    padding: 25px;
}

/* Code containers */
.code-container {
    margin: 20px 0;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
}

.code-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-header span {
    font-weight: 600;
}

.copy-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: #27ae60;
}

/* CÓDIGO CORRIGIDO PARA BARRA DE ROLAGEM */
.code-block {
    background: #f8f9fa;
    padding: 20px;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    
    /* CONFIGURAÇÕES DE ROLAGEM - CORRIGIDAS */
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    
    /* Força a criação do contexto de rolagem */
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    
    /* Estilo da borda */
    border: 1px solid #e1e8ed;
    border-radius: 0 0 10px 10px;
    
    /* Configurações para Firefox */
    scrollbar-width: thin !important;
    scrollbar-color: #888 #f1f1f1 !important;
}

/* Estilo da barra de rolagem para navegadores WebKit - CORRIGIDO */
.code-block::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

.code-block::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 6px !important;
}

.code-block::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 6px !important;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* REGRA ADICIONAL PARA GARANTIR FUNCIONAMENTO */
pre.code-block,
.code-container pre {
    max-height: 400px !important;
    overflow-y: scroll !important;
    overflow-x: auto !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #3498db;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    background: #2c3e50;
    color: white;
    border-radius: 15px;
    margin-top: 40px;
}

/* Responsividade - MELHORADA PARA MOBILE */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .accordion-description {
        margin-left: 0;
    }
    
    .code-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .copy-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    /* BARRA DE ROLAGEM ESPECÍFICA PARA MOBILE */
    .code-block {
        max-height: 300px !important;
        font-size: 0.8rem !important;
    }
    
    .code-block::-webkit-scrollbar {
        width: 8px !important;
        height: 8px !important;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-content.active {
    animation: fadeIn 0.3s ease;
}

/* Melhorias para acessibilidade */
.accordion-header:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.copy-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

/* INDICADOR VISUAL DE ROLAGEM - NOVO */
.code-container::after {
    content: "↕️ Role para ver mais";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.code-container:hover::after {
    opacity: 1;
}
