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

/* ===== BODY ===== */
body {
    background: #0d1117;
    color: #00ff9c;
    font-family: 'Share Tech Mono', monospace;
    cursor: url('../assets/icons8-cursor-32.png') 16 16, auto;
}

a, button, .btn {
    cursor: url('../assets/icons8-finger-up-32.png') 8 8, pointer;
}

input, textarea {
    cursor: url('../assets/icons8-text-cursor-100.png') 16 16, text;
}

/* ===== SCANLINES ===== */
.scanlines {
    position: fixed;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 156, 0.03),
        rgba(0, 255, 156, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 999;
}

/* ===== CONTAINER ===== */
.container {
    width: 95%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 150px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 6px #00ff9c);
}
/* TITULO */
h1 {
    font-size: 26px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #00ff9c;
}

.cursor-block {
    display: inline-block;
    width: 8px;
    height: 1em;

    background: #00ff9c;

    margin-left: -10px; /* 🔥 CLAVE: lo mete dentro del texto */
    vertical-align: baseline;

    box-shadow: 0 0 8px #00ff9c;

    animation: blink-cursor 1s infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor-block {
    position: relative;
    top: 2px;
}

.cursor-block {
    box-shadow:
        0 0 5px #00ff9c,
        0 0 10px #00ff9c;
}

/* FIN TITULO */
.subtitle {
    font-size: 13px;
    opacity: 0.7;
}

/* ===== SEARCH ===== */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
    border: 1px solid #00ff9c;
    padding: 10px 14px;
    background: rgba(0, 255, 156, 0.03);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #00ff9c;
    width: 100%;
}

/* ===== Botón X cerrar busqueda ===== */
.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    border: none;
    background: transparent;
    color: #00ff88;
    font-size: 16px;
    z-index: 2; /* 🔥 importante */
}

.clear-btn:hover {
    color: #000;
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    border-radius: 4px;
}

.search-box {
    position: relative;
}

.clear-btn {
    display: none; /* 🔥 oculta por defecto */
}

/* ===== TABLE ===== */
table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: rgba(0, 255, 156, 0.08);
}

th, td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 255, 156, 0.15);
}

/* COLUMNAS */
th:nth-child(1), td:nth-child(1) { width: 40%; }
th:nth-child(2), td:nth-child(2) { width: 15%; }
th:nth-child(3), td:nth-child(3) { width: 10%; }
th:nth-child(4), td:nth-child(4) { width: 10%; }
th:nth-child(5), td:nth-child(5) { width: 25%; }

/* TEXTO LARGO */
td:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* HOVER FILA */
tbody tr:hover {
    background: rgba(0, 255, 156, 0.05);
}

/* ===== ACTIONS ===== */
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== BOTONES ===== */
.btn {
    font-family: 'Share Tech Mono', monospace;
    border: 1px solid #00ff88;
    padding: 6px 10px;
    text-decoration: none;
    color: #00ff88;
    font-size: 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    line-height: 1;
    white-space: nowrap;

    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* ICONOS */
.btn.icon {
    padding: 6px 8px;
}

/* ALTURA UNIFORME */
.actions .btn {
    height: 28px;
}

/* NEON */
.btn.neon {
    box-shadow: 0 0 5px #00ff88;
}

/* HOVER */
.btn:hover {
    background: #00ff88;
    color: #000;
    box-shadow:
        0 0 5px #00ff88,
        0 0 15px #00ff88,
        0 0 30px #00ff88;
    animation: glitch 0.3s linear infinite;
}

/* GLITCH */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

/* EFECTO SCAN */
.btn::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(0,255,136,0.5);
    top: 0;
    left: -100%;
    transition: 0.3s;
}

.btn:hover::before {
    left: 100%;
}

/* COLORES */
.btn.edit {
    border-color: #00e1ff;
    color: #00e1ff;
}

.btn.edit:hover {
    background: #00e1ff;
    box-shadow: 0 0 10px #00e1ff;
}

.btn.delete {
    border-color: #ff3b3b;
    color: #ff3b3b;
}

.btn.delete:hover {
    background: #ff3b3b;
    box-shadow: 0 0 10px #ff3b3b;
}

/* ===== TOOLTIP ===== */
.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #00ff88;
    padding: 4px 8px;
    font-size: 10px;
    opacity: 0;
    pointer-events: none;
    border: 1px solid #00ff88;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ===== RIPPLE ===== */
.ripple span {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.5s linear;
    background: rgba(0,255,136,0.6);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== FOOTER LINKS ===== */
.footer-links a {
    font-family: 'Share Tech Mono', monospace !important;

    color: #00ff88 !important;
    border: 1px solid #00ff88 !important;

    padding: 6px 14px;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
    margin: 0 6px;

    font-size: 12px;

    background: transparent;
    box-shadow: 0 0 5px #00ff88;

    position: relative;
    overflow: hidden;

    transition: all 0.2s ease;
}

/* HOVER */
.footer-links a:hover {
    color: #000 !important;
    background: #00ff88 !important;

    box-shadow:
        0 0 5px #00ff88,
        0 0 15px #00ff88,
        0 0 30px #00ff88;

    animation: glitch 0.3s linear infinite;
}

/* EVITAR COLOR VISITED */
.footer-links a:visited {
    color: #00ff88 !important;
}

/* EFECTO SCAN */
.footer-links a::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(0,255,136,0.5);
    top: 0;
    left: -100%;
    transition: 0.3s;
}

