/* --- FUNDAMENTOS & VARIÁVEIS DE COR --- */
:root {
    /* Fundos Sólidos / Opacos */
    --bg-color: #0b0c0e;          /* Fundo principal */
    --bg-secondary: #08090b;      /* Fundo de seções secundárias */
    --card-bg: #131519;           /* Fundo dos cards (opaco) */
    --card-hover: #1a1d24;        /* Hover dos cards */
    --nav-bg: #0d0e11;            /* Fundo da barra superior */
    --tech-bg: #1c2029;           /* Fundo das tags de tecnologia */

    /* Texto */
    --text-primary: #e6e8ec;      /* Texto principal */
    --text-secondary: #9da3ae;    /* Texto secundário */
    --text-tertiary: #626875;     /* Texto de detalhes */
    --text-on-accent: #ffffff;    /* Texto em botões */

    /* Destaque (ACCENT) */
    --accent: #6366f1;            /* Tom Indigo/Roxo Tech */
    --accent-hover: #818cf8;      /* Hover do destaque */
    --border: #222630;            /* Bordas marcadas e sólidas */

    /* Marca do Discord */
    --discord-brand: #5865F2;
    --discord-brand-hover: #4752c4;

    /* Cantos menos arredondados (estilo menos iOS/Apple) */
    --radius-lg: 10px;
    --radius-md: 6px;
    --radius-sm: 4px;

    /* Fontes */
    --fn-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --fn-code: 'Fira Code', 'JetBrains Mono', 'Courier New', ;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--fn-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- REVEAL ON SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- HEADER / NAVBAR (Opaco & Solido) --- */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
    font-family: var(--fn-main);
}

.nav-bar nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-bar nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-bar nav a:hover,
.nav-bar nav a.active {
    color: var(--text-primary);
    font-weight: 600;
}

.btn-nav {
    background-color: var(--accent);
    color: var(--text-on-accent) !important;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
}

.btn-nav:hover {
    background-color: var(--accent-hover);
}

/* --- HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 60px 24px;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Foto de Perfil Quadrada com Cantos Arredondados */
.avatar-hero {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 8px;
    line-height: 1.1;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 16px;
}

.tagline {
    color: var(--text-tertiary);
    font-size: 19px;
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.4;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-on-accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    color: var(--accent);
    background-color: transparent;
    padding-left: 12px;
    padding-right: 12px;
}

.btn-secondary:hover {
    color: var(--accent-hover);
}

/* --- FEATURED WORK / PROJECTS --- */
.projects-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 60px;
    letter-spacing: -1px;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    background-color: var(--card-hover);
    border-color: var(--accent);
}

.project-icon {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 16px;
}

.project-details h3 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-details p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-techs span {
    font-family: var(--fn-code);
    font-size: 11px;
    background-color: var(--tech-bg);
    color: var(--accent-hover);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.project-link {
    align-self: flex-start;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 24px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.project-card:hover .project-link {
    color: var(--accent);
    transform: translateX(5px);
}

/* --- ABOUT --- */
.about-section {
    padding: 100px 0;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.about-content strong {
    color: var(--text-primary);
}

/* --- COMMUNITY / DISCORD --- */
.community-section {
    padding: 60px 0 100px 0;
}

.discord-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.discord-logo {
    font-size: 60px;
    color: var(--discord-brand);
}

.discord-info h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.discord-info p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.5;
}

.btn-discord {
    background-color: var(--discord-brand);
    color: var(--text-on-accent);
    margin-left: auto;
    white-space: nowrap;
}

.btn-discord:hover {
    background-color: var(--discord-brand-hover);
}

/* --- FOOTER --- */
.footer {
    padding: 100px 0 40px 0;
    border-top: 1px solid var(--border);
    background-color: var(--bg-secondary);
    text-align: center;
}

.footer h2 {
    font-size: 48px;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.footer p {
    color: var(--text-secondary);
    font-size: 19px;
    margin-bottom: 40px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}

.social-links {
    display: flex;
    gap: 24px;
    font-size: 24px;
}

.social-links a {
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--text-primary);
}

.copyright {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 40px;
}

/* --- TWEAKS & EXPLOITS PAGE --- */
.tweaks-page {
    padding-top: 140px;
    padding-bottom: 100px;
}

.tweaks-header {
    margin-bottom: 60px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.tweaks-header h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.tweaks-header p {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
}

.tweaks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tweak-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.tweak-card:hover {
    transform: translateY(-2px);
    background-color: var(--card-hover);
    border-color: var(--accent);
}

.tweak-preview {
    width: 100%;
    height: 220px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tweak-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
}

.preview-placeholder i {
    font-size: 32px;
}

.preview-placeholder span {
    font-size: 13px;
}

.tweak-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tweak-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tweak-title h2 {
    font-size: 20px;
    font-weight: 700;
}

.tweak-version {
    background-color: var(--tech-bg);
    border: 1px solid var(--border);
    color: var(--accent-hover);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--fn-code);
}

.tweak-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.tweak-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tweak-tags span {
    font-family: var(--fn-main); /* Usa a fonte normal do site */
    background-color: var(--tech-bg);
    border: 1px solid var(--border);
    color: var(--accent-hover);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.tweak-actions {
    margin-top: auto;
}

/* --- MODAL DE EXPLOITS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 5;
}

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

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

.modal-meta {
    display: flex;
    gap: 10px;
}

/* --- GALERIA DE IMAGENS --- */
.modal-image-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.modal-gallery-image {
    width: 100%;
    height: 240px;
    object-fit: contain;
    display: block;
    background: #000;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: zoom-in;
    transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.modal-gallery-image:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    opacity: 0.9;
}

/* --- IMAGE LIGHTBOX --- */
.image-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.image-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.image-lightbox img {
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    transform: scale(1.05);
}

body.lightbox-open {
    overflow: hidden;
}

/* --- MODAL DESCRIPTION & CODE --- */
.modal-description h3,
.modal-tags-container h3 {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 8px;
}

.modal-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 20px;
}

.modal-code-container {
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.modal-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 14px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.modal-code-file {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--fn-code);
}

.modal-code-file i {
    color: var(--text-tertiary);
}

.modal-code-copy {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--tech-bg);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.modal-code-copy:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

.modal-code-container pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    background: var(--bg-secondary);
}

.modal-code-container code {
    color: var(--text-primary);
    font-family: var(--fn-code);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre;
}

.modal-code-separator {
    height: 24px;
    background: var(--bg-color);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- RESPONSIVIDADE --- */
@media (min-width: 769px) {
    .tweaks-grid .tweak-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 40px; }
    .subtitle { font-size: 19px; }
    .section-title { font-size: 32px; }

    .tweaks-page {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .tweaks-header {
        margin-bottom: 40px;
        padding: 0 10px;
    }

    .tweaks-header h1 {
        font-size: 40px;
    }

    .tweaks-header p {
        font-size: 16px;
        line-height: 1.5;
    }

    .tweaks-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .tweak-card {
        width: 100%;
    }

    .tweak-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .discord-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px;
        gap: 20px;
    }

    .btn-discord {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .project-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .project-icon { width: 100%; margin-bottom: 10px; }
    .project-techs { justify-content: center; }

    .modal-image-container {
        grid-template-columns: 1fr;
    }

    .modal-gallery-image {
        height: 280px;
    }

    .image-lightbox {
        padding: 25px;
    }

    .image-lightbox img {
        max-width: 100%;
        max-height: 85vh;
    }

    .nav-bar nav ul { gap: 12px; }
    .nav-bar nav a { font-size: 12px; }
}