* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%);
  min-height: 100vh;
  color: #444;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(255,182,193,0.15);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ff6b9d;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(255,107,157,0.15);
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s;
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover, .nav-links a.active {
  color: #ff6b9d;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, #ff6b9d, #ff8fab);
  transition: width 0.3s;
  border-radius: 2px;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.login-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, #ff6b9d, #ff8fab);
  color: white;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(255,107,157,0.25);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,107,157,0.35);
}

.user-menu {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 24px;
  transition: all 0.3s;
  background: rgba(255, 240, 245, 0.6);
  border: 1px solid transparent;
}

.user-trigger:hover {
  background: rgba(255, 240, 245, 1);
  border-color: #ffd6e0;
}

.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffd6e0;
  background: #fff0f5;
}

.nav-avatar-fallback {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #ff8fab);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-username {
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 8px 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 200;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 10px 18px;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.user-dropdown a:hover {
  background: #fff8fa;
  color: #ff6b9d;
}

.dropdown-divider {
  height: 1px;
  background: #ffe4e1;
  margin: 6px 12px;
}

.logout-link {
  color: #ff6b9d !important;
  cursor: pointer;
}

.container { max-width: 680px; margin: 0 auto; padding: 30px 15px; }

.page-header { text-align: center; margin-bottom: 30px; }
.page-header h1 { color: #ff6b9d; font-size: 1.8rem; margin-bottom: 8px; }
.page-header p { color: #888; font-size: 0.95rem; }
.badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-left: 6px;
  vertical-align: middle;
}

.review-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(255,182,193,0.15);
}
.review-card h2 { color: #ff6b9d; font-size: 1.2rem; margin-bottom: 20px; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.star-rating {
  display: flex;
  gap: 8px;
  font-size: 2.4rem;
  cursor: pointer;
  user-select: none;
  margin-bottom: 8px;
  padding: 5px 0;
}
.star-rating .star {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: grayscale(100%) opacity(0.35) brightness(1.2);
  transform-origin: center bottom;
}
.star-rating .star:hover,
.star-rating .star.hover {
  filter: grayscale(0%) opacity(1) drop-shadow(0 4px 8px rgba(255,193,7,0.5));
  animation: starBounce 0.5s ease infinite alternate;
  z-index: 2;
}
@keyframes starBounce {
  0% { transform: scale(1.2) translateY(-2px) rotate(-8deg); }
  100% { transform: scale(1.45) translateY(-10px) rotate(8deg); }
}
.star-rating .star.active {
  filter: grayscale(0%) opacity(1) drop-shadow(0 0 10px rgba(255,107,157,0.6));
  transform: scale(1.25);
  animation: starPop 0.5s ease;
}
@keyframes starPop {
  0% { transform: scale(0.3) rotate(-30deg); opacity: 0; }
  50% { transform: scale(1.4) rotate(10deg); opacity: 1; }
  100% { transform: scale(1.25) rotate(0deg); }
}
.star-rating .star:active {
  transform: scale(0.9) !important;
  transition: transform 0.1s;
}
.rating-text {
  font-size: 0.9rem;
  color: #ff6b9d;
  font-weight: 600;
  height: 24px;
  display: flex;
  align-items: center;
  transition: all 0.3s;
  opacity: 0.8;
}

textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid #f0e0e5;
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fff8fa;
  resize: vertical;
  transition: all 0.3s;
  font-family: inherit;
}
textarea:focus {
  outline: none;
  border-color: #ff6b9d;
  background: white;
  box-shadow: 0 0 0 3px rgba(255,107,157,0.1);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff6b9d, #ff8fab);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,107,157,0.3);
}
.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ========== 评价列表（朋友圈风格） ========== */
.reviews-list { display: flex; flex-direction: column; gap: 20px; }

.review-item {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffd6e0;
}
.reviewer-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #ff8fab);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
}

.review-stars {
  font-size: 1.3rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.review-stars .full {
  filter: drop-shadow(0 0 3px rgba(255,193,7,0.5));
}
.review-stars .empty {
  filter: grayscale(100%) opacity(0.3);
}

.review-content {
  color: #333;
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 12px;
}

/* 回复区域 - 朋友圈风格 */
.replies-box {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reply-line {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  word-break: break-all;
}

.reply-author-name {
  color: #576b95;
  font-weight: 600;
  cursor: pointer;
}

.reply-author-name:hover {
  text-decoration: underline;
}

.reply-at {
  color: #576b95;
  font-weight: 600;
}

.reply-del {
  color: #ccc;
  font-size: 0.75rem;
  margin-left: 8px;
  cursor: pointer;
  transition: color 0.2s;
}

.reply-del:hover {
  color: #ff6b9d;
}

/* 底部回复输入栏 */
.reply-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #ffe4e1;
}

.reply-bar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ffd6e0;
  flex-shrink: 0;
}

.reply-bar-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #ff8fab);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.reply-input-wrap {
  flex: 1;
  display: flex;
  gap: 8px;
}

.reply-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ffd6e0;
  border-radius: 20px;
  font-size: 0.9rem;
  background: #fff8fa;
  outline: none;
  transition: all 0.3s;
}

.reply-input-wrap input:focus {
  border-color: #ff6b9d;
  background: white;
  box-shadow: 0 0 0 3px rgba(255,107,157,0.1);
}

.reply-input-wrap button {
  padding: 8px 18px;
  background: #ff6b9d;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.reply-input-wrap button:hover {
  background: #ff527b;
  transform: scale(1.05);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #aaa;
  font-size: 1rem;
}
.empty-state .emoji { font-size: 2.5rem; margin-bottom: 10px; display: block; }

@media (max-width: 480px) {
  .navbar { padding: 12px 3%; }
  .nav-left { gap: 15px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.85rem; }
  .nav-username { display: none; }
}
