*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #27272a;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #000;
  color: #d1d5db;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  padding-bottom: 2.5rem;
}

button,
a {
  font: inherit;
  color: inherit;
  text-decoration: none;
  background: none;
  cursor: pointer;
}

img,
video {
  max-width: 100%;
  display: block;
}

::-webkit-scrollbar {
  display: none;
}

.glass {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 30, 30, 0.8);
}

.cover-aspect {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  display: block;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.625rem 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
}

.nav-tab {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 0;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 0.15s ease;
  background: #18181b;
  color: #71717a;
  border: 1px solid #27272a;
}

.nav-tab.active {
  background: #f59e0b;
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.page {
  max-width: 42rem;
  margin: 0 auto;
  min-height: 100vh;
}

.waterfall {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0.75rem 0;
  width: 100%;
}

.col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 50%;
}

.post-item {
  background: #09090b;
  border-radius: 1.5rem;
  border: 1px solid #18181b;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  animation: fadeInSlide 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.post-item:active {
  transform: scale(0.98);
}

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

.cover-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.cover-video {
  opacity: 0.9;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.play-btn {
  width: 2.5rem;
  height: 2.5rem;
  background: rgb(0 0 0 / 0.5);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.25rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  color: #fff;
  font-size: 0.875rem;
  opacity: 0.8;
}

.code-chip {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgb(0 0 0 / 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgb(255 255 255 / 0.1);
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.code-chip .code {
  color: #f59e0b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.code-chip .sep {
  width: 1px;
  height: 0.75rem;
  background: #3f3f46;
}

.code-chip .zone {
  color: #a1a1aa;
  font-size: 9px;
  font-weight: 700;
}

.badge-slot {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
}

.front-dynamic-badge {
  width: 100%;
  text-align: center;
  padding: 0.625rem 0;
  border-radius: 0.75rem;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.bg-free {
  background: rgba(6, 78, 59, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.bg-busy {
  background: rgba(127, 29, 29, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.bg-wait {
  background: rgba(180, 83, 9, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.more-tip {
  text-align: center;
  color: #3f3f46;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 1.5rem 0 0;
}

.empty-tips {
  text-align: center;
  color: #52525b;
  font-size: 12px;
  padding: 4rem 1rem;
}

#postDetail {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  overflow-y: auto;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  transform: translateY(100%);
  z-index: 100;
}

#postDetail.active {
  display: block;
  transform: translateY(0);
}

.detail-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem;
  background: rgb(0 0 0 / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #18181b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  padding: 0.625rem 1.25rem;
  background: #18181b;
  color: #a1a1aa;
  border-radius: 9999px;
  border: 1px solid #27272a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.detail-title {
  font-size: 10px;
  color: #f59e0b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail-body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#detailDynamicBadge {
  width: 100%;
  padding: 1rem 0;
  border-radius: 1rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  margin-bottom: 1.5rem;
}

#detailContent {
  flex: 1;
  padding-bottom: 5rem;
}

.detail-text {
  padding: 0 0.5rem 1.5rem;
}

.detail-text .body {
  color: #d4d4d8;
  font-size: 0.75rem;
  line-height: 2;
  font-weight: 300;
  word-break: break-word;
}

.detail-media video,
.detail-media img {
  width: 100%;
  border-radius: 1.5rem;
  background: #09090b;
  margin-bottom: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  border: 1px solid #18181b;
}