.footer-links a:hover::before {
    left: 100%;
}

/* HOVER PRO */
.footer-links a:hover {
    background: #00ff88;
    color: #000;

    box-shadow:
        0 0 5px #00ff88,
        0 0 15px #00ff88,
        0 0 30px #00ff88;

    animation: glitch 0.3s linear infinite;
}

/* EFECTO SCAN */
.footer-links a::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(0,255,136,0.5);
    top: 0;
    left: -100%;
    transition: 0.3s;
}

.footer-links a:hover::before {
    left: 100%;
}

/* ===== LOGIN ===== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    width: 320px;
    padding: 30px;
    border: 1px solid #00ff9c;
    text-align: center;
}

/* BOTÓN LOGIN */
.login-glitch {
    margin-top: 20px;
    width: 100%;
    padding: 10px;
    border: 1px solid #00ff88;
    color: #00ff88;

    background: linear-gradient(145deg, #002b1a, #001a10);

    box-shadow: 0 0 5px #00ff88 inset;
    transition: all 0.3s ease;
}

.login-glitch:hover {
    color: #000;
    background: #00ff88;

    box-shadow:
        0 0 5px #00ff88,
        0 0 15px #00ff88,
        0 0 30px #00ff88,
        inset 0 0 10px #00ff88;

    animation: glitch-login 0.2s infinite;
}

@keyframes glitch-login {
    0% { transform: translate(0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, -2px); }
    100% { transform: translate(0); }
}

/* ===== LOGIN INPUTS ===== */
.input-group {
    margin: 12px 0;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: #00ff88;
}

.input-group input {
    width: 100%;
    padding: 6px 8px; /* 👈 más delgado */

    background: #001a10;
    border: 1px solid #00ff88;

    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;

    outline: none;
}

/* FOCUS EFECTO */
.input-group input:focus {
    box-shadow: 0 0 10px #00ff88;
    border-color: #00ff88;
}

/* PLACEHOLDER */
.input-group input::placeholder {
    color: rgba(0,255,136,0.5);
}

/* LOGIN BOX MEJORADO */
.login-container {
    width: 320px;
    padding: 30px;

    border: 1px solid #00ff88;
    background: rgba(0, 255, 136, 0.03);

    box-shadow:
        0 0 10px #00ff88,
        inset 0 0 10px rgba(0,255,136,0.2);

    text-align: center;
}

.input-group input {
    transition: all 0.2s ease;
}

.input-group input:hover {
    box-shadow: 0 0 6px #00ff88;
}

.footer-text {
    margin-top: 18px;
    font-size: 11px;
    opacity: 0.6;
    letter-spacing: 2px;
    text-shadow: 0 0 4px #00ff88;
}

/* ===== MOBILE RESPONSIVE TABLE ===== */
/* ===== MOBILE RESPONSIVE PRO COMPACT ===== */
@media (max-width: 768px) {

    thead {
        display: none;
    }

    table, tbody, tr {
        display: block;
        width: 100%;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #00ff88;
        padding: 15px;
        background: rgba(0,255,136,0.04);
    }

    td {
        border: none;
        padding: 4px 0;
    }

    /* NOMBRE */
    .cell-name {
        font-size: 15px;
        font-weight: bold;
        margin-bottom: 8px;
    }

    .cell-name::before {
        content: "Name";
        display: block;
        font-size: 11px;
        opacity: 0.6;
    }

    /* META (fila compacta) */
    .cell-meta {
        display: inline-block;
        margin-right: 12px;
        font-size: 12px;
    }

    .cell-meta::before {
        display: block;
        font-size: 10px;
        opacity: 0.6;
    }

    /* ACCIONES */
    td[data-label="Actions"] {
        margin-top: 10px;
    }

    .actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .actions .btn {
        justify-content: center;
        margin: 0 auto;
    }
}

/* ===== ADMIN FORM BUTTONS ===== */
.form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.form-btn {
    background: #002b1a;
    border: 1px solid #00ff88;
}

.form-btn:hover {
    background: #00ff88;
    color: #000;
}

.small-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.search-icon {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.search-icon svg {
    stroke: #00ff88;
    filter: drop-shadow(0 0 4px #00ff88);
}

td[data-label="Actions"] {
    text-align: center;
}

td[data-label="Actions"] .actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.donate-box {
    text-align: center;
    margin-top: 30px;
}

/* BOTÓN DONATE MÁS PRO */
.donate-btn {
    background: #002b1a;
    border: 1px solid #00ff88;
    color: #00ff88;

    padding: 10px 18px;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;

    transition: all 0.2s ease;
}

.donate-btn:hover {
    background: #00ff88;
    color: #000;

    box-shadow:
        0 0 5px #00ff88,
        0 0 20px #00ff88,
        0 0 40px #00ff88;

    transform: scale(1.05);
}

.donate-btn::before {
    content: "> ";
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);

    align-items: center;
    justify-content: center;
}

/* CAJA */
.modal-content {
    background: #001a10;
    border: 1px solid #00ff88;
    padding: 30px;
    text-align: center;
    width: 320px;

    box-shadow:
        0 0 10px #00ff88,
        0 0 30px #00ff88;
}

/* TEXTO */
.modal-content h2 {
    margin-bottom: 10px;
    color: #00ff88;
}

.modal-content p {
    font-size: 13px;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* BOTONES */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== GLITCH EFFECT ===== */
.glitch:hover {
    animation: glitch 0.2s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, -2px); }
    100% { transform: translate(0); }
}

.cancel-btn {
    background: #002b1a;
    border: 1px solid #00ff88;
    color: #00ff88;

    padding: 10px 18px;
    font-size: 13px;
    cursor: pointer;

    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: #00ff88;
    color: #000;

    box-shadow:
        0 0 5px #00ff88,
        0 0 20px #00ff88;
}

.modal-actions .btn {
    width: 100%;
}

table {
    width: 100%;
    table-layout: fixed;
}

th, td {
    padding: 10px;
    overflow: hidden;
}

/* ===== FIX TABLA DOWNLOADS ===== */

table {
    width: 100%;
    table-layout: fixed;
}

/* columnas balanceadas */
th:nth-child(1), td:nth-child(1) { width: 30%; text-align: left; }
th:nth-child(2), td:nth-child(2) { width: 12%; }
th:nth-child(3), td:nth-child(3) { width: 12%; }
th:nth-child(4), td:nth-child(4) { width: 10%; }
th:nth-child(5), td:nth-child(5) { width: 10%; } /* downloads */
th:nth-child(6), td:nth-child(6) { width: 26%; } /* actions */

/* evitar desbordes */
td {
    overflow: hidden;
}

/* arreglar actions */
.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.popular {
    color: #00ff88;
    text-shadow: 0 0 8px #00ff88;
}

.boot-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;
    padding: 20px;
    z-index: 99999;
}

