:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f2430;
  --text: #f6f8fb;
  --muted: #a7b0c0;
  --primary: #7fa9ff;
  --primary-2: #5b87ff;
  --danger: #ff7a7a;
  --success: #6fd8a7;
  --border: #2b3140;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at 20% 10%, #1d2330 0, var(--bg) 45%);
  color: var(--text);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(16, 19, 26, 0.75);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  color: var(--text);
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.hero {
  margin-top: 2rem;
  margin-bottom: 1.2rem;
}

.card {
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.folder-card {
  margin-bottom: 1.2rem;
}

.folder-title {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.subfolder {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.subfolder-title {
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 1rem;
}

.video-item-card h4 {
  margin-top: 0.1rem;
  margin-bottom: 0.4rem;
}

.video-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 0.7rem;
  background: #0d121c;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.search-bar input {
  flex: 1;
  min-width: 280px;
}

.breadcrumb {
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
}

.explorer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.root-explorer-list {
  gap: 0.8rem;
}

.explorer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  background: #10141c;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}

.explorer-item:hover {
  border-color: #4c5d88;
}

.root-explorer-item {
  font-size: 1.18rem;
  font-weight: 700;
  padding: 1rem 1.1rem;
}

.back-row {
  margin-bottom: 0.9rem;
}

.color-picker {
  width: 58px;
  height: 38px;
  padding: 0.2rem;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10141c;
  color: var(--text);
  padding: 0.7rem 0.8rem;
}

textarea {
  min-height: 110px;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #06102a;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn-secondary {
  background: #252d3e;
  color: var(--text);
}

.btn-small {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

.chip {
  display: inline-block;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  background: #111a2d;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.alert {
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.8rem;
}

.alert-error {
  background: rgba(255, 122, 122, 0.13);
  border: 1px solid rgba(255, 122, 122, 0.4);
}

.alert-success {
  background: rgba(111, 216, 167, 0.12);
  border: 1px solid rgba(111, 216, 167, 0.45);
}

.inline-form {
  margin: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem;
}

.iframe-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 62vh;
}

.iframe-wrap iframe {
  width: 100%;
  min-height: 62vh;
  border: 0;
  background: #0d121c;
}

.qr-img {
  width: min(280px, 100%);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 0.8rem;
}

.qr-img-large {
  width: min(520px, 100%);
}

.checkbox {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.checkbox input {
  width: auto;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.break {
  word-break: break-all;
}
