/* CLIPS — flat single-color theme. Accent: #e5484d. Everything else: neutrals. */
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; color: #f5f5f5; background: #111111; min-height: 100vh; }
.hidden { display: none !important; }
.muted { color: #a0a0a0; } .small { font-size: 12px; } .center-text { text-align: center; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card { background: #1b1b1b; border: 1px solid #2a2a2a; border-radius: 16px; padding: 32px; }
.auth-card { width: 360px; text-align: center; }
.logo { width: 56px; height: 56px; margin: 0 auto; border-radius: 14px; background: #e5484d; color: #fff; font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.auth-card h1 { margin: 12px 0 4px; letter-spacing: 4px; }
.tabs { display: flex; gap: 8px; margin: 20px 0 12px; }
.tab { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #2a2a2a; background: transparent; color: #d0d0d0; cursor: pointer; }
.tab.active { background: #e5484d; border-color: #e5484d; color: #fff; font-weight: 600; }
input[type=text], input[type=password] { width: 100%; padding: 12px; margin: 6px 0; border-radius: 10px; border: 1px solid #2a2a2a; background: #111111; color: #fff; outline: none; }
input:focus { border-color: #e5484d; }
button.primary { width: 100%; padding: 12px; margin-top: 10px; border: none; border-radius: 10px; background: #e5484d; color: #fff; font-weight: 700; cursor: pointer; font-size: 15px; }
button.primary:hover { background: #c93a3f; }
.error { color: #e5484d; min-height: 20px; font-size: 14px; }

header { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; position: sticky; top: 0; z-index: 5; background: #111111; border-bottom: 1px solid #2a2a2a; }
.brand { font-weight: 800; font-size: 22px; letter-spacing: 3px; }
.brand .dot { color: #e5484d; }
.header-right { display: flex; gap: 12px; align-items: center; }
button.ghost, a.ghost.btn { background: #1b1b1b; border: 1px solid #2a2a2a; color: #f5f5f5; padding: 8px 14px; border-radius: 9px; cursor: pointer; text-decoration: none; font-size: 14px; }
button.ghost:hover, a.ghost.btn:hover { border-color: #e5484d; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }
#dropzone { border: 2px dashed #2a2a2a; border-radius: 16px; padding: 28px; text-align: center; background: #1b1b1b; transition: .2s; }
#dropzone.dragover { border-color: #e5484d; }
.link { color: #e5484d; cursor: pointer; text-decoration: underline; }
.dz-icon { color: #e5484d; }
#uploadList { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.up-item { background: #1b1b1b; border: 1px solid #2a2a2a; border-radius: 10px; padding: 8px 12px; font-size: 14px; text-align: left; }
.up-item .bar { height: 6px; background: #2a2a2a; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.up-item .bar > div { height: 100%; background: #e5484d; width: 0%; transition: width .2s; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; }
.chip { padding: 8px 16px; border-radius: 20px; border: 1px solid #2a2a2a; background: #1b1b1b; color: #d0d0d0; cursor: pointer; }
.chip.active { background: #e5484d; color: #fff; border-color: #e5484d; }
#search { padding: 9px 14px; border-radius: 20px; border: 1px solid #2a2a2a; background: #1b1b1b; color: #fff; min-width: 220px; outline: none; }
#search:focus { border-color: #e5484d; }

/* Clips feed: tall 9:16 video cards, square photo cards */
#gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { background: #1b1b1b; border: 1px solid #2a2a2a; border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s; }
.tile:hover { transform: translateY(-3px); border-color: #e5484d; }
.thumb { width: 100%; object-fit: cover; display: block; background: #000; }
.thumb-video { aspect-ratio: 9 / 16; }
.thumb-img { aspect-ratio: 1 / 1; }
.tile-media { position: relative; }
.tile-tag { position: absolute; top: 8px; left: 8px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; }
.tile-tag.photo { background: #3a3a3a; }
/* CSS play triangle (no emoji) */
.vid-badge { position: relative; }
.vid-badge::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-top: 16px solid transparent; border-bottom: 16px solid transparent; border-left: 26px solid #fff; pointer-events: none; }
.tile-info { padding: 10px 12px; }
.tile-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { font-size: 12px; color: #a0a0a0; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.del { background: none; border: 1px solid #2a2a2a; border-radius: 6px; color: #d0d0d0; cursor: pointer; font-size: 12px; padding: 3px 8px; }
.del:hover { border-color: #e5484d; color: #e5484d; }
.tile-del { width: 100%; margin-top: 8px; padding: 6px; }

.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.modal-box { position: relative; background: #1b1b1b; border-radius: 16px; max-width: 900px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #2a2a2a; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #2a2a2a; gap: 10px; }
.modal-body { padding: 16px; overflow: auto; display: flex; justify-content: center; }
.modal-body img, .modal-body video { max-width: 100%; max-height: 70vh; border-radius: 10px; }
