/* ===============================
   🎨 BASE GERAL: Layout e Paleta
   =============================== */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: #ffffff;
}

/* ===============================
   🧱 CABEÇALHO
   =============================== */
header {
    background-color: #8d05fc;
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

header h2 {
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Formulário no cabeçalho */
header form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

header input,
header button {
    background: #ffffff;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ===============================
   📄 ÁREA DE UPLOAD (Arquivo .m3u)
   =============================== */
.upload-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.custom-file-label {
    background-color: #ffffff;
    color: #000000;
    padding: 6px 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.custom-file-label:hover {
    background-color: #dddddd;
}

input[type="file"] {
    display: none;
}

.arquivo-info {
    font-size: 0.8rem;
    color: #ffffff;
    background-color: #333333;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-word;
}

/* ===============================
   🚀 BOTÕES (Processar, ZIP, Limpar, Salvar)
   =============================== */
.botao-processar,
.botao-zip,
.botao-limpar,
.botao-salvar,
.file-item button {
    background: linear-gradient(145deg, #000000, #1a1a1a);
    color: #ffffff;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.botao-processar:hover,
.botao-zip:hover,
.botao-limpar:hover,
.botao-salvar:hover,
.file-item button:hover {
    background: linear-gradient(145deg, #2a2a2a, #111111);
    transform: scale(1.03);
}

/* ===============================
   📂 LISTAGEM DE ARQUIVOS (Categorias)
   =============================== */
.salvar-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.botao-salvar {
    background: linear-gradient(145deg, #000, #1a1a1a);
    color: #ffffff;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.botao-salvar:hover {
    background: linear-gradient(145deg, #222, #000);
    transform: scale(1.05);
}

/* NOVA LISTAGEM DE CATEGORIAS BONITA */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.file-item {
    background: #121212;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column; /* <<< aqui para stackar os elementos melhor */
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.file-item:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
}

.categoria-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 0.95rem;
    color: #fff;
    background: #1e1e1e;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.categoria-input:focus {
    border-color: #8d05fc;
    background: #2a2a2a;
}

.file-item button {
    padding: 8px 12px;
    font-size: 1rem;
    border-radius: 8px;
}

.file-item a {
    padding: 8px 12px;
    font-size: 0.9rem;
    background: linear-gradient(145deg, #000, #1a1a1a);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.file-item a:hover {
    background: linear-gradient(145deg, #222, #000);
    transform: scale(1.05);
}

/* ===============================
   🎨 CAMPOS DE LOGOS (individual e em massa)
   =============================== */

/* Campo para logo individual - igual ao categoria */
.logo-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 0.95rem;
    color: #fff;
    background: #1e1e1e;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.logo-input:focus {
    border-color: #8d05fc;
    background: #2a2a2a;
}

/* Campo para logo em massa - igual ao categoria */
.logo-massa-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 0.95rem;
    color: #fff;
    background: #1e1e1e;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.logo-massa-input:focus {
    border-color: #8d05fc;
    background: #2a2a2a;
}

/* Gaveta de logos com animação suave */
.logos-gaveta {
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.3s ease;
    max-height: 0;
    opacity: 0;
    padding: 0 10px; /* margem lateral bonita */
}

.logos-gaveta.open {
    max-height: 1000px; /* grande o suficiente para caber as logos */
    opacity: 1;
    padding: 10px; /* padding visível quando aberto */
}

/* ===============================
   🔍 BARRA DE BUSCA
   =============================== */
.search-bar {
    background: #8d05fc;
    padding: 8px;
    display: flex;
    justify-content: center;
}

.search-bar input {
    width: 100%;
    max-width: 750px;
    padding: 10px 14px;
    border-radius: 6px;
    border: none;
    outline: none;
    font-size: 0.95rem;
    font-weight: bold;
    color: #000;
    background: #fff;
}

/* ===============================
   📌 LINK FIXO TELEGRAM
   =============================== */
.telegram-fixed {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background-color: #8d05fc;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transition: transform 0.3s, background-color 0.3s;
}

.telegram-fixed:hover {
    background-color: #a13bfc;
    transform: scale(1.05);
}

/* ===============================
   📱 RESPONSIVIDADE MOBILE
   =============================== */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-item a {
        margin-top: 6px;
    }

    .botao-processar,
    .botao-zip,
    .botao-limpar,
    .botao-salvar,
    .file-item button {
        width: 100%;
    }

    .categoria-input,
    .logo-input,
    .logo-massa-input {
        width: 100%;
    }
}

.salvar-central {
    margin: 16px auto;
    display: block;
    text-align: center;
    width: fit-content;
}
