* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #101114;
  color: white;
  font-family: "Orbitron", Arial, sans-serif;
}

body.checking-auth main,
body.checking-auth .hero,
body.checking-auth .mobile-topbar {
  visibility: hidden;
}

.mobile-app {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 198, 255, .2), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(255, 42, 179, .15), transparent 30%),
    linear-gradient(180deg, #0b0d12 0%, #111722 48%, #090b10 100%);
}

.mobile-app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .75;
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(38, 247, 255, .65);
  background: rgba(7, 10, 18, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px);
}

.mobile-logo {
  color: #fff;
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow:
    0 0 14px rgba(38, 247, 255, .9),
    2px 0 0 rgba(255, 42, 179, .55);
}

.mobile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.mobile-tabs a {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(38, 247, 255, .28);
  border-radius: 8px;
  background: rgba(19, 25, 38, .78);
  color: #e7f6ff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.mobile-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px 12px 32px;
}

.mobile-welcome {
  min-height: 118px;
  display: grid;
  align-content: end;
  margin: 4px 0 14px;
  padding: 18px;
  border: 1px solid rgba(216, 255, 63, .32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(38, 247, 255, .18), rgba(255, 42, 179, .08)),
    rgba(15, 20, 32, .74);
  box-shadow: 0 0 28px rgba(38, 247, 255, .16);
}

.mobile-welcome p {
  margin: 0 0 8px;
  color: #d8ff3f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-welcome h1 {
  margin: 0;
  font-size: clamp(24px, 8vw, 38px);
  line-height: 1.02;
  text-shadow: 0 0 18px rgba(38, 247, 255, .65);
}

.mobile-app .container,
.mobile-app .panel,
.mobile-app .ranking-card,
.mobile-app .clip-card {
  border-radius: 8px;
  border-color: rgba(97, 210, 255, .36);
  background: rgba(25, 31, 44, .86);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    0 12px 30px rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
}

.mobile-app .container,
.mobile-app .panel {
  margin: 12px 0;
  padding: 14px;
}

.mobile-app .user-card {
  grid-template-columns: 62px minmax(0, 1fr);
  text-align: left;
  justify-items: stretch;
}

.mobile-app .user-card img {
  width: 62px;
  height: 62px;
}

.mobile-app .user-card h3 {
  font-size: 15px;
}

.mobile-app .user-card p {
  font-size: 11px;
}

.mobile-app .user-actions {
  grid-column: 1 / -1;
  justify-content: stretch;
  display: grid;
  grid-template-columns: 1fr;
}

.mobile-app .user-actions button {
  min-height: 44px;
  padding: 10px;
  font-size: 11px;
}

.mobile-app .upload-grid,
.mobile-app .filters {
  grid-template-columns: 1fr;
}

.mobile-app input[type="file"],
.mobile-app input[type="search"],
.mobile-app .comment-input,
.mobile-app .edit-comment-input,
.mobile-app select {
  min-height: 48px;
  border-radius: 8px;
  background: rgba(9, 13, 22, .92);
}

.mobile-app #uploadSection h2,
.mobile-app .ranking-card h2,
.mobile-app #feed h2 {
  font-size: 23px;
}

.mobile-app .ranking-grid {
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0;
}

.mobile-app .ranking-row {
  grid-template-columns: 38px minmax(0, 1fr);
}

.mobile-app .ranking-row em {
  grid-column: 2;
}

.mobile-app .clip-card {
  margin: 16px 0;
  padding: 14px;
}

.mobile-app .clip-video {
  max-height: 360px;
}

.mobile-app .clip-actions,
.mobile-app .comments-box {
  flex-direction: column;
}

.mobile-app .clip-actions button,
.mobile-app .comments-box button {
  width: 100%;
}

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 255, 190, .2), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(255, 42, 179, .22), transparent 30%),
    linear-gradient(120deg, rgba(6, 9, 19, .7), rgba(8, 10, 18, .92)),
    url("https://images.unsplash.com/photo-1542751371-adc38448a05e?w=1600");
  background-size: cover;
  background-position: center;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 78%, transparent);
  animation: gridDrift 16s linear infinite;
}

.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.energy-line {
  position: absolute;
  width: 52vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, #26f7ff, #ff2ab3, transparent);
  box-shadow: 0 0 18px rgba(38, 247, 255, .9);
  opacity: .78;
  transform: rotate(-18deg);
  animation: energySweep 5.8s ease-in-out infinite;
}

