/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #04040f;
    color: white;
    overflow-y: auto; 
    overflow-x: hidden;
    min-height: 100vh;
    cursor: crosshair;
}

/* --- BACKGROUND E EFEITOS --- */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    filter: blur(0.5px);
}

.scan-line {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0,255,255,0.08) 50%,
        transparent 100%
    );
    animation: scanMove 4s linear infinite;
}

@keyframes scanMove {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* --- Audio --- */

#soundControl {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    border: 1px solid cyan;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
}

/* --- BOOT SCREEN --- */
#bootScreen {
    position: fixed;
    inset: 0;
    background: black;
    color: #00ff88;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Orbitron';
    text-align: center;
}

.boot-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 15px #00ff88;
}

#startBtn {
    padding: 15px 35px;
    font-size: 1rem;
    border: 2px solid #00ff88;
    background: transparent;
    color: #00ff88;
    cursor: pointer;
    letter-spacing: 2px;
    transition: .3s;
}

#startBtn:hover {
    background: #00ff88;
    color: black;
    box-shadow: 0 0 25px #00ff88;
    transform: scale(1.05);
}

.boot-glitch {
    animation: bootFlash .2s;
}

@keyframes bootFlash {
    0% { background: white; color: black; }
    100% { background: black; color: #00ff88; }
}

/* --- TERMINAL --- */
#terminal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #00ff88;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    padding: 40px;
    z-index: 10000;
    display: none;
    align-items: center;
}

.terminal-text::after {
    content: "|";
    animation: blink 1s infinite;
    margin-left: 5px;
}

@keyframes blink { 
    from, to { opacity: 1; } 
    50% { opacity: 0; } 
}

/* --- CONTAINER PRINCIPAL --- */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 40px;
    transition: opacity 0.5s;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(4,4,15,0.2), rgba(4,4,15,0.85));
    z-index: -1;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo {
    font-family: 'Orbitron';
    font-size: 3.2rem;
    text-shadow: 0 0 10px cyan, 0 0 25px cyan, 0 0 50px rgba(0,255,255,0.8);
    animation: glowText 2s infinite alternate;
    text-align: center;
}

@keyframes glowText {
    from { text-shadow: 0 0 10px cyan; }
    to { text-shadow: 0 0 30px #00ffcc; }
}

.tag {
    color: #ccc;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    text-align: center;
    margin-bottom: 20px;
}

/* --- BOTÕES --- */
.btnArea {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid cyan;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: cyan !important;
    color: black !important;
    box-shadow: 0 0 50px cyan !important;
    transform: translateY(-3px);
}

#mainBtn {
    background: linear-gradient(90deg, cyan, #00ff88);
    color: black;
    animation: pulseMain 1.5s infinite;
}

@keyframes pulseMain {
    0% { transform: scale(1); }
    50% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

/* --- CARDS --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 1000px;
}

.card {
    display: none; /* Controlado pelo JS */
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,255,255,.4);
    padding: 20px;
    border-radius: 16px;
    cursor: pointer;
    opacity: 0;
    transform: scale(.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 120px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: white;
    transition: .35s;
}

/* MODAL CARD OPEN */
.card.open {
    position: fixed;
    display: flex;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: min(600px, 90vw);
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(10, 10, 25, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    border: 2px solid cyan;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    padding: 40px;
    cursor: default;
    justify-content: flex-start;
    align-items: flex-start;
    opacity: 1;
    animation: boom .5s ease;
}

@keyframes boom {
    0% { transform: translate(-50%,-50%) scale(.6); opacity: 0; }
    100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}

.card.open .card-title {
    font-size: 1.5rem;
    border-bottom: 1px solid cyan;
    padding-bottom: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    width: 100%;
}

.card.open .content {
    opacity: 1;
    max-height: 2000px;
    transition: opacity .4s .3s;
}

.card.open p {
    font-family: monospace;
    color: #00ff88;
    text-shadow: 0 0 5px #00ff88;
}

/* DIGITAÇÃO */
.typing::after {
    content: "|";
    margin-left: 5px;
    animation: blinkCursor 1s infinite;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- COMPONENTES INTERNOS --- */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.skills span {
    padding: 8px 14px;
    border: 1px solid cyan;
    border-radius: 20px;
    font-size: .9rem;
}

.close {
    margin-top: 30px;
    padding: 12px 24px;
    border: none;
    background: cyan;
    color: black;
    cursor: pointer;
    border-radius: 8px;
    font-weight: bold;
    transition: .2s;
}

.close:hover { background: white; box-shadow: 0 0 15px white; }

.wpp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 20px;
    background: #25D366;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    animation: wppPulse 1.5s infinite;
}

@keyframes wppPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wpp img { width: 22px; }

/* --- NAVEGAÇÃO E FIXOS --- */
.nav-arrows {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 1000;

    opacity: 0;            
    pointer-events: none;   
    transition: 0.3s;
}

.nav-arrows.active {
    opacity: 1;
    pointer-events: all;
}

.nav-arrows button {
    padding: 15px 20px;
    font-size: 1.5rem;
    background: transparent;
    border: 1px solid cyan;
    color: cyan;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s;
}

.nav-arrows button:hover { background: cyan; color: black; }

.contact-fixed {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #25D366;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0,0,0,.3);
    z-index: 1000;
    transition: .3s;
}

.contact-fixed:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 25px #25D366;
}

/* Flash effect */
body.flash { animation: flash 0.15s; }
@keyframes flash { 0% { background: #00ff88; } 100% { background: #04040f; } }

/* Ícones Animados */
.icon-bolt { display: inline-block; animation: lightning 1.5s infinite; }
@keyframes lightning { 50% { transform: scale(1.2); filter: drop-shadow(0 0 10px white); } }

.icon-rocket { display: inline-block; animation: launch 2s infinite ease-in-out; }
@keyframes launch { 50% { transform: translateY(-5px) rotate(-45deg); } }

.icon-folder { display: inline-block; animation: folderMove 2s infinite; }
@keyframes folderMove { 50% { transform: translateX(5px); } }

.icon-dev { display: inline-block; animation: headMove 3s infinite; }
@keyframes headMove { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }

.icon-book { display: inline-block; animation: flip 2s infinite; }
@keyframes flip { 50% { transform: rotateY(180deg); } }

/* Mobile */
@media(max-width:520px) {
    .cards { grid-template-columns: 1fr; }
    .logo { font-size: 2rem; }
    .contact-fixed { padding: 10px 15px; font-size: 0.8rem; }
}
