* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f7;
    color: #1f2430;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 32px;
    width: 100%;
    max-width: 480px;
}

h1 {
    font-size: 1.4rem;
    margin: 0 0 20px;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px dashed #c3c8d1;
    border-radius: 8px;
    margin-bottom: 20px;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}

legend {
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

fieldset label {
    display: inline-block;
    margin: 0 16px 8px 0;
    font-size: 0.95rem;
}

button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

button:hover {
    background: #1d4fd1;
}

.campo-copia {
    margin-bottom: 16px;
}

.campo-copia label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.campo-copia .fila {
    display: flex;
    gap: 8px;
}

.campo-copia input,
.campo-copia textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #d7dae0;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

.campo-copia textarea {
    resize: vertical;
    height: 70px;
}

.campo-copia button {
    width: auto;
    padding: 10px 14px;
}

.previsualizacion {
    margin: 20px 0;
    text-align: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.previsualizacion img,
.previsualizacion video {
    max-width: 100%;
    max-height: 320px;
}

.enlace-nuevo {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #2563eb;
    text-decoration: none;
}

.error {
    color: #b91c1c;
    background: #fee2e2;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.card.ancho {
    max-width: 900px;
}

.barra-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #5b6270;
    margin-bottom: 20px;
}

.barra-superior a {
    color: #2563eb;
    text-decoration: none;
}

.enlace-boton {
    background: none;
    border: none;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    padding: 8px 0;
    font-size: 0.9rem;
    width: auto;
}

.enlace-boton:hover {
    background: none;
    color: #1d4fd1;
}

label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

label input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid #d7dae0;
    border-radius: 6px;
    font-weight: normal;
    font-size: 1rem;
}

h2 {
    font-size: 1.1rem;
    margin: 32px 0 16px;
}

.vacio {
    color: #8a8f99;
    font-size: 0.9rem;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.item-archivo {
    background: #f9fafb;
    border: 1px solid #eceef1;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.8rem;
}

.previsualizacion-mini {
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    height: 110px;
    margin-bottom: 8px;
}

.previsualizacion-mini img,
.previsualizacion-mini video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nombre-archivo {
    margin: 0 0 4px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-archivo {
    margin: 0 0 8px;
    color: #8a8f99;
}

.item-archivo .boton-copiar {
    padding: 6px 10px;
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.item-archivo details summary {
    cursor: pointer;
    color: #2563eb;
    font-size: 0.75rem;
}

.item-archivo details textarea {
    width: 100%;
    height: 60px;
    margin-top: 6px;
    font-size: 0.7rem;
    font-family: ui-monospace, monospace;
    padding: 6px;
    border: 1px solid #d7dae0;
    border-radius: 4px;
}