.line-one {
  top: 18%;
  left: -18%;
}

.line-two {
  top: 62%;
  right: -16%;
  animation-delay: 1.4s;
}

.line-three {
  top: 82%;
  left: 8%;
  width: 34vw;
  animation-delay: 2.5s;
}

.scan-line {
  position: absolute;
  inset: -20% 0 auto;
  height: 24vh;
  background: linear-gradient(to bottom, transparent, rgba(0, 255, 198, .12), transparent);
  animation: scanDrop 7s linear infinite;
}

.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8ff3f;
  box-shadow: 0 0 16px #d8ff3f;
  animation: particleFloat 7s ease-in-out infinite;
}

.p1 { left: 12%; top: 28%; }
.p2 { left: 76%; top: 34%; animation-delay: 1.1s; background: #26f7ff; box-shadow: 0 0 16px #26f7ff; }
.p3 { left: 24%; top: 76%; animation-delay: 2.2s; background: #ff2ab3; box-shadow: 0 0 16px #ff2ab3; }
.p4 { left: 86%; top: 70%; animation-delay: 3s; }

.sound-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  min-width: 118px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(216, 255, 63, .75);
  border-radius: 8px;
  background: rgba(13, 17, 29, .72);
  color: #d8ff3f;
  box-shadow: 0 0 18px rgba(216, 255, 63, .24);
  backdrop-filter: blur(12px);
}

.login-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  width: min(18vw, 190px);
  height: min(44vh, 360px);
  border: 1px solid rgba(38, 247, 255, .28);
  background:
    linear-gradient(180deg, rgba(38, 247, 255, .12), transparent 46%, rgba(255, 42, 179, .1)),
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(255, 255, 255, .045) 18px 19px);
  box-shadow: 0 0 38px rgba(38, 247, 255, .16);
  transform: translateY(-50%) skewY(-8deg);
  pointer-events: none;
}

.login-shell::before {
  left: 24px;
  clip-path: polygon(0 0, 100% 9%, 82% 100%, 0 91%);
}

.login-shell::after {
  right: 24px;
  clip-path: polygon(18% 0, 100% 0, 100% 91%, 0 100%);
  transform: translateY(-50%) skewY(8deg);
}

.login-hero {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  text-align: center;
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(14, 19, 33, .88), rgba(9, 12, 21, .72)),
    linear-gradient(90deg, rgba(38, 247, 255, .22), rgba(255, 42, 179, .22));
  border: 1px solid rgba(38, 247, 255, .8);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08) inset,
    0 0 44px rgba(0, 198, 255, .32),
    0 0 80px rgba(255, 42, 179, .18);
  backdrop-filter: blur(14px);
  clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
  animation: panelEnter .8s ease-out both;
}

.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(216, 255, 63, .28);
  clip-path: polygon(0 16px, 16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.login-hero::after {
  inset: auto 28px 0;
  height: 3px;
  border: 0;
  background: linear-gradient(90deg, transparent, #d8ff3f, #26f7ff, #ff2ab3, transparent);
  animation: pulseBar 1.8s ease-in-out infinite;
}

.login-badge::before,
.login-badge::after {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 16px;
  padding: 7px 13px;
  border: 1px solid rgba(216, 255, 63, .65);
  border-radius: 8px;
  color: #d8ff3f;
  background: rgba(216, 255, 63, .08);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-kicker {
  margin: 0 0 12px;
  color: #26f7ff;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.login-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(48px, 12vw, 104px);
  letter-spacing: 0;
  line-height: .92;
  text-shadow:
    3px 0 0 rgba(255, 42, 179, .8),
    -3px 0 0 rgba(38, 247, 255, .8),
    0 0 18px rgba(255, 255, 255, .55),
    0 0 42px rgba(38, 247, 255, .8);
  animation: titleGlitch 4.2s steps(1, end) infinite;
}

.login-hero p {
  line-height: 1.5;
}

.login-copy {
  width: min(100%, 560px);
  margin: 18px auto 0;
  color: #dfe8f8;
  font-size: clamp(15px, 3vw, 19px);
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px auto 8px;
}

.login-stats span {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 12px 8px;
  border: 1px solid rgba(38, 247, 255, .36);
  border-radius: 8px;
  background: rgba(3, 8, 18, .62);
  color: #a9b6cf;
  font-size: 11px;
  text-transform: uppercase;
}

.login-stats strong {
  color: #fff;
  font-size: clamp(16px, 4vw, 24px);
  text-shadow: 0 0 16px rgba(216, 255, 63, .74);
}

.login-main-btn {
  width: min(100%, 360px);
  min-height: 60px;
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .22), transparent 20%, transparent 80%, rgba(255, 255, 255, .18)),
    linear-gradient(135deg, #ff2ab3, #6537ff 42%, #00d7ff);
  color: white;
  font-size: 15px;
  letter-spacing: .8px;
  text-transform: uppercase;
  box-shadow:
    0 0 26px rgba(255, 42, 179, .42),
    0 10px 28px rgba(0, 0, 0, .32);
}

.login-main-btn span {
  position: relative;
  z-index: 1;
}

.login-main-btn:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    0 0 34px rgba(255, 42, 179, .62),
    0 0 38px rgba(38, 247, 255, .45);
}

.login-main-btn:active {
  transform: translateY(0) scale(.99);
}

button,
input,
select {
  font-family: inherit;
}

button {
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 800;
  color: white;
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  box-shadow: 0 4px 15px rgba(0, 114, 255, .32);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 114, 255, .55);
}

