/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial Black', 'Impact', sans-serif;
}

body {
    background-color: #050505;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* EFEITO DE FUNDO */
.background-noise {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(20, 20, 20, 1) 0%, #000 90%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, #111 3px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* --- LAYOUT GERAL --- */
.main-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* --- COLUNA DA ÁRVORE (ESQUERDA) --- */
.tree-section {
    flex: 1;
    min-width: 320px;
    position: relative;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: #d65a18 #111;
}

.tree-section::-webkit-scrollbar { width: 8px; }
.tree-section::-webkit-scrollbar-track { background: #111; }
.tree-section::-webkit-scrollbar-thumb { background: #d65a18; }

.page-title {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 3rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.05);
    z-index: 0;
    line-height: 0.9;
    pointer-events: none;
}

/* LINHA DO TEMPO */
.timeline-line {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #333, #d65a18, #333, transparent);
    transform: translateX(-50%);
    z-index: 0;
}

.tree-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    padding-bottom: 100px;
    z-index: 1;
}

/* NÓS DA ÁRVORE */
.node-wrapper {
    position: relative;
    margin: 30px 0;
    transition: transform 0.3s ease;
}

.node-wrapper:nth-child(odd) { transform: translateX(-30px); }
.node-wrapper:nth-child(even) { transform: translateX(30px); }

.node-btn {
    width: 70px;
    height: 70px;
    background: #000;
    border: 3px solid #555;
    transform: rotate(45deg); /* Diamante */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    position: relative;
}

.node-content {
    transform: rotate(-45deg);
    font-size: 1.2rem;
    color: #555;
    font-weight: bold;
}

/* Estados dos Nós */
.node-btn:hover {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
    scale: 1.1;
}

.node-btn.active {
    border-color: #d65a18;
    background-color: #1a0a00;
    box-shadow: 0 0 20px #d65a18, inset 0 0 10px #d65a18;
    z-index: 10;
}

.node-btn.active .node-content {
    color: #d65a18;
}

/* --- COLUNA DE INFORMAÇÕES (DIREITA) --- */
.info-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(10,10,10,0.8) 100%);
    border-left: 1px solid #222;
}

.info-card {
    width: 100%;
    max-width: 500px;
    border: 4px solid #fff;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 15px 15px 0px #d65a18;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.symbol-small {
    width: 40px;
    height: 40px;
    border: 2px solid #d65a18;
    color: #d65a18;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    font-weight: bold;
}

h2 {
    font-size: 2rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 0px #333;
    line-height: 1;
}

.status {
    color: #d65a18;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.message {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    font-family: 'Courier New', monospace;
    min-height: 80px;
    margin-bottom: 20px;
}

/* CONTAINER E ESTILO DO BOTÃO */
.action-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px; /* Altura fixa para evitar pulo de layout */
    opacity: 0;
    animation: fadeIn 0.5s forwards 0.5s; /* Delay na entrada */
}

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

.action-btn {
    text-decoration: none;
    background: #fff;
    color: #000;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid #fff;
    transition: all 0.3s ease;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    background: #d65a18;
    border-color: #d65a18;
    color: #fff;
    box-shadow: 0 0 15px #d65a18;
}

.action-btn.locked-link:hover {
    background: #333;
    border-color: #555;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
}

.card-footer {
    margin-top: 30px;
    font-size: 0.7rem;
    color: #444;
    text-align: right;
    font-family: monospace;
    border-top: 1px solid #222;
    padding-top: 10px;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .main-wrapper { flex-direction: column; overflow-y: auto; }
    .tree-section { flex: none; height: 350px; border-bottom: 2px solid #d65a18; }
    .timeline-line { transform: rotate(90deg); width: 100%; left: 0; top: 50%; height: 2px; }
    .tree-container { flex-direction: row; padding: 0 50px; width: max-content; margin: 0 auto; }
    .node-wrapper:nth-child(odd) { transform: translateY(-30px); }
    .node-wrapper:nth-child(even) { transform: translateY(30px); }
    .info-section { padding: 20px; }
    .info-card { box-shadow: 5px 5px 0px #d65a18; }
}