/* --- BASE & HEADER --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: #fdfdfd; min-height: 100vh; display: flex; flex-direction: column; }
.body-center { align-items: center; justify-content: center; height: 100vh; }

header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; padding: 0 40px; height: 75px; display: flex; align-items: center; }
.header-content { display: flex; align-items: center; width: 100%; justify-content: space-between; }
.header-left { display: flex; align-items: center; }
header img { height: 35px; width: auto; display: block; }
.brand-title { font-weight: 900; text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px; margin-left: 15px; padding-left: 15px; border-left: 2px solid #eee; height: 35px; display: flex; align-items: center; line-height: 1; }

.header-nav { display: flex; gap: 12px; }
.nav-icon { text-decoration: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: #f8f8f8; border-radius: 50%; color: #000; font-size: 18px; transition: 0.2s; }
.nav-icon:hover { background: #000; color: #fff; }

/* --- SECCIÓN DE CARGA (FORMULARIO) --- */
.upload-section { padding: 40px 0; background: #fff; border-bottom: 1px solid #eee; }
.container-small { max-width: 1100px; margin: 0 auto; padding: 0 40px; width: 100%; }
.form-columns { display: flex; gap: 30px; }
.column-left { flex: 1.5; }
.column-right { flex: 1; }

textarea { width: 100%; height: 280px; padding: 20px; border: 1px solid #ddd; border-radius: 12px; resize: none; font-family: monospace; font-size: 14px; outline: none; }
.input-field, .search-input { width: 100%; padding: 14px; border: 1px solid #eee; border-radius: 8px; background: #f9f9f9; margin-bottom: 10px; font-size: 14px; outline: none; }
label { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; color: #777; }

/* Sugerencias de Tags */
.tag-container { margin: 5px 0 15px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tag-pill { background: #eee; padding: 5px 12px; border-radius: 20px; font-size: 10px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.tag-pill:hover { background: #000; color: #fff; }

/* Dropzone Mejorado */
.drop-zone { height: 110px; border: 2px dashed #eee; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fafafa; cursor: pointer; margin-bottom: 10px; transition: 0.3s; }
.drop-zone:hover, .drop-zone--over { border-color: #000; background: #f0f0f0; }
.drop-zone__prompt { font-size: 11px; color: #aaa; font-weight: bold; text-transform: uppercase; text-align: center; }
.drop-zone__input { display: none; }

/* Botón Guardar */
.btn-black { background: #000 !important; color: #fff !important; border: none; padding: 18px; border-radius: 8px; width: 100%; font-weight: bold; cursor: pointer; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }

/* --- BUSCADOR --- */
.search-wrapper { margin-top: 50px; }
.search-tags { margin-top: 15px; display: flex; gap: 10px; }
.filter-pill { background: #fff; border: 1px solid #eee; padding: 8px 16px; border-radius: 8px; font-size: 11px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.filter-pill:hover { background: #000; color: #fff; border-color: #000; }

/* --- GALERÍA (ESTO CORRIGE LAS CARTAS) --- */
.gallery-section { padding: 40px; width: 100%; }
.gallery { column-count: 5; column-gap: 20px; width: 100%; }
.card { break-inside: avoid; background: #fff; border: 1px solid #eee; margin-bottom: 20px; border-radius: 12px; position: relative; overflow: hidden; display: inline-block; width: 100%; }
.card img { width: 100%; display: block; cursor: pointer; }
.tags-preview { padding: 12px; font-size: 10px; color: #bbb; text-transform: uppercase; }

/* Borrar carta */
.delete { position: absolute; top: 10px; right: 10px; }
.delete button { background: #000; color: #fff; border: none; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }

/* --- MODAL Y LOGIN --- */
#modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
.modal-content { display: flex; background: #fff; width: 100%; max-width: 1200px; height: 85vh; border-radius: 20px; overflow: hidden; }
.modal-left { flex: 1.6; background: #000; display: flex; align-items: center; justify-content: center; }
.modal-left img { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal-right { flex: 1; padding: 40px; display: flex; flex-direction: column; }
#mprompt { flex-grow: 1; background: #f8f8f8; padding: 25px; border-radius: 12px; overflow-y: auto; white-space: pre-wrap; font-family: monospace; border: 1px solid #eee; margin-bottom: 20px; font-size: 14px; }

.login-box { background: #fff; border: 1px solid #eee; padding: 45px; border-radius: 20px; width: 380px; text-align: center; }
.btn-eye { position: absolute; right: 12px; bottom: 24px; font-size: 9px; cursor: pointer; font-weight: bold; color: #aaa; text-transform: uppercase; }

footer { padding: 40px; text-align: center; border-top: 1px solid #eee; font-size: 12px; color: #aaa; }