* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #07080c;
  --panel: #11131a;
  --panel2: #171a23;
  --line: rgba(255,255,255,.085);
  --text: #f5f7fb;
  --muted: #8c92a1;
  --soft: #515866;
  --accent: #6aa6ff;
  --accent2: #8b7cff;
  --danger: #ff6b6b;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -12%, rgba(106,166,255,.18), transparent 32%),
    radial-gradient(circle at 95% 18%, rgba(139,124,255,.10), transparent 22%),
    radial-gradient(circle at 5% 85%, rgba(106,166,255,.06), transparent 25%);
  animation: ambient 8s ease-in-out infinite alternate;
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.035) 45%, transparent 56%);
  transform: translateX(-110%);
  animation: pageShine 7s ease-in-out infinite;
}

@keyframes ambient {
  from { transform: translateY(0) scale(1); opacity: .82; }
  to { transform: translateY(12px) scale(1.06); opacity: 1; }
}

@keyframes pageShine {
  0%, 45% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

.app {
  position: relative;
  width: min(100%, 520px);
  margin: auto;
  padding: 14px 12px 30px;
  animation: appIn .45s ease both;
}

@keyframes appIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.top {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -.8px;
  position: relative;
  overflow: hidden;
  color: var(--accent);
  animation: logoBreath 3.4s ease-in-out infinite;
}

.logo::after {
  content: "";
  position: absolute;
  inset: -60%;
  background: linear-gradient(90deg, transparent, rgba(106,166,255,.24), transparent);
  transform: rotate(25deg) translateX(-80%);
  animation: scan 3.8s infinite;
}

@keyframes logoBreath {
  0%, 100% { box-shadow: 0 0 0 rgba(106,166,255,0); transform: scale(1); }
  50% { box-shadow: 0 0 24px rgba(106,166,255,.16); transform: scale(1.025); }
}

@keyframes scan {
  0%, 45% { transform: rotate(25deg) translateX(-80%); }
  100% { transform: rotate(25deg) translateX(80%); }
}

.brand strong {
  display: block;
  width: max-content;
  font-size: 21px;
  letter-spacing: -.6px;
  line-height: 1;
  text-transform: lowercase;
  background: linear-gradient(90deg, #f5f7fb 0%, #9fc7ff 45%, #f5f7fb 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nameGlow 4s ease-in-out infinite;
  position: relative;
}

.brand strong::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(.15);
  opacity: .55;
  animation: underline 3.2s ease-in-out infinite;
}

@keyframes nameGlow {
  0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 0 rgba(106,166,255,0)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 10px rgba(106,166,255,.18)); }
}

@keyframes underline {
  0%, 100% { transform: scaleX(.18); opacity: .35; }
  50% { transform: scaleX(1); opacity: .8; }
}

.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  transition: .18s ease;
  animation: supportFloat 3s ease-in-out infinite;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes supportFloat {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 rgba(106,166,255,0); }
  50% { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(106,166,255,.12); }
}

.icon-btn:active {
  transform: scale(.95);
  background: var(--accent);
  color: #07101d;
}

.search, .form-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 14px;
  margin-bottom: 12px;
  transition: .2s ease;
  animation: slideIn .45s ease .08s both;
}

.form-box {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.search:focus-within, .form-box:focus-within {
  border-color: rgba(106,166,255,.42);
  box-shadow: 0 0 0 4px rgba(106,166,255,.055);
}

.search span {
  color: var(--accent);
  font-weight: 900;
  animation: searchPulse 2.8s ease-in-out infinite;
}

@keyframes searchPulse {
  0%, 100% { opacity: .75; }
  50% { opacity: 1; text-shadow: 0 0 12px rgba(106,166,255,.45); }
}

input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

input::placeholder {
  color: var(--soft);
}

.file-input {
  border: 1px dashed rgba(106,166,255,.22);
  border-radius: 14px;
  padding: 13px;
  background: #0b0d12;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 12px 2px 10px;
}

.bar b {
  color: var(--text);
  font-size: 15px;
}

.link-btn {
  text-decoration: none;
  color: var(--accent);
  font-weight: 900;
  background: transparent;
  border: 0;
}

.files {
  display: grid;
  gap: 9px;
}

.file {
  position: relative;
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 11px;
  align-items: center;
  min-height: 74px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 11px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  animation: enter .48s cubic-bezier(.2,.9,.2,1) forwards;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

@keyframes enter {
  to { opacity: 1; transform: translateY(0); }
}

.file::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.035) 45%, transparent 58%);
  transform: translateX(-115%);
  transition: .45s ease;
}

.file:hover::after,
.file:active::after {
  transform: translateX(115%);
}

.file:active {
  transform: scale(.985);
  background: var(--panel2);
  border-color: rgba(106,166,255,.18);
}

.file::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: .8;
  animation: sideGlow 3.2s ease-in-out infinite;
}

@keyframes sideGlow {
  0%, 100% { opacity: .55; box-shadow: 0 0 0 rgba(106,166,255,0); }
  50% { opacity: 1; box-shadow: 0 0 14px rgba(106,166,255,.38); }
}

.txt {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #0b0d12;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 11px;
  font-weight: 1000;
  z-index: 2;
}

.info {
  min-width: 0;
  z-index: 2;
}

.info strong {
  display: block;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.2px;
}

.info small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actions {
  display: flex;
  gap: 7px;
  z-index: 2;
}

.btn {
  border: 0;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 11px;
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  transition: transform .16s ease, filter .16s ease;
}

.btn:active {
  transform: scale(.94);
}

.btn.get, .submit {
  color: #07101d;
  background: linear-gradient(135deg, var(--accent), #b8d4ff);
  border-color: transparent;
  animation: getBreath 2.6s ease-in-out infinite;
}

.btn.delete {
  color: #fff;
  background: rgba(255,107,107,.12);
  border-color: rgba(255,107,107,.28);
}

@keyframes getBreath {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.empty, .msg {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 22px 0;
  font-weight: 800;
}

.msg.show {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  z-index: 50;
}

.modal.show {
  display: flex;
  animation: modalFade .16s ease both;
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet {
  width: min(100%, 520px);
  margin: auto auto 0;
  background: #0d0f15;
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  padding: 15px;
  transform: translateY(100%);
  animation: sheet .24s cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes sheet {
  to { transform: translateY(0); }
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sheet-top strong {
  font-size: 16px;
}

.close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: white;
  font-size: 20px;
}

pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #07080c;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  color: #dfe6f3;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 380px) {
  .file {
    grid-template-columns: 42px 1fr;
  }

  .actions {
    grid-column: 2;
  }
}