.boot-screen pre {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.4;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(0, 255, 136, 0.05);
    box-shadow: inset 0 0 10px rgba(0,255,136,0.2);
}

.btn.neon {
    position: relative;
    overflow: hidden;
}

.btn.neon::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(0,255,136,0.4),
        transparent
    );
    transition: 0.4s;
}

.btn.neon:hover::after {
    left: 100%;
}

.cell-meta.updated {
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
    transform: scale(1.2);
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.93);
    box-shadow: 0 0 5px #00ff88 inset;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #00ff88;
    box-shadow: 0 0 5px #00ff88;
}

.system-info {
    color: #00ff88;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

.new-badge {
    margin-left: 6px;
    font-size: 10px;

    color: #00ff88;
    border: 1px solid #00ff88;

    padding: 2px 6px;
    border-radius: 3px;

    text-shadow: 0 0 5px #00ff88;
    box-shadow: 0 0 6px rgba(0,255,136,0.4);
}

/* =========================
   SEARCH BOX HACKER PRO
========================= */

.search-box {
    position: relative;
    border: 1px solid #00ff88;
    padding: 10px 40px 10px 35px;
    background: rgba(0, 255, 136, 0.03);
    overflow: hidden;

    box-shadow:
        0 0 5px #00ff88,
        inset 0 0 5px #00ff88;

    transition: 0.3s;
}

/* glow focus */
.search-box:focus-within {
    box-shadow:
        0 0 10px #00ff88,
        0 0 20px #00ff88,
        inset 0 0 10px #00ff88;
}

/* scan line */
.search-box::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: #00ff88;
    opacity: 0.2;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* input */
#search {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;

    caret-color: #00ff88;
}

/* glow texto */
#search:focus {
    text-shadow:
        0 0 5px #00ff88,
        0 0 10px #00ff88;
}

/* placeholder animado */
#search::placeholder {
    color: #00ff88;
    opacity: 0.5;
    animation: placeholderBlink 1.5s infinite;
}

@keyframes placeholderBlink {
    0%,100% { opacity: 0.5; }
    50% { opacity: 0.1; }
}

/* icono */
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: 0.3s;
}

.search-box:focus-within .search-icon {
    transform: translateY(-50%) scale(1.2);
    filter: drop-shadow(0 0 5px #00ff88);
}

/* botón clear */
.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 36px;
    height: 36px;

    display: none;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    border: none;
    background: transparent;
    color: #00ff88;
    font-size: 16px;
}

.clear-btn:hover {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 10px #00ff88;
    border-radius: 4px;
}

/* glitch focus */
.search-box:focus-within {
    animation: glitch 0.2s linear;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 1px); }
    100% { transform: translate(0); }
}

/* fake autocomplete */
.fake-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #000;
    border: 1px solid #00ff88;
    font-family: monospace;
    font-size: 14px;
    z-index: 10;
}

.fake-suggestions div {
    padding: 5px 10px;
    cursor: pointer;
}

.fake-suggestions div:hover {
    background: #00ff88;
    color: #000;
}