@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e6e6e9;
  --border-strong: #d8d8dd;
  --text: #14161a;
  --text-dim: #6b6f76;
  --text-faint: #9a9da3;
  --accent: #0f8b8b;
  --accent-dark: #0b6b6b;
  --accent-bg: #e6f5f5;
  --danger: #d1373f;
  --danger-bg: #fceaea;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

.display { font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.01em; }
.mono { font-family: 'Inter', sans-serif; font-weight: 600; }

.stripe { display: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}
.logo { display: flex; align-items: baseline; gap: 2px; cursor: pointer; background: none; border: none; padding: 0; }
.logo .mark { color: var(--accent); font-size: 20px; font-weight: 800; }
.logo .mark2 { color: var(--text); font-size: 20px; font-weight: 800; }
.nav { display: flex; align-items: center; gap: 10px; }

.btn {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { border-color: var(--text-faint); background: #fafafa; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.danger { background: transparent; border-color: var(--danger-bg); color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); }
.btn:disabled { opacity: 0.6; cursor: default; }

.hero {
  padding: 72px 24px 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-bg), var(--bg));
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(36px, 6vw, 58px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--accent); }
.tagline {
  font-family: 'Inter', sans-serif;
  color: var(--text-dim);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 28px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.body-area { padding: 32px 24px 56px; max-width: 1040px; margin: 0 auto; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 380px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 1px 2px rgba(20,22,26,0.04);
}
.panel.wide { max-width: 480px; }
.panel h2 { font-size: 22px; margin: 0 0 4px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.panel .sub { color: var(--text-dim); font-size: 14px; margin: 0 0 22px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input, .field textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.msg-error {
  background: var(--danger-bg);
  border: 1px solid #f2c4c7;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.switch-row { margin-top: 18px; font-size: 14px; color: var(--text-dim); text-align: center; }
.switch-row button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 14px; padding: 0; font-weight: 600; }

.feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.feed-header h2 { font-size: 24px; margin: 0; color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.feed-header .count { color: var(--text-faint); font-size: 13px; font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.15s, transform 0.1s;
}
.card:hover { box-shadow: 0 4px 16px rgba(20,22,26,0.08); transform: translateY(-1px); }
.card .thumb {
  height: 128px;
  background: linear-gradient(135deg, var(--accent-bg), #eef7f7);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}
.card .thumb svg { width: 34px; height: 34px; }
.card .rivet { display: none; }
.card .info { padding: 14px 16px; }
.card .title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); }
.card .meta .avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.card .meta .uploader { color: var(--text-dim); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta .odo { margin-left: auto; }

.empty { text-align: center; padding: 64px 20px; color: var(--text-dim); border: 1.5px dashed var(--border-strong); border-radius: 16px; }
.empty .display { font-size: 18px; color: var(--text); margin-bottom: 6px; font-weight: 700; }

.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: var(--accent-bg); }
.upload-zone .filename { color: var(--accent-dark); font-size: 13px; margin-top: 8px; font-weight: 600; }

.watch { max-width: 660px; margin: 0 auto; }
.watch video { width: 100%; border-radius: 14px; border: 1px solid var(--border); background: #000; display: block; }
.watch .vtitle { font-size: 22px; margin: 18px 0 6px; font-weight: 700; letter-spacing: -0.01em; }
.watch .vmeta { color: var(--text-faint); font-size: 13px; margin-bottom: 16px; font-weight: 500; }
.watch .vdesc { color: var(--text-dim); font-size: 15px; line-height: 1.6; }

.back-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; margin-bottom: 18px; font-weight: 600; }
.back-btn:hover { color: var(--text); }

.loading { text-align: center; padding: 64px 20px; color: var(--text-dim); }
.footer-note { text-align: center; font-size: 12px; color: var(--text-faint); padding: 18px 24px; border-top: 1px solid var(--border); }

.hidden { display: none !important; }
