* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #f8fafc;
  margin: 0;
  padding: 0;
}

.phone-wrapper {
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  background: #f8fafc;
  padding: 0;
  box-shadow: none;
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
}

.header {
  padding: 18px 20px;
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header h1 {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 6px;
}

.header p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f1f5f9;
  border-radius: 16px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #cbd5e1;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.login-btn,
.logout-btn {
  border: none;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.login-btn {
  background: #07c160;
  color: white;
}

.logout-btn {
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.upload-section {
  padding: 20px;
}

.page-panel {
  display: none;
}

.page-panel.active {
  display: block;
}

.mine-section {
  padding: 20px;
}

.mine-header {
  margin-bottom: 20px;
}

.mine-header h1 {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 6px;
}

.mine-header p {
  color: #64748b;
  font-size: 14px;
}

.user-bar-mine {
  margin-top: 0;
  padding: 20px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  background: white;
  padding: 30px 20px;
  text-align: center;
  transition: 0.3s ease;
}

.upload-box.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.upload-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.3);
}

.upload-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0f172a;
}

.upload-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

input[type="file"] {
  display: none;
}

.upload-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  border: none;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.upload-btn.secondary {
  background: white;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.preview-section {
  padding: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.media-item {
  position: relative;
  height: 100px;
  border-radius: 18px;
  overflow: hidden;
  background: #e2e8f0;
  animation: fadeIn 0.5s ease;
  cursor: pointer;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  pointer-events: none;
}

.media-preview {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.media-preview.hidden {
  display: none;
}

.media-preview-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  margin-bottom: 12px;
}

.media-preview-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.media-preview-body img,
.media-preview-body video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: black;
}

.media-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}

.media-preview-name {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-preview-delete {
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 84px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}

.nav-item.active {
  color: #2563eb;
  transform: translateY(-2px);
}

.nav-icon {
  font-size: 22px;
}

.phone-screen-content {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 120px;
}

.phone-screen-content::-webkit-scrollbar {
  display: none;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

.login-mask {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  z-index: 30;
  text-align: center;
}

.login-mask.hidden {
  display: none;
}

.login-mask h2 {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 12px;
}

.login-mask p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.wechat-login-btn {
  background: #07c160;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
