:root {
    --turquesa: #00f2ff;
    --ouro-elite: #d4af37;
    --magenta: #ff00ff;
    --ouro-grad: linear-gradient(135deg, #fbf5b7 0%, #d4af37 50%, #fbf5b7 100%);
    --preto-puro: #000000;
    --glass: rgba(10, 10, 10, 0.75); 
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    background: #010101;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- SISTEMA INTRO (SPLASH SCREEN) --- */
#splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: radial-gradient(circle, #0a0a0a 0%, #000 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 2s ease-in-out, visibility 2s;
}

/* O NOVO BOTÃO INICIALIZAR ELITE */
#init-trigger {
    background: transparent;
    border: 2px solid var(--ouro-elite);
    color: var(--ouro-elite);
    padding: 20px 50px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 6px;
    cursor: pointer;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
    animation: buttonPulse 2s infinite;
}

#init-trigger:hover {
    background: var(--ouro-grad);
    color: #000;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.6);
    letter-spacing: 8px;
    transform: scale(1.05);
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); border-color: rgba(212, 175, 55, 0.5); }
    70% { box-shadow: 0 0 20px 10px rgba(212, 175, 55, 0); border-color: rgba(212, 175, 55, 1); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); border-color: rgba(212, 175, 55, 0.5); }
}

/* --- SISTEMA SOLAR (FUNDO) --- */
.solar-system {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw; height: 100vh;
    z-index: -1;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; /* Começa invisível para o fade */
    transition: opacity 3s ease-in-out !important;
}

.sun {
    position: absolute; width: 120px; height: 120px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 0 60px #ffcc00, 0 0 150px #ff8800;
}

.orbit { position: absolute; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%; }
.planet { position: absolute; border-radius: 50%; top: 50%; transform: translateY(-50%); }

