@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root { --bg: #0F172A; --card: #1E293B; --input: #334155; --text: #F8FAFC; --text-sec: #94A3B8; --primary: #3B82F6; --border: #334155; --danger: #EF4444; --success: #10B981; --warning: #F59E0B; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; margin: 0; padding: 0; padding-bottom: 120px; box-sizing: border-box; overflow-x: hidden; }
.container { padding: 16px; width: 100%; box-sizing: border-box; }
h3 { font-size: 18px; margin-bottom: 16px; font-weight: 700; color: var(--text); }

/* ЭКРАН ЗАГРУЗКИ */
#app-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.3s; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ОСТАЛЬНОЕ */
.modal-view { background: var(--bg); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 200; overflow-y: auto; padding: 16px; padding-bottom: 150px; box-sizing: border-box; }
.admin-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.admin-card { background: var(--card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.admin-btn { padding: 8px 16px; font-size: 13px; border-radius: 8px; border: none; cursor: pointer; color: #fff; font-weight: 600; text-align: center; margin: 0; }
.ab-green { background: var(--success); }
.ab-red { background: var(--danger); }
.admin-dashboard { background: #273548; padding: 15px; border-radius: 12px; margin-top: 15px; }
.dash-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14px; }
.dash-row:last-child { border: none; }
.dash-val { font-weight: bold; color: var(--primary); }
.upload-box { border: 2px dashed var(--border); background: rgba(255,255,255,0.02); border-radius: 16px; padding: 24px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; position: relative; }
.upload-box.filled { border: none; padding: 0; background: none; }
.upload-box.filled .upload-icon, .upload-box.filled .upload-text { display: none; }
.upload-preview { width: 100%; height: 200px; object-fit: cover; border-radius: 16px; display: none; }
.remove-img-btn { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.6); color: white; width: 30px; height: 30px; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 16px; z-index: 10; }
input[type="file"] { display: none; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-orange { background: var(--warning); box-shadow: 0 0 5px var(--warning); }
.dot-green { background: var(--success); box-shadow: 0 0 5px var(--success); }
.santa-banner { background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); gap: 8px; }
.sb-title { font-size: 20px; font-weight: 700; color: #FFF; }
.sb-desc { font-size: 14px; color: var(--text-sec); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 20px; }
.cat-card { background: var(--card); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; border: 1px solid rgba(255,255,255,0.05); aspect-ratio: 1 / 1; transition: 0.1s; }
.cat-card:active { background: #334155; transform: scale(0.98); }
.cat-icon { font-size: 36px; margin-bottom: 12px; display: block; } 
.cat-name { font-weight: 600; font-size: 14px; color: var(--text); }
input, textarea { width: 100%; background: var(--input); border: 1px solid transparent; border-radius: 12px; padding: 14px; color: white; font-size: 15px; margin-bottom: 16px; box-sizing: border-box; outline: none; font-family: 'Inter', sans-serif; }
input:focus, textarea:focus { border-color: var(--primary); background: #475569; }
.custom-select { position: relative; width: 100%; margin-bottom: 16px; }
.select-trigger { background: var(--input); padding: 14px; border-radius: 12px; color: white; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.select-options { position: absolute; top: 100%; left: 0; right: 0; background: #1E293B; border-radius: 12px; margin-top: 5px; max-height: 250px; overflow-y: auto; z-index: 100; display: none; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--border); }
.select-options.open { display: block; }
.option { padding: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.option:hover { background: var(--primary); }
.btn { width: 100%; padding: 14px; border-radius: 12px; font-weight: 600; border: none; cursor: pointer; background: var(--primary); color: white; text-align: center; margin-top: 10px; font-size: 16px; }
.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn-sm { padding: 8px 16px; font-size: 13px; width: auto; margin: 0; }
.btn-danger { background: var(--danger); }
.btn-gray { background: #475569; }
.btn-vip { background: linear-gradient(90deg, #F59E0B, #D97706); color: black; }
.card { background: var(--card); border-radius: 16px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; max-width: 100%; }
.card-premium { border: 2px solid #EF4444 !important; box-shadow: 0 0 15px rgba(239, 68, 68, 0.3) !important; }
.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.link-btn { color: var(--text-sec); font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.list-item { background: var(--card); padding: 16px; border-radius: 14px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.list-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.progress { width: 100%; height: 6px; background: #334155; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.fill { height: 100%; background: linear-gradient(90deg, #3B82F6, #6366F1); }
.nav-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 80px; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); display: flex; justify-content: space-around; align-items: center; border-top: 1px solid rgba(255,255,255,0.05); z-index: 500; padding-bottom: 10px; }
.nav-item { display: flex; flex-direction: column; align-items: center; color: #64748B; font-size: 11px; font-weight: 500; gap: 6px; cursor: pointer; }
.nav-item.active { color: var(--primary); }
.h-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin: 0 -16px; padding: 0 16px 10px 16px; scrollbar-width: none; }
.h-card { min-width: 200px; background: var(--card); border-radius: 14px; padding: 0; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.h-img { width: 100%; height: 110px; object-fit: cover; }
.h-content { padding: 12px; }
.hidden { display: none !important; }
.feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feed-card { background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); cursor:pointer;}
.feed-card img { width: 100%; height: 120px; object-fit: cover; }
.feed-info { padding: 10px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.toggle-label { font-size: 15px; color: #FFF; font-weight: 600; }
input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--primary); }
p, .sb-info span, .h-title, .feed-info, #det-desc { word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap; max-width: 100%; }
