@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --cyan: #00d5ff;
  --cyan-bright: #5cf0ff;
  --blue: #006eff;
  --blue-deep: #0046b8;
  --blue-soft: #00bfff;
  --glass: rgba(6, 14, 32, 0.62);
  --glass-strong: rgba(4, 12, 28, 0.82);
  --glass-soft: rgba(255, 255, 255, 0.04);
  --text: #f4fbff;
  --muted: #9ecfff;
  --muted-2: #7aa8c8;
  --danger: #ff4d6d;
  --danger-deep: #b01030;
  --success: #00e6a0;
  --border: rgba(0, 200, 255, 0.28);
  --border-strong: rgba(0, 220, 255, 0.55);
  --shadow: 0 10px 40px rgba(0, 20, 60, 0.55);
  --glow: 0 0 24px rgba(0, 180, 255, 0.35);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rajdhani', sans-serif;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 100, 200, 0.35), transparent 55%),
    linear-gradient(-45deg, #000000, #02142f, #003b6f, #000814, #001d3d);
  background-size: auto, 500% 500%;
  animation: bgMove 18s ease infinite;
  position: relative;
  overflow-x: hidden;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

@keyframes bgMove {
  0% { background-position: center, 0% 50%; }
  50% { background-position: center, 100% 50%; }
  100% { background-position: center, 0% 50%; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 190, 255, 0.32), transparent 22%),
    radial-gradient(circle at 88% 78%, rgba(0, 110, 255, 0.3), transparent 24%),
    radial-gradient(circle at 50% 48%, rgba(0, 255, 255, 0.1), transparent 28%);
  filter: blur(36px);
  animation: floating 10s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

@keyframes floating {
  0% { transform: translateY(-18px) scale(1); }
  100% { transform: translateY(22px) scale(1.15); }
}

.stars {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan), 0 0 22px rgba(0, 213, 255, 0.5);
  animation: blink 3.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(0.45); }
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
}

.login-wrap {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.login-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(320px, 88vw);
}

.live-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(6, 14, 32, 0.7);
  border: 1px solid rgba(0, 200, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 180, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e6a0;
  box-shadow: 0 0 10px #00e6a0;
  animation: livePulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.live-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: lowercase;
}

.live-eq {
  color: rgba(158, 207, 255, 0.55);
  font-size: 12px;
}

.live-num {
  color: #fff;
  font-size: 16px;
  text-shadow: 0 0 12px var(--cyan);
  min-width: 1.5ch;
}

.login-box,
.card,
.modal-box {
  background:
    linear-gradient(165deg, rgba(20, 40, 70, 0.35), transparent 45%),
    var(--glass);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    var(--glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.login-box::before,
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 255, 0.7), transparent);
  pointer-events: none;
}

.login-box {
  width: 100%;
  padding: 28px 24px 22px;
  animation: floatCard 5s ease-in-out infinite;
}

.login-box::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.18), transparent 70%);
  pointer-events: none;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.wolf {
  font-size: 52px;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1;
  animation: wolfGlow 2.2s ease-in-out infinite alternate;
  position: relative;
  z-index: 1;
}

@keyframes wolfGlow {
  from { filter: drop-shadow(0 0 8px #00aaff) drop-shadow(0 0 18px rgba(0, 200, 255, 0.4)); }
  to { filter: drop-shadow(0 0 22px #00ffff) drop-shadow(0 0 40px rgba(0, 255, 255, 0.45)); }
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.brand-title {
  text-align: center;
  color: white;
  font-size: clamp(22px, 4.5vw, 26px);
  letter-spacing: 2px;
  text-shadow:
    0 0 18px var(--blue-soft),
    0 0 40px rgba(0, 150, 255, 0.45);
  position: relative;
  z-index: 1;
}

.brand-sub {
  text-align: center;
  color: var(--muted);
  margin: 8px 0 18px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.login-box .input-box {
  margin-bottom: 12px;
}

.login-box .input-box input {
  padding: 11px 16px;
  font-size: 14px;
}

.login-box button {
  padding: 11px 16px;
  font-size: 14px;
}

.login-box .footer {
  margin-top: 14px;
  font-size: 12px;
}

.tg-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--cyan);
  font-size: 13px;
  text-decoration: none;
  word-break: break-all;
  position: relative;
  z-index: 1;
  transition: color 0.25s, text-shadow 0.25s;
}

.tg-link:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--cyan);
}

.input-box {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.input-box label,
.field-label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.input-box input,
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 180, 255, 0.35);
  background: rgba(0, 20, 45, 0.45);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

.field textarea {
  border-radius: var(--radius-sm);
  min-height: 90px;
  resize: vertical;
}

.input-box input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: #8fbfdf;
  opacity: 0.85;
}

.input-box input:hover,
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(0, 220, 255, 0.55);
  background: rgba(0, 30, 60, 0.55);
}

.input-box input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--cyan-bright);
  background: rgba(0, 35, 70, 0.6);
  box-shadow:
    0 0 0 3px rgba(0, 213, 255, 0.12),
    0 0 18px rgba(0, 191, 255, 0.35);
}

.field select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
    linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field select option {
  background: #02142f;
  color: white;
}

.btn,
button {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.8px;
  cursor: pointer;
  color: white;
  background: linear-gradient(105deg, var(--blue-deep), var(--blue) 40%, var(--cyan));
  background-size: 160% 100%;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.45s var(--ease), filter 0.3s;
  box-shadow: 0 6px 22px rgba(0, 140, 255, 0.4);
  position: relative;
  z-index: 1;
}