.mercury-orbit { width: 250px; height: 250px; animation: p-rot 8s linear infinite; }
.mercury { width: 12px; height: 12px; background: #9e9e9e; left: -6px; }
.venus-orbit { width: 400px; height: 400px; animation: p-rot 15s linear infinite; }
.venus { width: 20px; height: 20px; background: #e3bb76; left: -10px; }
.earth-orbit { width: 580px; height: 580px; animation: p-rot 25s linear infinite; }
.earth { width: 24px; height: 24px; background: #2271b3; left: -12px; box-shadow: 0 0 15px #2271b3; }
.mars-orbit { width: 750px; height: 750px; animation: p-rot 35s linear infinite; }
.mars { width: 18px; height: 18px; background: #e27b58; left: -9px; }
.jupiter-orbit { width: 1000px; height: 1000px; animation: p-rot 60s linear infinite; }
.jupiter { width: 55px; height: 55px; background: #d39c7e; left: -27px; }

@keyframes p-rot { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

/* --- CONTEÚDO PRINCIPAL --- */
.main-wrapper { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 50px 20px; 
    position: relative; 
    z-index: 10; 
    opacity: 0; /* Começa invisível */
    transform: translateY(30px);
}

.show-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 1.5s ease-out, transform 1.5s ease-out !important;
}

header { text-align: center; margin-bottom: 40px; }
.elite-label { background: var(--ouro-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; font-size: 11px; letter-spacing: 6px; }
header h1 { font-size: 3.5rem; font-weight: 900; margin-top: 5px; letter-spacing: -2px; }
header h1 span { color: var(--turquesa); text-shadow: 0 0 20px rgba(0, 242, 255, 0.4); }

.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.glass-panel {
    background: var(--glass);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 40px 100px rgba(0,0,0,1);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
}
.glass-panel:hover { transform: translateY(-5px); border-color: rgba(0, 242, 255, 0.3); }

/* --- EDITOR DE CÓDIGO --- */
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.panel-title { font-size: 11px; font-weight: 800; background: var(--ouro-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; }

.code-box {
    position: relative; 
    height: 500px; 
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 20px; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto !important; 
    overflow-x: hidden;
}

.code-box::-webkit-scrollbar { width: 8px; }
.code-box::-webkit-scrollbar-track { background: transparent; }
.code-box::-webkit-scrollbar-thumb { background: var(--ouro-elite); border-radius: 10px; }

textarea, pre, pre code {
    font-family: 'Fira Code', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

textarea, pre {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    min-height: 100%; 
    padding: 25px !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

textarea {
    z-index: 2;
    background: transparent !important;
    color: transparent !important;
    caret-color: #fff !important;
    resize: none;
    outline: none;
    border: none !important;
    overflow: hidden; 
}

pre {
    z-index: 1;
    pointer-events: none;
    background: transparent !important;
    height: auto !important; 
}

/* --- COMPONENTES ADICIONAIS --- */
.premium-select { position: relative; min-width: 150px; z-index: 100; }
.selected-view {
    background: #000; padding: 12px 25px; border-radius: 14px;
    display: flex; align-items: center; gap: 12px; font-size: 14px;
    font-weight: 700; color: #d4af37; cursor: pointer; border: 1px solid #111;
}

.options-list {
    position: absolute; top: 115%; left: 0; width: 100%; 
    max-height: 300px; overflow-y: auto; background: #0a0a0a; 
    border-radius: 14px; z-index: 100; box-shadow: 0 20px 40px #000;
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.95); 
    transition: var(--transition); border: 1px solid rgba(212, 175, 55, 0.3);
}

.show-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

#main-convert-btn {
    width: 100%; margin-top: 25px; padding: 22px;
    background: var(--ouro-grad); border: none; border-radius: 16px;
    font-weight: 900; font-size: 1.1rem; color: #000; cursor: pointer; transition: var(--transition);
}

#output-code, pre[class*="language-"] {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
}

@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }


/* --- ESTILO DO MENU DE LINGUAGENS (SELECT) --- */
.options-list {
    background: #0a0a0a !important; /* Fundo preto sólido */
    border: 1px solid var(--ouro-elite) !important;
    border-radius: 14px;
    padding: 10px;
}

.options-list div {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    transition: all 0.2s ease;
    border-radius: 8px;
    cursor: pointer;
}

.options-list div:hover {
    background: rgba(0, 242, 255, 0.15); /* Leve brilho turquesa */
    color: var(--turquesa);
    padding-left: 20px;
}

/* Scrollbar do menu */
.options-list::-webkit-scrollbar { width: 6px; }
.options-list::-webkit-scrollbar-thumb { 
    background: var(--ouro-elite); 
    border-radius: 10px; 
}

/* --- BOTÃO DE CONVERTER (REAÇÃO) --- */
#main-convert-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

#main-convert-btn:hover {
    transform: translateY(-3px) scale(1.01);
    filter: brightness(1.2);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
}

#main-convert-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* --- BOTÃO COPIAR --- */
.minimal-copy {
    background: transparent;
    border: 1px solid var(--turquesa);
    color: var(--turquesa);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.minimal-copy:hover {
    background: var(--turquesa);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
}

/* --- UPLOAD DE ARQUIVOS E PASTAS --- */
.file-tools {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-tools-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-tools-row-bottom {
    align-items: center;
}

.tool-btn {
    padding: 18px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.tool-btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
}

.tool-btn-ghost:hover {
    border-color: var(--turquesa);
    color: var(--turquesa);
    box-shadow: 0 0 16px rgba(0, 242, 255, 0.15);
    transform: translateY(-2px);
}

.tool-btn-secondary {
    background: rgba(212, 175, 55, 0.14);
    color: var(--ouro-elite);
    border: 1px solid rgba(212, 175, 55, 0.55);
    min-width: 165px;
}

.tool-btn-secondary:hover:not(:disabled) {
    background: var(--ouro-grad);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.tool-btn-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #ff8080;
    border: 1px solid rgba(220, 38, 38, 0.45);
}

.tool-btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

#file-input, #folder-input {
    display: none;
}

.file-status {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

.file-list {
    max-height: 180px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
}

.file-item small {
    color: var(--turquesa);
    white-space: nowrap;
}

/* Garante que o botão principal fique no mesmo estilo de impacto */
#main-convert-btn {
    width: 100%;
    margin-top: 0;
}


/* --- INTERFACE MAIS LIMPA --- */
.file-tools {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tools-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tools-kicker {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 900;
    color: var(--ouro-elite);
    margin-bottom: 6px;
}

.tools-sub {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,0.72);
    max-width: 48ch;
}

.tools-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tool-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.tool-pill-active {
    color: #000;
    background: var(--ouro-grad);
    border-color: transparent;
}

.file-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.file-actions-bottom {
    grid-template-columns: 1.35fr 1fr 1fr;
}

.tool-btn {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

#main-convert-btn {
    margin-top: 0;
    width: 100%;
}

.file-status-group {
    display: grid;
    gap: 10px;
}

.file-status {
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

.file-list {
    max-height: 180px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
}

.file-item small {
    color: var(--turquesa);
    white-space: nowrap;
}

#file-input, #folder-input {
    display: none;
}

/* --- CORREÇÃO DO EDITOR DE TEXTO --- */
#input-code {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    transition: color 0.15s ease, -webkit-text-fill-color 0.15s ease;
}

#input-code:focus {
    color: rgba(255,255,255,0.96) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.96) !important;
}

#input-code::selection {
    background: rgba(0, 242, 255, 0.28);
    color: #fff;
}

#input-code:focus ~ #highlight-layer {
    opacity: 0;
}

