/* Reset Básico com Vibe Retro */
:root {
    --bg-color: #050505;
    --main-green: #00ff41;
    --main-purple: #bd00ff;
    --win-gray: #c0c0c0;
    --win-dark: #808080;
    --text-color: #e0e0e0;
    --scanline-color: rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace; /* Fonte estilo terminal */
    font-size: 19px;
    overflow-x: hidden;
}

/* Efeito de Scanlines (TV antiga) */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 999;
}

/* Elementos flutuantes caóticos */
.floating-decoration {
    position: fixed;
    color: rgba(0, 255, 65, 0.2);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    z-index: -1;
    transform: rotate(-5deg);
}

/* Layout Principal */
.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.container-grid {
    display: grid;
    grid-template-columns: 300px 1fr; /* Sidebar fixa, conteúdo flexível */
    gap: 20px;
}

/* Cabeçalho */
.cyber-header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px dashed var(--main-purple);
}

h1.glitch {
    font-family: 'Press Start 2P', cursive;
    color: var(--main-purple);
    text-shadow: 2px 2px var(--main-green);
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.warning-bar {
    background: var(--main-green);
    color: black;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

/* Estilo das "Janelas" */
.neo-window {
    background: #111;
    border: 2px solid var(--win-gray);
    box-shadow: 5px 5px 0px #000;
    margin-bottom: 20px;
    position: relative;
}

.window-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 2px 5px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--win-gray);
    letter-spacing: 1px;
}

.window-content {
    padding: 15px;
}

/* Sidebar Profile */
.pixel-avatar {
    width: 100px;
    height: 100px;
    image-rendering: pixelated; /* Mantém a imagem nítida ao escalar */
    border: 2px solid var(--main-green);
    display: block;
    margin: 0 auto 10px;
}

.role-title {
    text-align: center;
    color: var(--main-green);
    border-bottom: 1px solid var(--main-green);
    padding-bottom: 5px;
}

.status-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.social-matrix {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.retro-btn {
    background: black;
    color: var(--main-green);
    border: 1px solid var(--main-green);
    padding: 5px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
}

.retro-btn:hover {
    background: var(--main-green);
    color: black;
    box-shadow: 0 0 10px var(--main-green);
}

/* Conteúdo */
.terminal-text p {
    margin: 5px 0;
    color: #eee;
}

.active-job {
    border-left: 3px solid var(--main-green);
    padding-left: 10px;
    background: rgba(0, 255, 65, 0.05);
}

.blink {
    animation: blinker 1.5s linear infinite;
    color: var(--main-green);
}

@keyframes blinker {
    50% { opacity: 0; }
}

.dashed {
    border: 0;
    border-top: 1px dashed var(--main-purple);
    margin: 15px 0;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: #222;
    border: 1px solid var(--main-purple);
    color: var(--main-purple);
    padding: 2px 8px;
    font-size: 0.9rem;
}

.comment {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

/* Projetos - Collapsible Retro */
.collapsible {
    background-color: #333;
    color: var(--main-green);
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: 1px solid var(--main-green);
    text-align: left;
    outline: none;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    margin-top: 5px;
}

.active, .collapsible:hover {
    background-color: var(--main-green);
    color: black;
}

.content {
    padding: 0 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background: #111;
    border-left: 1px solid var(--main-green);
    border-right: 1px solid var(--main-green);
}

.content p {
    font-size: 0.9rem;
}

.content a {
    color: var(--main-purple);
    text-decoration: none;
    font-weight: bold;
}

/* Footer */
.footer-glitch {
    margin-top: 50px;
    text-align: center;
    font-size: 0.7rem;
    color: #555;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.spinning-cat {
  padding-top: 30px;
}

#snake-window {
  cursor: default;
  user-select: none; /* Evita selecionar texto ao arrastar */
}

#snake-window .window-bar {
  cursor: move; /* Indica que é arrastável */
}

#terminal-container {
  background-color: #000000;
  color: #09ff00;
  font-size: 15px;
  font-family: 'Courier New', Courier, monospace;
  padding: 20px;
  height: 200px;
  overflow-y: auto;
  position: relative;
  outline: 1px solid #e0e0e0; 

}

.prompt {
  color: #ffffff;
  font-weight: bold;
  margin-right: 10px;
}

#terminal-input {
  background: transparent;
  border: none;
  color: #00ff00;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  width: 70%;
}

/* Scrollbar estilizada para não quebrar o clima */
#terminal-container::-webkit-scrollbar {
  width: 8px;
}
#terminal-container::-webkit-scrollbar-thumb {
  background: #e0e0e0;
}

#ide-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Garante que fique acima de tudo */
    width: 600px;
    max-width: 90vw;
    display: none; /* Começa escondida */
    cursor: default;
    user-select: none; /* Evita selecionar texto ao arrastar */
}

#ide-window .window-bar {
  cursor: move;
}

.ide-toolbar {
    background: #222;
    padding: 5px;
    border-bottom: 1px solid var(--win-gray);
    display: flex;
    gap: 10px;
}

#code-editor {
    width: 100%;
    height: 200px;
    background: #000;
    color: var(--main-green);
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    border: 1px solid var(--main-purple);
    padding: 10px;
    resize: vertical;
    outline: none;
}

#ide-output-container {
    margin-top: 10px;
    background: #050505;
    border: 1px dashed var(--main-green);
    padding: 5px;
}

.output-label {
    font-size: 0.7rem;
    color: var(--main-purple);
    margin-bottom: 3px;
}

#ide-output {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #fff;
    min-height: 50px;
    max-height: 100px;
    overflow-y: auto;
}

/* RESPONSIVIDADE (Mobile) */
@media screen and (max-width: 768px) {
    .container-grid {
        grid-template-columns: 1fr; /* Coluna única */
    }

    h1.glitch {
        font-size: 1.5rem;
    }

    .sidebar-profile {
        order: -1; /* Perfil aparece primeiro */
    }
    
    .floating-decoration {
        display: none; /* Remove poluição visual em telas pequenas */
    }
}
