:root {
  --bg: #f4efe7;
  --panel: rgba(255, 255, 255, 0.84);
  --text: #172026;
  --subtle: #5f6b73;
  --accent: #cf5a2e;
  --accent-2: #0e8f7a;
  --border: rgba(23, 32, 38, 0.1);
  --shadow: 0 18px 45px rgba(44, 34, 24, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #fff7e8 0, #f4efe7 40%, #e8efe9 100%);
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  filter: blur(2px);
}

.bg-shape-1 {
  width: 360px;
  height: 360px;
  border-radius: 52% 48% 66% 34% / 38% 62% 38% 62%;
  background: rgba(207, 90, 46, 0.2);
  top: -110px;
  left: -80px;
  animation: float1 14s ease-in-out infinite;
}

.bg-shape-2 {
  width: 420px;
  height: 420px;
  border-radius: 47% 53% 38% 62% / 62% 31% 69% 38%;
  background: rgba(14, 143, 122, 0.2);
  bottom: -170px;
  right: -80px;
  animation: float2 18s ease-in-out infinite;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  padding: 18px;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
}

h2 {
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
}

.subtitle {
  margin: 6px 0 16px;
  color: var(--subtle);
}

.upload-form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
}

button {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #e07243);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

button:active {
  transform: translateY(0);
}

.result {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--accent-2);
}

.result.error {
  color: #b12828;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.current-path {
  margin: 6px 0 10px;
  color: var(--subtle);
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.8);
}

.item.up button,
.dir-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
  padding: 6px 10px;
}

.file-link {
  color: #0c5fbc;
  text-decoration: none;
  font-weight: 600;
}

.file-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.download-link {
  text-decoration: none;
  color: #0e8f7a;
  border: 1px solid rgba(14, 143, 122, 0.35);
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 2px 10px;
}

.download-link:hover {
  background: rgba(14, 143, 122, 0.1);
}

.danger-btn {
  background: #fff;
  color: #b12828;
  border: 1px solid rgba(177, 40, 40, 0.35);
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 2px 10px;
}

.danger-btn:hover {
  background: rgba(177, 40, 40, 0.1);
}

.file-link:hover {
  text-decoration: underline;
}

.meta {
  color: var(--subtle);
  font-size: 0.86rem;
  white-space: nowrap;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--subtle);
  text-align: center;
}

@media (min-width: 840px) {
  .container {
    padding-top: 40px;
  }

  .card {
    padding: 24px;
  }
}

@keyframes float1 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(20px, 12px) rotate(8deg);
  }
}

@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-22px, -16px) rotate(-7deg);
  }
}
