/* ============================================
   VARIÁVEIS E RESET
   ============================================ */

:root {
    --primary: #b50914;
    --dark: #000000;
    --light: #ffffff;
    --gray-dark: #1a1a1a;
    --gray-light: #333333;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

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

.loading {
    text-align: center;
    color: var(--primary);
    padding: 40px;
    font-size: 18px;
}

/* ============================================
   NAVEGAÇÃO
   ============================================ */

.navbar {
    background-color: var(--gray-dark);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(181, 9, 20, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand h1 {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--gray-dark) 100%);
    padding: 100px 20px;
    text-align: center;
    border-bottom: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(181, 9, 20, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--light);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(181, 9, 20, 0.5);
}

.hero p {
    font-size: 20px;
    color: var(--light);
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ============================================
   BOTÕES
   ============================================ */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
    box-shadow: 0 4px 15px rgba(181, 9, 20, 0.4);
}

.btn-primary:hover {
    background-color: #8a0710;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(181, 9, 20, 0.6);
}

.btn-secondary {
    background-color: var(--gray-light);
    color: var(--light);
}

.btn-secondary:hover {
    background-color: #444;
}

/* ============================================
   SEÇÕES
   ============================================ */

.section {
    padding: 60px 20px;
    border-bottom: 1px solid var(--gray-light);
}

.section:nth-child(even) {
    background-color: var(--gray-dark);
}

.section-title {
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--light);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

/* ============================================
   CARDS GRID
   ============================================ */

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

.card {
    background-color: var(--gray-dark);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(181, 9, 20, 0.3);
}

.card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--gray-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 48px;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--light);
    font-weight: 600;
}

.card-type {
    display: inline-block;
    background-color: var(--primary);
    color: var(--light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-description {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 15px;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background-color: var(--gray-light);
    color: var(--light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
}

.card-action {
    display: flex;
    gap: 10px;
}

.card-action .btn {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--gray-dark);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(181, 9, 20, 0.4);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary);
}

.modal-content h2 {
    margin-bottom: 15px;
    color: var(--light);
}

.modal-content p {
    margin-bottom: 20px;
    color: #aaa;
}

.input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background-color: var(--dark);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    color: var(--light);
    font-size: 16px;
    transition: var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(181, 9, 20, 0.3);
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.message.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

/* ============================================
   RODAPÉ
   ============================================ */

.footer {
    background-color: var(--gray-dark);
    border-top: 2px solid var(--primary);
    padding: 30px 20px;
    text-align: center;
    color: #aaa;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.admin-link:hover {
    color: var(--light);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
    .navbar-menu {
        gap: 15px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .footer .container {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 28px;
    }
}


/* ============================================
   NOTIFICAÇÃO DE DOWNLOAD
   ============================================ */

.download-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.download-notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    font-weight: bold;
}

.notification-text {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .download-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}


/* ============================================
   MODAL DE LEITURA DE MÉTODO
   ============================================ */

.method-content {
    background-color: var(--dark);
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
    line-height: 1.8;
}

.method-content p {
    margin-bottom: 15px;
    color: #ddd;
    text-align: justify;
}

.method-content p:last-child {
    margin-bottom: 0;
}

.method-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--gray-light);
    padding-top: 15px;
    margin-top: 20px;
}

.method-meta {
    font-size: 13px;
    color: #888;
}

/* Scrollbar customizado para o conteúdo do método */
.method-content::-webkit-scrollbar {
    width: 8px;
}

.method-content::-webkit-scrollbar-track {
    background: var(--gray-dark);
    border-radius: 4px;
}

.method-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.method-content::-webkit-scrollbar-thumb:hover {
    background: #8a0710;
}
