@import url('https://fonts.googleapis.com/css2?family=Silkscreen&family=Inter:wght@400;500;600&family=VT323&display=swap');

:root {
    --bg-color: #0A1128; /* Fundo profundo */
    --card-bg: #152A4A; /* Cards */
    --text-main: #E8F0FE;
    --text-sec: #8899AA;
    --neon-cyan: #00E5FF;
    --danger-color: #FF3366;
    --success-color: #00F0FF; /* Usando o ciano para status ativo */
    --border-color: rgba(0, 229, 255, 0.2);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Imagem de Fundo da Aplicação */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('fundo.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.15; /* Transparência para as informações aparecerem */
    z-index: -1;
}

/* Fundo específico da página de Login */
body.login-page::before {
    background-image: url('fundo.jpg');
    opacity: 0.25; /* Um pouco mais forte para o login */
}

/* Tipografia Pixelada para Destaques */
h1, h2, .brand-text {
    font-family: 'Silkscreen', cursive;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    letter-spacing: 2px;
}

/* Telas de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.vintage-panel {
    background: rgba(21, 42, 74, 0.85); /* Semi-transparente para ver o fundo */
    backdrop-filter: blur(5px);
    border: 2px solid var(--neon-cyan);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 0 20px rgba(0, 229, 255, 0.3),
        inset 0 0 15px rgba(0, 229, 255, 0.2);
    position: relative;
    max-width: 400px;
    width: 100%;
}

.vintage-panel h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: var(--text-sec);
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 17, 40, 0.8);
    border: 1px solid var(--text-sec);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--neon-cyan);
    border-radius: 99px; /* Efeito tubo de neon arredondado */
    background: transparent;
    color: var(--neon-cyan);
    font-family: 'Silkscreen', cursive;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dashboard */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(21, 42, 74, 0.85);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--neon-cyan);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-placeholder {
    width: 48px;
    height: 48px;
    background: var(--bg-color);
    border: 2px dashed var(--neon-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'VT323', monospace;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    text-align: center;
}

.navbar h2 {
    font-size: 1.5rem;
}

.logout-btn {
    color: var(--text-sec);
    text-decoration: none;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    border: 2px solid var(--text-sec);
    border-radius: 99px;
    padding: 0.4rem 1.2rem;
    transition: all 0.2s;
}

.logout-btn:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

.dashboard-content {
    padding: 2rem;
    flex: 1;
}

.containers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: start;
}

.container-card {
    background: rgba(21, 42, 74, 0.85); /* Semi-transparente */
    backdrop-filter: blur(5px);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

/* Imagem de fundo no card inteiro */
.container-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('Cetus_fundo_container.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.08; /* Mais transparente */
    z-index: 0;
    pointer-events: none;
    border-radius: 18px;
}

/* Para manter o conteúdo do card acima da imagem */
.container-card > * {
    position: relative;
    z-index: 1;
}

.container-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.15);
    transform: translateY(-2px);
}

/* Efeito de scanline no topo do card */
.container-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--neon-cyan);
    opacity: 0;
    transition: opacity 0.3s;
}
.container-card:hover::before {
    opacity: 1;
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 0.5rem;
    cursor: pointer;
    gap: 1rem;
}

.container-header > div {
    flex: 1;
    min-width: 0; /* Permite que o texto seja cortado sem quebrar o flexbox */
}

.container-body {
    display: none;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.container-name {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Isso resolve o problema do layout torto (...) */
}

.container-id {
    font-family: 'Inter', monospace;
    font-size: 0.75rem;
    color: var(--text-sec);
    margin-top: 0.25rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    font-family: 'Silkscreen', cursive;
    font-size: 0.7rem;
    border: 2px solid currentColor;
    border-radius: 99px;
}

.status-running {
    color: var(--success-color);
    text-shadow: 0 0 5px var(--success-color);
    box-shadow: inset 0 0 5px rgba(0, 240, 255, 0.2);
}

.status-exited {
    color: var(--danger-color);
}

.status-other {
    color: #FFB020;
}

.container-info {
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.info-label {
    color: var(--text-sec);
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.info-value {
    color: var(--text-main);
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.container-actions {
    display: flex;
    gap: 1rem;
}

.btn-action {
    flex: 1;
    padding: 0.5rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    border: 2px solid currentColor;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-success { 
    color: var(--success-color); 
}
.btn-success:hover { 
    background: var(--success-color); 
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--success-color);
}

.btn-danger { 
    color: var(--danger-color); 
}
.btn-danger:hover { 
    background: var(--danger-color); 
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--danger-color);
}

.btn-secondary {
    color: var(--text-sec);
}
.btn-secondary:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    background: rgba(255,255,255,0.1);
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 51, 102, 0.1);
    border: 2px solid var(--danger-color);
    border-radius: 16px;
    color: var(--danger-color);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Resource Bars */
.resource-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.resource-row {
    margin-bottom: 0.8rem;
}

.resource-label {
    display: flex;
    justify-content: space-between;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: var(--text-sec);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.resource-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    position: relative;
    overflow: hidden;
}

.resource-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease;
}

/* Cores das barras - Injetadas via JS mas podemos usar classes para fallback */
.bar-normal {
    background-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}
.bar-warning {
    background-color: #FFB020;
    box-shadow: 0 0 8px rgba(255, 176, 32, 0.6);
}
.bar-critical {
    background-color: var(--danger-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
}

.host-stats-panel {
    background: rgba(0, 229, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 1rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 3rem;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.05);
}

.host-stat-item {
    flex: 1;
}

.host-stat-title {
    font-family: 'Silkscreen', cursive;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-sec);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    margin-top: auto;
}