#highlight-layer {
    transition: opacity 0.15s ease;
}

@media (max-width: 900px) {
    .tools-top {
        flex-direction: column;
    }

    .tools-badges {
        justify-content: flex-start;
    }

    .file-actions,
    .file-actions-bottom {
        grid-template-columns: 1fr;
    }
}


/* --- ABAS E LAYOUT MAIS LIMPO --- */
.hidden {
    display: none !important;
}

.mode-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.mode-btn {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255,255,255,0.78);
    border-radius: 16px;
    padding: 14px 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

.mode-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 242, 255, 0.35);
    color: #fff;
}

.mode-btn.active {
    background: var(--ouro-grad);
    color: #000;
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.mode-hint {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.76);
    font-size: 13px;
    line-height: 1.45;
}

.action-stack {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.action-row .tool-btn {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 11px;
    letter-spacing: 0.3px;
    border-radius: 12px;
}

#main-convert-btn {
    width: 100%;
    margin-top: 0;
}

#main-convert-btn,
#download-files-btn,
#btn-add-more,
#btn-cancel-files {
    will-change: transform;
}

@media (max-width: 900px) {
    .mode-switch {
        grid-template-columns: 1fr;
    }

    .action-row {
        grid-template-columns: 1fr;
    }
}


/* --- AJUSTES DA INTERFACE --- */
.result-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.file-status-group.collapsed .file-status-details {
    display: none;
}

.file-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.file-status-head-text {
    min-width: 0;
    flex: 1;
}

.file-status-title {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ouro-elite);
    margin-bottom: 8px;
}

.file-toggle-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.file-toggle-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#btn-add-more,
#btn-cancel-files {
    min-height: 38px;
    padding: 10px 12px;
    font-size: 11px;
    letter-spacing: 0.3px;
    text-transform: none;
    border-radius: 12px;
    opacity: 0.92;
}

#btn-add-more {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}

#btn-cancel-files {
    background: rgba(220, 38, 38, 0.10);
    border: 1px solid rgba(220, 38, 38, 0.28);
}

.file-empty-hint {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .file-status-head {
        flex-direction: column;
    }

    .result-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}


/* Interface mais limpa sem perder a estética */
.tools-top,
.mode-hint,
.tools-badges {
    display: none !important;
}

.file-tools {
    margin-top: 12px;
    padding: 14px;
}

.file-status-group {
    margin-top: 14px;
}
