/* ===== dava media — премиальный аниме-стиль ===== */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --pink:   #ff5fa2;
  --magenta:#c44b ;
  --violet: #8b5cf6;
  --cyan:   #38f4e0;
  --txt:    #f2eaff;
  --muted:  #b9a7d9;
  --glass:  rgba(28, 20, 48, 0.55);
  --glass-brd: rgba(255, 255, 255, 0.14);
  --err:    #ff7a8a;
  --ok:     #6ee7b7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* тёмный фон на html — закрывает белые полосы в safe-area и при overscroll */
html {
  background: #160a2b;
  min-height: 100%;
}

body {
  font-family: 'Poppins', 'M PLUS Rounded 1c', sans-serif;
  color: var(--txt);
  background: linear-gradient(-45deg, #1a0b2e, #3a1659, #5b1e6b, #1e2a78, #0e2a55);
  background-size: 400% 400%;
  background-attachment: fixed;
  animation: bgshift 22s ease infinite;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}
@keyframes bgshift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* светящиеся орбы на фоне */
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(90px);
  opacity: 0.5; z-index: 0; pointer-events: none;
}
body::before { width: 480px; height: 480px; background: var(--pink);
  top: -120px; right: -100px; animation: float1 16s ease-in-out infinite; }
body::after  { width: 420px; height: 420px; background: var(--cyan);
  bottom: -140px; left: -120px; animation: float2 19s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(-60px, 80px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(80px, -60px) scale(1.15); } }

/* падающие лепестки сакуры */
.petal {
  position: fixed; top: -40px; z-index: 1; pointer-events: none;
  width: 14px; height: 14px; background: var(--pink); opacity: 0.7;
  border-radius: 150% 0 150% 0;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translateY(-40px) rotate(0deg);   opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translateY(105vh) rotate(540deg);  opacity: 0; }
}

.wrap {
  position: relative; z-index: 2;
  max-width: 720px; margin: 0 auto; padding: 40px 20px 80px;
}

/* шапка */
.brand { text-align: center; margin-bottom: 28px; }
.logo {
  width: clamp(150px, 40vw, 230px); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 6px 26px rgba(255, 95, 162, 0.4));
  animation: logofloat 5s ease-in-out infinite;
}
.logo-sm { width: clamp(120px, 32vw, 170px); }
@keyframes logofloat { 50% { transform: translateY(-7px); } }
.brand h1 {
  font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 800;
  font-size: clamp(32px, 6vw, 48px); letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--violet));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
  text-shadow: 0 0 40px rgba(255, 95, 162, 0.25);
}
@keyframes shine { to { background-position: 200% center; } }
.brand p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* стеклянная карточка */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 22px;
  padding: 26px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* вкладки */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; justify-content: center; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.05);
  color: var(--muted); padding: 10px 18px; border-radius: 14px;
  cursor: pointer; font-size: 14px; font-weight: 600; transition: .25s;
  font-family: inherit;
}
.tab:hover { color: var(--txt); transform: translateY(-2px); }
.tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  box-shadow: 0 8px 24px rgba(255, 95, 162, 0.4);
}

.panel { display: none; }
.panel.active { display: block; animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=url], input[type=password], input[type=text], select {
  width: 100%; padding: 13px 15px; border-radius: 13px;
  border: 1px solid var(--glass-brd); background: rgba(10, 6, 22, 0.5);
  color: var(--txt); font-size: 15px; font-family: inherit; outline: none; transition: .2s;
}
input:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,95,162,.18); }
select option { background: #1a0b2e; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

/* кнопка */
.btn {
  width: 100%; margin-top: 20px; padding: 15px; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; color: #fff; cursor: pointer;
  font-family: 'M PLUS Rounded 1c', inherit;
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
  background-size: 200% auto; transition: .3s;
  box-shadow: 0 10px 30px rgba(255, 95, 162, 0.35);
}
.btn:hover:not(:disabled) { background-position: right center; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(139, 92, 246, 0.5); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* зона загрузки файла */
.drop {
  margin-top: 8px; border: 2px dashed var(--glass-brd); border-radius: 16px;
  padding: 30px 16px; text-align: center; color: var(--muted); cursor: pointer;
  transition: .25s; background: rgba(255,255,255,0.03);
}
.drop:hover, .drop.over { border-color: var(--pink); color: var(--txt); background: rgba(255,95,162,.08); }
.drop b { color: var(--txt); }

.status { margin-top: 18px; font-size: 14px; min-height: 20px; text-align: center; }
.status.err { color: var(--err); }
.status.ok  { color: var(--ok); }
.spinner {
  display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite;
  vertical-align: -2px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

a.dl {
  display: block; margin-top: 16px; text-align: center; padding: 14px; border-radius: 13px;
  text-decoration: none; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, rgba(110,231,183,.25), rgba(56,244,224,.25));
  border: 1px solid var(--ok);
}

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; line-height: 1.7; }
.foot a { color: var(--cyan); text-decoration: none; }

/* оверлей логина */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 6, 22, 0.7); backdrop-filter: blur(8px); padding: 20px;
}
.overlay .card { max-width: 380px; width: 100%; }
.hidden { display: none !important; }

/* админка: статы */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.stat {
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-brd);
  border-radius: 16px; padding: 18px; text-align: center;
}
.stat .num { font-family: 'M PLUS Rounded 1c'; font-size: 30px; font-weight: 800;
  background: linear-gradient(90deg, var(--pink), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: 12px; margin-top: 4px; }
.bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 8px; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--pink), var(--violet)); }
table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.07); }
th { color: var(--muted); font-weight: 600; }
.pill { padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.pill.video { background: rgba(255,95,162,.2); color: var(--pink); }
.pill.image { background: rgba(56,244,224,.2); color: var(--cyan); }
.pill.audio { background: rgba(139,92,246,.25); color: #c4b5fd; }