.btn:hover,
button:hover {
  transform: translateY(-2px) scale(1.02);
  background-position: 100% 0;
  box-shadow: 0 10px 32px rgba(0, 200, 255, 0.5);
  filter: brightness(1.05);
}

.btn:active,
button:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.2);
}

.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-sm {
  width: auto;
  padding: 8px 15px;
  font-size: 13px;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 140, 255, 0.28);
}

.btn-ghost {
  background: rgba(0, 40, 80, 0.35);
  border: 1.5px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(0, 160, 255, 0.15);
  border-color: var(--border-strong);
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.25);
  filter: none;
}

.btn-danger {
  background: linear-gradient(105deg, var(--danger-deep), var(--danger));
  box-shadow: 0 4px 16px rgba(255, 77, 109, 0.35);
}

.btn-danger:hover {
  box-shadow: 0 8px 24px rgba(255, 77, 109, 0.55);
}

.footer {
  margin-top: 22px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.msg {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  min-height: 22px;
  transition: color 0.25s;
}

.msg.error {
  color: var(--danger);
  text-shadow: 0 0 12px rgba(255, 77, 109, 0.35);
}

.msg.success {
  color: var(--success);
  text-shadow: 0 0 12px rgba(0, 230, 160, 0.35);
}

/* Dashboard */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 10, 28, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-brand .wolf-sm {
  font-size: 30px;
  filter: drop-shadow(0 0 12px #00aaff);
  animation: wolfGlow 2.5s ease-in-out infinite alternate;
}

.topbar-brand h1 {
  font-size: 17px;
  letter-spacing: 2px;
  text-shadow: 0 0 14px var(--blue-soft);
}

.topbar-meta {
  color: #f6fbff;
  font-size: 13px;
  margin-top: 2px;
  opacity: 0.85;
  font-weight: 500;
}

.mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  background: rgba(0, 20, 45, 0.45);
  border: 1px solid rgba(0, 180, 255, 0.15);
  border-radius: 999px;
  width: fit-content;
}

.mode-btn {
  width: auto !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  opacity: 0.65;
}

.mode-btn:hover {
  opacity: 1;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
  background: rgba(0, 160, 255, 0.12) !important;
}

.mode-btn.active {
  opacity: 1;
  background: linear-gradient(105deg, var(--blue), var(--cyan)) !important;
  box-shadow: 0 3px 14px rgba(0, 180, 255, 0.35) !important;
}

.field-sm input {
  padding: 10px 16px !important;
  font-size: 14px !important;
}

.field-sm .field-label {
  font-size: 12px;
  margin-bottom: 6px;
}

.field-sm .hint {
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.container {
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 30px 0 56px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 20px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 16px rgba(0, 191, 255, 0.45);
}

.section-head p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat {
  padding: 24px 18px;
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.stat:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow:
    var(--shadow),
    0 0 32px rgba(0, 180, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat .label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
}

.stat .value {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  margin-top: 10px;
  background: linear-gradient(180deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 213, 255, 0.35));
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.card {
  padding: 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: rgba(0, 210, 255, 0.4);
}

.card h3 {
  font-size: 14px;
  margin-bottom: 18px;
  color: #e8f9ff;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  flex-shrink: 0;
}

.field {
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin: 8px 0 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 15, 35, 0.35);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 180, 255, 0.12);
  font-size: 15px;
}

th {
  color: var(--cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(0, 60, 110, 0.45), rgba(0, 30, 60, 0.35));
  position: sticky;
  top: 0;
}

td {
  color: #d7ecff;
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(0, 180, 255, 0.08);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 160, 255, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge.unlimited {
  border-color: rgba(0, 230, 160, 0.45);
  background: rgba(0, 230, 160, 0.1);
  color: var(--success);
  box-shadow: 0 0 12px rgba(0, 230, 160, 0.15);
}

.short-link {
  color: var(--cyan-bright);
  text-decoration: none;
  word-break: break-all;
  font-weight: 600;
  transition: color 0.25s, text-shadow 0.25s;
}

.short-link:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--cyan);
  text-decoration: none;
}

.empty {
  text-align: center;
  color: var(--muted-2);
  padding: 36px 12px;
  font-size: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 4, 16, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: min(480px, 94vw);
  padding: 28px;
  animation: modalPop 0.35s var(--ease);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-box h3 {
  margin-bottom: 18px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 6px;
  background: rgba(0, 20, 45, 0.4);
  border: 1px solid rgba(0, 180, 255, 0.15);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

.tab {
  width: auto;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  opacity: 0.7;
  font-size: 14px;
}

.tab:hover {
  opacity: 1;
  background: rgba(0, 160, 255, 0.1);
  transform: none;
  filter: none;
  box-shadow: none;
}

.tab.active {
  opacity: 1;
  background: linear-gradient(105deg, var(--blue), var(--cyan));
  box-shadow: 0 4px 18px rgba(0, 180, 255, 0.4);
  border-color: transparent;
}

.panel { display: none; }
.panel.active {
  display: block;
  animation: panelIn 0.35s var(--ease);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hint {
  color: var(--muted-2);
  font-size: 13px;
  margin-top: 8px;
  padding-left: 4px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 15, 35, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  border-radius: 999px;
  border: 2px solid rgba(0, 15, 35, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

::selection {
  background: rgba(0, 200, 255, 0.35);
  color: #fff;
}

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .tabs {
    border-radius: 18px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .stats { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .login-box { padding: 24px 18px 20px; }
  .container { padding-top: 20px; }
  .modal-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
