/* reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f9fafb;
  color: #111827;
  line-height: 1.5;
}

/* 导航栏 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #f97316, #ea580c);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 28px;
}

/* 按钮通用 */
.btn {
  border: none;
  border-radius: 40px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: #f97316;
  color: white;
  box-shadow: 0 2px 8px rgba(249,115,22,0.2);
}
.btn-primary:hover {
  background: #ea580c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249,115,22,0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #374151;
}
.btn-outline:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
  justify-content: center;
  display: flex;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;
  color: #6b7280;
}
.btn-ghost:hover {
  background: #f3f4f6;
  color: #111827;
}

/* 游客主页 */
.guest-view {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  text-align: center;
  padding: 80px 20px 60px;
}
.hero h1 {
  font-size: 52px;
  font-weight: 800;
  background: linear-gradient(135deg, #1f2937, #f97316);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 18px;
  color: #4b5563;
  margin-bottom: 32px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  padding: 40px 0 60px;
}
.feature-card {
  background: white;
  border-radius: 28px;
  padding: 32px 24px;
  width: 260px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.02);
  border: 1px solid #f3f4f6;
  transition: all 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.08);
}
.feature-icon {
  font-size: 44px;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.feature-card p {
  color: #6b7280;
  font-size: 14px;
}

.showcase {
  padding: 40px 0 80px;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 32px;
  font-weight: 700;
}
.section-header p {
  color: #6b7280;
  margin-top: 8px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.showcase-item {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  transition: all 0.2s;
}
.showcase-item:hover {
  transform: scale(1.01);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.1);
}
.showcase-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.showcase-item p {
  padding: 16px;
  font-weight: 500;
  text-align: center;
}

/* 用户视图 */
.user-view {
  background: #f8fafc;
  min-height: calc(100vh - 70px);
}
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}
.generator-card, .history-card {
  background: white;
  border-radius: 32px;
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.02);
  border: 1px solid #edf2f7;
}
.generator-card h2, .history-card h2 {
  font-size: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 16px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  margin-bottom: 20px;
  transition: 0.2s;
}
textarea:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}
.result-area {
  margin-top: 24px;
  background: #f9fafb;
  border-radius: 24px;
  padding: 20px;
  text-align: center;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.history-item {
  background: #f9fafb;
  border-radius: 20px;
  padding: 16px;
  transition: 0.1s;
}
.history-item p {
  font-weight: 500;
  margin-bottom: 12px;
}
.history-item video {
  width: 100%;
  border-radius: 16px;
  max-height: 200px;
}
.empty-state {
  text-align: center;
  color: #9ca3af;
  padding: 48px 20px;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-container {
  background: white;
  width: 90%;
  max-width: 420px;
  border-radius: 40px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-size: 24px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #9ca3af;
}
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid #e5e7eb;
}
.tab-btn {
  background: none;
  border: none;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: 0.1s;
}
.tab-btn.active {
  color: #f97316;
  border-bottom: 2px solid #f97316;
}
.tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.tab-panel.active {
  display: flex;
}
input {
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 40px;
  font-size: 15px;
  font-family: inherit;
}
input:focus {
  outline: none;
  border-color: #f97316;
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-name {
  font-weight: 500;
  color: #1f2937;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .navbar { padding: 12px 5%; }
  .container { padding: 24px 16px; }
}