/* Importação de fontes premium do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;700&family=Outfit:wght@300;400;600;800&display=swap');

/* Reset de estilos básicos */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Paleta Principal: Tons de Café & Tech */
    --color-bg-darkest: #0a0705;
    --color-bg-dark: #120c09;
    --color-bg-medium: #1d1511;
    --color-coffee-deep: #3c2a21;
    --color-coffee-accent: #b88a64;
    --color-coffee-light: #e6ccb2;
    --color-accent-neon: #64ffda; /* Toque tech */
    --color-text-main: #f5ebe0;
    --color-text-muted: #a69f98;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    
    /* Variáveis padrão do Terminal (Tema Espresso por padrão) */
    --term-bg: #150f0d;
    --term-text: #f5ebe0;
    --term-user: #e6ccb2;
    --term-host: #b88a64;
    --term-accent: #ddaa77;
    --term-dir: #64ffda;
    --term-prompt: #b88a64;
}

/* Temas do Terminal */
.terminal-window.theme-espresso {
    --term-bg: #150f0d;
    --term-text: #f5ebe0;
    --term-user: #e6ccb2;
    --term-host: #b88a64;
    --term-accent: #ddaa77;
    --term-dir: #64ffda;
    --term-prompt: #b88a64;
}

.terminal-window.theme-dracula {
    --term-bg: #282a36;
    --term-text: #f8f8f2;
    --term-user: #50fa7b;
    --term-host: #bd93f9;
    --term-accent: #ff79c6;
    --term-dir: #8be9fd;
    --term-prompt: #f1fa8c;
}

.terminal-window.theme-matrix {
    --term-bg: #000000;
    --term-text: #00ff00;
    --term-user: #00ff00;
    --term-host: #00aa00;
    --term-accent: #00ff00;
    --term-dir: #ffffff;
    --term-prompt: #00ff00;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.terminal-window.theme-cyberpunk {
    --term-bg: #001219;
    --term-text: #00f5d4;
    --term-user: #ff007f;
    --term-host: #7b2cbf;
    --term-accent: #fee440;
    --term-dir: #00bbf9;
    --term-prompt: #ff007f;
}

.terminal-window.theme-classic {
    --term-bg: #1e1e1e;
    --term-text: #ffffff;
    --term-user: #4ec9b0;
    --term-host: #569cd6;
    --term-accent: #ce9178;
    --term-dir: #9cdcfe;
    --term-prompt: #c586c0;
}

/* Scrollbar global */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-darkest);
}
::-webkit-scrollbar-thumb {
    background: var(--color-coffee-deep);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-coffee-accent);
}

/* Estilos de layout e animações */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-darkest);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Cabeçalho / Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 7, 5, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(184, 138, 100, 0.15);
    padding: 1rem 2rem;
    transition: background var(--transition-speed);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(184, 138, 100, 0.3);
}

.logo-text span {
    color: var(--color-coffee-accent);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition-speed), transform var(--transition-speed);
    position: relative;
    padding: 0.25rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-coffee-accent);
    transition: width var(--transition-speed);
}

nav a:hover {
    color: var(--color-text-main);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    background: radial-gradient(circle at 80% 20%, rgba(60, 42, 33, 0.25) 0%, rgba(10, 7, 5, 0) 60%),
                radial-gradient(circle at 10% 80%, rgba(100, 255, 218, 0.03) 0%, rgba(10, 7, 5, 0) 50%);
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-tagline {
    font-family: var(--font-mono);
    color: var(--color-coffee-accent);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--color-text-main);
}

.hero h1 span {
    background: linear-gradient(135deg, var(--color-text-main) 30%, var(--color-coffee-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-speed);
    cursor: pointer;
    font-family: var(--font-sans);
}

.btn-primary {
    background-color: var(--color-coffee-accent);
    color: var(--color-bg-darkest);
    border: 1px solid var(--color-coffee-accent);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-coffee-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 138, 100, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-main);
    border: 1px solid rgba(245, 235, 224, 0.25);
}

.btn-secondary:hover {
    border-color: var(--color-text-main);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-img-container {
    width: 100%;
    max-width: 400px;
    height: 400px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, var(--color-coffee-deep) 0%, var(--color-bg-medium) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(184, 138, 100, 0.25);
    animation: morph 8s ease-in-out infinite alternate;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
    }
    100% {
        border-radius: 40% 60% 30% 70% / 40% 60% 40% 60%;
    }
}

.hero-logo {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s ease;
}

.hero-logo:hover {
    transform: scale(1.08) rotate(3deg);
}

/* Terminal Section */
.terminal-section {
    padding: 6rem 2rem;
    background-color: var(--color-bg-dark);
    border-top: 1px solid rgba(184, 138, 100, 0.1);
    border-bottom: 1px solid rgba(184, 138, 100, 0.1);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.terminal-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 2rem;
}

/* Janela do Terminal */
.terminal-wrapper {
    background: linear-gradient(135deg, rgba(60, 42, 33, 0.1) 0%, rgba(20, 14, 11, 0.05) 100%);
    padding: 3px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(184, 138, 100, 0.2);
}

.terminal-window {
    background-color: var(--term-bg);
    color: var(--term-text);
    font-family: var(--font-mono);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 500px;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.4);
    transition: background-color 0.3s, color 0.3s;
}

