/* VIBE — additions to the original design system (styles.css). Same palette, glass and radii. */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 300 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 400 900; font-display: swap; src: url('../fonts/outfit-latin.woff2') format('woff2'); }

html, body { height: 100%; overscroll-behavior: none; }
body { padding: env(safe-area-inset-top) 0 0 0; }
.app-container { height: 100dvh; max-height: none; }
@media (min-width: 500px) { .app-container { max-height: 920px; } }
input, textarea, select { user-select: text; -webkit-user-select: text; }

.top-nav { padding-top: calc(env(safe-area-inset-top) * 0.2); }
.bottom-app-nav { margin-bottom: env(safe-area-inset-bottom); }

/* Forms */
.form-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.7); display: block; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px;
  padding: 11px 14px; color: #FFF; font-size: 14px; font-family: inherit; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: rgba(255,255,255,0.55); }
.form-select option { background: #111; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: rgba(255,255,255,0.8); line-height: 1.4; }
.form-check input { width: 18px; height: 18px; flex-shrink: 0; accent-color: #FFF; margin-top: 1px; }
.form-hint { font-size: 11px; color: rgba(255,255,255,0.5); }
.file-pick { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed rgba(255,255,255,0.35); border-radius: 14px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,0.85); }
.file-pick input { display: none; }

/* Cards / sections */
.glass-section { background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%); border: 1px solid rgba(255,255,255,0.14); border-radius: 20px; padding: 18px; margin-bottom: 18px; }
.glass-section h3 { font-size: 15px; font-weight: 900; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.1); white-space: nowrap; }
.pill.ok { color: #00E676; border-color: rgba(0,230,118,0.5); background: rgba(0,230,118,0.12); }
.pill.warn { color: #FFD700; border-color: rgba(255,215,0,0.5); background: rgba(255,215,0,0.12); }
.pill.bad { color: #FF2D55; border-color: rgba(255,45,85,0.5); background: rgba(255,45,85,0.12); }
.btn-secondary { background: rgba(255,255,255,0.12) !important; color: #FFF !important; border: 1px solid rgba(255,255,255,0.3) !important; }
.btn-danger { background: rgba(255,45,85,0.15) !important; color: #FF2D55 !important; border: 1px solid rgba(255,45,85,0.5) !important; }
button[disabled] { opacity: 0.5; pointer-events: none; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.muted { color: rgba(255,255,255,0.55); font-size: 12px; }
.list-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 13px; gap: 10px; }
.list-line:last-child { border-bottom: none; }
.amount-pos { color: #00E676; font-weight: 800; }
.amount-neg { color: #FF6B81; font-weight: 800; }

/* Grids */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.media-tile { position: relative; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; background: #111; cursor: pointer; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; }
.media-tile .tile-badge { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 800; background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 8px; }
.media-tile .tile-lock { position: absolute; right: 6px; top: 6px; font-size: 12px; }
.empty-state { grid-column: 1 / -1; text-align: center; color: rgba(255,255,255,0.5); font-size: 13px; padding: 30px 10px; }

.creators-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.creators-grid .creator-card-small { width: 100%; }

/* Feed states */
.feed-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px; color: rgba(255,255,255,0.75); z-index: 5; }
.feed-state h3 { font-size: 18px; font-weight: 900; color: #FFF; }
.card-video-element { background: #000; }
.video-thumb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.video-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.2); border-top-color: #FFF; animation: vibe-spin 0.8s linear infinite; }
@keyframes vibe-spin { to { transform: rotate(360deg); } }
.like-btn.liked .icon-circle { color: #FF2D55; }
.sound-toggle { position: absolute; top: 75px; right: 16px; z-index: 41; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.3); color: #FFF; display: flex; align-items: center; justify-content: center; }
.sound-toggle svg { width: 18px; height: 18px; }

/* Progress */
.progress { width: 100%; height: 8px; background: rgba(255,255,255,0.12); border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, #FFF, rgba(255,255,255,0.7)); transition: width 0.2s; }

/* Chat */
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 16px; font-size: 13px; line-height: 1.4; word-wrap: break-word; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: rgba(255,255,255,0.9); color: #080A10; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-bottom-left-radius: 4px; }
.bubble .meta { display: block; font-size: 10px; opacity: 0.6; margin-top: 4px; text-align: right; }
.bubble.gift { border: 1px solid rgba(255,215,0,0.6); background: rgba(255,215,0,0.12); color: #FFD700; }
.bubble.pending { opacity: 0.6; }

/* Banners */
.net-banner { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 6px); z-index: 9999; background: rgba(255,45,85,0.9); color: #FFF; font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 20px; display: none; }
.net-banner.show { display: block; }
.announce-banner { margin: 0 0 12px 0; padding: 10px 14px; border-radius: 14px; background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.4); font-size: 12px; }

/* Action sheet */
.sheet-item { width: 100%; text-align: left; padding: 14px 6px; background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.08); color: #FFF; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.sheet-item.danger { color: #FF2D55; }

/* Plans */
.plan-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; }
.plan-card.featured { background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,165,0,0.05) 100%); border-color: rgba(255,215,0,0.5); }
.plan-card.diamond { border-color: rgba(0,132,255,0.5); }
.plan-card .plan-title { font-weight: 800; font-size: 14px; }
.plan-card .plan-feat { font-size: 11px; color: rgba(255,255,255,0.65); }
.plan-card button { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #FFF; font-weight: 800; font-size: 11px; padding: 7px 14px; border-radius: 20px; white-space: nowrap; font-family: inherit; }
.plan-card.featured button { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #000; border: none; }

.toast-msg { position: fixed; bottom: calc(110px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(20,20,28,0.95); border: 1px solid rgba(255,255,255,0.25); color: #FFF; padding: 10px 18px; border-radius: 20px; font-size: 13px; font-weight: 700; opacity: 0; transition: all 0.25s; z-index: 10000; max-width: 90%; text-align: center; pointer-events: none; }
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hidden { display: none !important; }