button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

main {
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: 0 16px 40px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  padding: 16px 22px;
  background: rgba(11, 15, 26, .95);
  border-bottom: 1px solid #00c6ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(12px);
}

.logo {
  color: white;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 15px #00c6ff;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

nav a:hover {
  color: #00c6ff;
}

.hero {
  width: 100%;
  min-height: 320px;
  text-align: center;
  padding: 84px 20px 78px;
  background:
    linear-gradient(rgba(0, 0, 0, .76), rgba(0, 0, 0, .76)),
    url("https://images.unsplash.com/photo-1542751371-adc38448a05e?w=1600");
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid #00c6ff;
  box-shadow: 0 0 30px rgba(0, 198, 255, .24);
}

.hero h1 {
  font-size: clamp(42px, 9vw, 78px);
  margin: 0;
  text-shadow:
    0 0 10px #00c6ff,
    0 0 22px #00c6ff,
    0 0 42px #00c6ff;
}

.hero p {
  width: min(720px, 100%);
  margin: 16px auto 0;
  color: #e8eef7;
  font-size: clamp(16px, 3vw, 22px);
  line-height: 1.5;
}

.container,
.panel,
.ranking-card {
  background: #181b23;
  border: 1px solid #2b3548;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, .28);
}

.container {
  margin: 24px auto;
  padding: 20px;
  text-align: center;
}

body.is-logged-in #googleLogin {
  display: none !important;
}

body.is-logged-out #googleLogin {
  display: inline-block;
}

.panel {
  margin: 20px auto;
  padding: 20px;
}

.upload-grid,
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 12px;
  align-items: center;
}

.filters {
  grid-template-columns: minmax(0, 1fr) 240px;
}

input[type="file"],
input[type="search"],
.comment-input,
.edit-comment-input,
select {
  width: 100%;
  background: #10141d;
  color: white;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #00a7db;
  outline: none;
}

input[type="file"]::file-selector-button {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  color: white;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  margin-right: 12px;
}

#uploadStatus,
.empty-state,
.login-status {
  color: #b9c7d8;
}

.login-status {
  min-height: 22px;
  margin: 14px 0 0;
  overflow-wrap: anywhere;
}

.user-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  text-align: left;
}

.user-card img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00c6ff;
}

.user-card h3,
.user-card p {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}

.user-card span {
  color: #9fb1c7;
  font-size: 13px;
}

.user-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-actions button {
  min-height: 46px;
  white-space: normal;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.ranking-card {
  padding: 18px;
}

.ranking-card h2,
#feed h2,
#uploadSection h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 4vw, 30px);
}

.ranking-row {
  width: 100%;
  margin-top: 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #222838;
  box-shadow: none;
}

.ranking-row strong {
  overflow-wrap: anywhere;
}

.ranking-row em {
  color: #9fe6ff;
  font-style: normal;
  font-size: 13px;
}

#feed {
  margin-top: 22px;
}

.clip-card {
  max-width: 760px;
  margin: 24px auto;
  padding: 18px;
  background: #181b23;
  border-radius: 14px;
  border: 1px solid #2d384c;
  box-shadow: 0 0 18px rgba(0, 0, 0, .34);
}