/* Barra de Título */
.terminal-bar {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    user-select: none;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-btn.red { background-color: #ff5f56; }
.term-btn.yellow { background-color: #ffbd2e; }
.term-btn.green { background-color: #27c93f; }

.terminal-title {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-weight: 500;
}

.terminal-status {
    width: 32px; /* Espaçador para balancear */
}

/* Conteúdo do Terminal */
.terminal-body {
    padding: 1.25rem;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Histórico de comandos e outputs */
.history-item {
    word-break: break-all;
    white-space: pre-wrap;
}

.prompt-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-user {
    color: var(--term-user);
    font-weight: 700;
}

.prompt-host {
    color: var(--term-host);
}

.prompt-dir {
    color: var(--term-dir);
    font-weight: 500;
}

.prompt-char {
    color: var(--term-prompt);
}

.command-output {
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    color: var(--term-text);
}

/* Destaques do output do terminal */
.output-error { color: #ff5f56; }
.output-success { color: #27c93f; }
.output-warning { color: #ffbd2e; }
.output-info { color: var(--term-accent); }
.output-bold { font-weight: 700; }
.output-dir-item { color: var(--term-dir); font-weight: 700; }

/* Linha de entrada atual */
.input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.terminal-input-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: transparent; /* Ocultamos o texto original para ver apenas o espelho */
    font-family: var(--font-mono);
    font-size: 0.95rem;
    caret-color: transparent; /* Ocultamos o cursor nativo */
    z-index: 2;
}

.custom-caret-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-height: 20px; /* Garante área clicável */
}

.input-mirror {
    color: var(--term-text);
    white-space: pre-wrap;
    font-family: var(--font-mono);
    z-index: 1;
    pointer-events: none;
}

.custom-caret {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--term-text);
    margin-left: 1px;
    animation: blink 1s step-end infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes blink {
    50% { background-color: transparent; }
}

/* Painel de Controle Lateral */
.terminal-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-card {
    background-color: var(--color-bg-medium);
    border: 1px solid rgba(184, 138, 100, 0.15);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.control-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
    border-bottom: 1px solid rgba(184, 138, 100, 0.2);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-card h3 span {
    color: var(--color-coffee-accent);
}

.control-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* Comandos Rápidos interativos */
.commands-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.command-btn {
    background-color: rgba(10, 7, 5, 0.4);
    border: 1px solid rgba(184, 138, 100, 0.15);
    color: var(--color-text-main);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.command-btn::after {
    content: '→';
    font-family: var(--font-sans);
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition-speed);
}

.command-btn:hover {
    background-color: var(--color-coffee-deep);
    border-color: var(--color-coffee-accent);
    color: var(--color-accent-neon);
    padding-left: 1.1rem;
}

.command-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Seletor de Temas do Terminal */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.theme-btn {
    padding: 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(184, 138, 100, 0.15);
    background-color: rgba(10, 7, 5, 0.4);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: capitalize;
}

.theme-btn:hover {
    border-color: var(--color-coffee-accent);
    color: var(--color-text-main);
}

.theme-btn.active {
    background-color: var(--color-coffee-accent);
    color: var(--color-bg-darkest);
    border-color: var(--color-coffee-accent);
    font-weight: 600;
}

/* Seção de Recursos (Features) */
.features-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background-color: var(--color-bg-medium);
    border: 1px solid rgba(184, 138, 100, 0.1);
    border-radius: var(--border-radius);
    padding: 2.25rem;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(184, 138, 100, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    font-size: 2.2rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    color: var(--color-text-main);
    font-weight: 600;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Seção Sobre / Conteúdo */
.about-section {
    padding: 6rem 2rem;
    background-color: var(--color-bg-dark);
    border-top: 1px solid rgba(184, 138, 100, 0.1);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.about-graphics {
    display: flex;
    justify-content: center;
    position: relative;
}

.decor-box {
    width: 320px;
    height: 320px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(60, 42, 33, 0.3) 0%, rgba(10, 7, 5, 0.5) 100%);
    border: 1px solid rgba(184, 138, 100, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.decor-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-coffee-accent), var(--color-accent-neon));
}

.decor-top {
    font-family: var(--font-mono);
    color: var(--color-accent-neon);
    font-size: 0.85rem;
}

.decor-center {
    font-size: 4.5rem;
    text-align: center;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    animation: float 4s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(5deg); }
}

.decor-bottom {
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-align: right;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.about-content p {
    color: var(--color-text-muted);
}

.about-bullets {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.bullet-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.bullet-icon {
    background-color: var(--color-coffee-deep);
    color: var(--color-coffee-accent);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.bullet-text h4 {
    font-size: 1.05rem;
    color: var(--color-text-main);
    margin-bottom: 0.25rem;
}

.bullet-text p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Rodapé / Footer */
footer {
    background-color: var(--color-bg-darkest);
    border-top: 1px solid rgba(184, 138, 100, 0.15);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info {
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links-group {
    display: flex;
    gap: 4rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

/* Responsividade */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-desc {
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .terminal-grid {
        grid-template-columns: 1fr;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-graphics {
        order: 2;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    nav ul {
        display: none; /* Em um cenário real, teríamos um menu hamburger. Para simplicidade e estética, mantemos as âncoras na parte de baixo ou reduzidas */
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
    }
    
    .footer-links-group {
        width: 100%;
        justify-content: space-between;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .terminal-window {
        height: 420px;
    }
    
    .theme-selector {
        grid-template-columns: 1fr;
    }
}
