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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0a0a12;
  color: #e0e0ff;
  min-height: 100vh;
}

.neon-text {
  color: #00f0ff;
  text-shadow: 0 0 7px #00f0ff, 0 0 15px #00f0ff, 0 0 30px #00f0ff;
}

.neon-box {
  border: 1px solid #00f0ff44;
  box-shadow: 0 0 15px #00f0ff22, inset 0 0 15px #00f0ff11;
}

.neon-btn {
  background: linear-gradient(90deg, #00f0ff, #ff00aa);
  color: #000;
  font-weight: 700;
  border: none;
  box-shadow: 0 0 15px #00f0ff88, 0 0 30px #ff00aa44;
  transition: all 0.2s;
  cursor: pointer;
}
.neon-btn:hover {
  box-shadow: 0 0 25px #00f0ff, 0 0 50px #ff00aa88;
  transform: scale(1.03);
}
.neon-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #12122a 0%, #0a0a12 100%);
}
.login-box {
  background: #12121f;
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-box h1 { font-size: 2.2rem; margin-bottom: 6px; }
.subtitle { color: #8888aa; margin-bottom: 30px; font-size: 0.95rem; }
.input-group { text-align: left; margin-bottom: 18px; }
.input-group label { display: block; font-size: 0.85rem; color: #00f0ff; margin-bottom: 6px; }
.input-group input {
  width: 100%;
  padding: 12px 14px;
  background: #0a0a15;
  border: 1px solid #00f0ff55;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  outline: none;
}
.input-group input:focus { border-color: #00f0ff; box-shadow: 0 0 12px #00f0ff55; }
.btn {
  width: 100%;
  padding: 13px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
}
.error { color: #ff4488; margin-top: 12px; font-size: 0.9rem; min-height: 20px; }

/* App */
.app { max-width: 960px; margin: 0 auto; padding: 20px; }

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #00f0ff33;
  flex-wrap: wrap;
  gap: 12px;
}
.logo { font-size: 1.6rem; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-email { color: #8888aa; font-size: 0.9rem; }

.role-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: #ff00aa33;
  color: #ff00aa;
  border: 1px solid #ff00aa66;
  box-shadow: 0 0 8px #ff00aa44;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #12121f;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #00ff8855;
  font-size: 0.85rem;
}
.server-status .dot {
  width: 8px; height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
}

.btn-small {
  color: #ff00aa;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid #ff00aa55;
  border-radius: 6px;
}
.btn-small:hover { background: #ff00aa22; box-shadow: 0 0 10px #ff00aa55; }

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.tab {
  padding: 10px 22px;
  background: #12121f;
  border: 1px solid #00f0ff33;
  border-radius: 10px;
  color: #8888aa;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.tab:hover { border-color: #00f0ff; color: #00f0ff; }
.tab.active {
  background: #00f0ff15;
  border-color: #00f0ff;
  color: #00f0ff;
  box-shadow: 0 0 12px #00f0ff44;
}

/* Cards */
.card {
  background: #12121f;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #00f0ff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-tag {
  font-size: 0.7rem;
  background: #ff00aa33;
  color: #ff00aa;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #ff00aa55;
}
.hint { color: #666688; font-size: 0.9rem; margin-bottom: 14px; }

/* Server */
.server-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.server-btn {
  flex: 1;
  min-width: 130px;
  padding: 14px;
  background: #0a0a15;
  border: 1px solid #00f0ff33;
  border-radius: 10px;
  color: #ccc;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.server-btn:hover { border-color: #00f0ff; box-shadow: 0 0 12px #00f0ff44; }
.server-btn.active {
  border-color: #00ff88;
  background: #00ff8811;
  box-shadow: 0 0 15px #00ff8844;
  color: #00ff88;
}
.connect-msg { margin-top: 12px; font-size: 0.9rem; color: #00ff88; min-height: 20px; }

/* Download row */
.download-row { display: flex; gap: 10px; flex-wrap: wrap; }
.download-row input, .download-row select {
  flex: 1;
  min-width: 120px;
  padding: 12px 14px;
  background: #0a0a15;
  border: 1px solid #00f0ff55;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}
.download-row select { max-width: 120px; cursor: pointer; }
.download-row input:focus, .download-row select:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 12px #00f0ff55;
}
.download-row .btn {
  width: auto;
  padding: 12px 22px;
  margin: 0;
  white-space: nowrap;
  border-radius: 8px;
  font-size: 0.95rem;
}

.status-box { margin-top: 12px; font-size: 0.9rem; min-height: 22px; }
.status-box.loading { color: #00f0ff; }
.status-box.success { color: #00ff88; }
.status-box.error { color: #ff4488; }

/* Gallery */
.count { font-size: 0.9rem; color: #8888aa; font-weight: 400; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.empty { color: #555577; grid-column: 1 / -1; text-align: center; padding: 28px; }

.video-card {
  background: #0a0a15;
  border: 1px solid #00f0ff33;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.video-card:hover { border-color: #00f0ff; box-shadow: 0 0 15px #00f0ff33; }

.video-thumb {
  width: 100%;
  height: 135px;
  background: #1a1a2e;
  cursor: pointer;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-thumb .no-thumb {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #00f0ff;
  text-shadow: 0 0 15px #00f0ff;
}

.video-info { padding: 12px; }
.video-title {
  font-size: 0.88rem;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-meta { font-size: 0.78rem; color: #666688; margin-bottom: 10px; }

.video-actions { display: flex; gap: 6px; }
.video-actions button, .video-actions a {
  flex: 1;
  padding: 7px;
  border-radius: 6px;
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #00f0ff44;
  background: transparent;
  color: #00f0ff;
}
.video-actions button:hover, .video-actions a:hover {
  background: #00f0ff22;
  box-shadow: 0 0 8px #00f0ff44;
}
.video-actions .delete-btn { border-color: #ff448844; color: #ff4488; }
.video-actions .delete-btn:hover { background: #ff448822; box-shadow: 0 0 8px #ff448844; }

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }

.modal-content {
  background: #12121f;
  border: 1px solid #00f0ff55;
  border-radius: 14px;
  padding: 20px;
  max-width: 860px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 40px #00f0ff33;
}
.modal-content h3 { margin-bottom: 12px; color: #00f0ff; font-size: 1.05rem; }
.modal-content video { width: 100%; border-radius: 8px; background: #000; }
.modal-content.img-modal { max-width: 700px; }
.modal-content.img-modal img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

.close-btn {
  position: absolute;
  top: 10px; right: 14px;
  background: none; border: none;
  color: #ff00aa;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 600px) {
  .download-row { flex-direction: column; }
  .download-row select { max-width: none; }
  .header { flex-direction: column; align-items: flex-start; }
}