.clip-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.user-photo {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name-btn,
.comment-name {
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #9fe6ff;
  font-size: 18px;
  text-align: left;
}

.user-name-btn:hover,
.comment-name:hover {
  transform: none;
  box-shadow: none;
  color: white;
}

.clip-category {
  margin-left: auto;
  border: 1px solid #00c6ff;
  border-radius: 999px;
  padding: 7px 10px;
  color: #bdeeff;
  font-size: 12px;
}

.clip-video {
  width: 100%;
  max-height: 440px;
  border-radius: 12px;
  background: black;
}

.clip-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn-delete,
#confirmDelete {
  background: linear-gradient(45deg, #ff4d4d, #b80000);
}

.comments-list {
  margin-top: 15px;
  background: #121722;
  border-radius: 12px;
  padding: 12px;
}

.comment-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin: 8px 0;
  padding: 10px;
  background: #242b3a;
  border-radius: 10px;
}

.comment-photo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  min-width: 0;
}

.comment-name {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.comment-text {
  display: block;
  color: white;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.comments-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.delete-comment {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #30394c;
  box-shadow: none;
  color: #d7e6f6;
}

.comment-menu {
  display: none;
  grid-column: 2 / -1;
}

.comment-menu.show {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.comment-menu button,
.edit-save-btn,
.edit-cancel-btn {
  padding: 7px 10px;
  font-size: 12px;
  background: #313a4e;
  box-shadow: none;
}

.edit-comment-input {
  margin: 4px 0 8px;
}

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #0b0f1a;
  color: white;
  padding: 14px 20px;
  border: 1px solid #00c6ff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 198, 255, .46);
  z-index: 9999;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  position: relative;
  width: min(440px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #151a25;
  padding: 28px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid #00c6ff;
  box-shadow: 0 0 30px rgba(0, 198, 255, .38);
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #30394c;
  box-shadow: none;
  font-size: 22px;
}

.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00c6ff;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.profile-stats span {
  padding: 12px;
  border-radius: 10px;
  background: #222838;
  font-size: 20px;
  font-weight: 800;
}

.profile-stats small {
  display: block;
  margin-top: 4px;
  color: #9fb1c7;
  font-size: 11px;
}

.profile-clips {
  display: grid;
  gap: 8px;
}

.profile-clips button,
.notification-item {
  width: 100%;
  background: #222838;
  box-shadow: none;
  text-align: left;
}

.notification-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.notification-item img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes titleGlitch {
  0%, 92%, 100% {
    transform: translateX(0);
    filter: none;
  }
  93% {
    transform: translateX(-2px);
    filter: hue-rotate(35deg);
  }
  94% {
    transform: translateX(3px);
  }
  95% {
    transform: translateX(0);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 64px 64px;
  }
}

@keyframes energySweep {
  0%, 100% {
    opacity: .15;
    transform: translateX(-12%) rotate(-18deg);
  }
  50% {
    opacity: .9;
    transform: translateX(28%) rotate(-18deg);
  }
}

@keyframes scanDrop {
  from {
    transform: translateY(-30vh);
  }
  to {
    transform: translateY(130vh);
  }
}

@keyframes particleFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .55;
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.45);
    opacity: 1;
  }
}

@keyframes pulseBar {
  0%, 100% {
    opacity: .35;
    transform: scaleX(.72);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 760px) {
  .login-page {
    overflow-y: auto;
  }

  .sound-toggle {
    top: 12px;
    right: 12px;
    min-width: 104px;
    min-height: 38px;
    font-size: 12px;
  }

  .login-shell {
    min-height: 100svh;
    padding: 74px 14px 22px;
  }

  .login-shell::before,
  .login-shell::after {
    display: none;
  }

  .login-hero {
    padding: 28px 16px 34px;
  }

  .login-stats {
    grid-template-columns: 1fr;
  }

  .login-stats span {
    min-height: 54px;
  }

  .navbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }

  .upload-grid,
  .filters,
  .ranking-grid,
  .user-card {
    grid-template-columns: 1fr;
  }

  .user-card {
    text-align: center;
    justify-items: center;
  }

  .user-actions {
    justify-content: center;
  }

  .clip-category {
    margin-left: 0;
  }

  .comments-box,
  .clip-actions {
    flex-direction: column;
  }

  .comments-box button,
  .clip-actions button {
    width: 100%;
  }

  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .ranking-row em {
    grid-column: 2;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }
}

@media (max-width: 430px) {
  main {
    padding: 0 10px 30px;
  }

  .panel,
  .container,
  .clip-card,
  .ranking-card {
    padding: 14px;
  }

  .comment-item {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    padding: 8px;
  }

  .comment-photo {
    width: 34px;
    height: 34px;
  }
}
