/* ========== 投稿页面样式 - 黑白色系 ========== */

.contribute-page {
  padding-top: 44px;
  min-height: 100vh;
  background: #fff;
  color: #000;
}

/* ========== 3D 走马灯 Hero ========== */
.contribute-hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #000;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.cover-flow-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cover-flow {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  animation: scroll 30s linear infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(-50%) translateX(0);
  }
  100% {
    transform: translateY(-50%) translateX(-50%);
  }
}

.cover-flow li {
  flex-shrink: 0;
  width: auto;
  height: 300px;
  margin-right: calc(300px / 5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-flow li img {
  height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  z-index: 10;
  pointer-events: none;
  letter-spacing: 0.1em;
}

/* ========== 审核说明卡片 ========== */
.review-info-top {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.review-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.review-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1;
}

.review-content {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.review-content h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #000;
  font-weight: 600;
}

.review-content ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.review-content li {
  position: relative;
  padding-left: 28px;
  color: #333;
  font-size: 0.95rem;
}

.review-content li::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: #000;
  font-size: 1.2rem;
  font-weight: bold;
}

/* ========== Tab 切换 ========== */
.contribute-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  background: #fff;
}

.tab-btn {
  padding: 12px 40px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #000;
  border-radius: 24px;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: #f5f5f5;
}

.tab-btn.active {
  background: #000;
  color: #fff;
}

.admin-entry-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.admin-entry-btn:hover {
  border-color: #000;
  color: #000;
  transform: rotate(90deg);
}

/* ========== 内容区域 ========== */
.contribute-content {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

/* ========== 信息卡片 ========== */
.info-card {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 80px;
}

.info-icon {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
}

.info-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #000;
}

.info-card > p {
  color: #666;
  margin-bottom: 16px;
}

.requirements {
  list-style: none;
  padding: 0;
}

.requirements li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #555;
}

.requirements li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #000;
  font-weight: bold;
}

/* ========== 上传表单 ========== */
.upload-form {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

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

.required {
  color: #000;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #000;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group input.invalid {
  border-color: #000;
}

.error-msg {
  display: block;
  font-size: 0.8rem;
  color: #000;
  margin-top: 4px;
  min-height: 1.2em;
}

/* ========== 拖拽上传区域 ========== */
.dropzone {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #000;
  background: rgba(0, 0, 0, 0.05);
}

.dropzone.has-file {
  border-style: solid;
  border-color: #000;
  background: rgba(0, 0, 0, 0.02);
  padding: 16px;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: #999;
  margin: 0 auto 12px;
}

.dropzone-content p {
  margin: 0;
  color: #666;
}

.browse-link {
  color: #000;
  font-weight: 600;
  cursor: pointer;
}

.hint {
  font-size: 0.85rem;
  color: #999;
  margin-top: 8px;
}

/* ========== 文件预览 ========== */
.file-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #eee;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb .file-icon {
  font-size: 1.5rem;
}

.preview-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  color: #000;
}

.file-size {
  font-size: 0.85rem;
  color: #666;
}

.remove-file {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.remove-file:hover {
  transform: scale(1.1);
}

/* ========== 进度条 ========== */
.progress-container {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: #000;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-top: 8px;
}

/* ========== 提交按钮 ========== */
.submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #000;
  border-radius: 8px;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn.loading {
  pointer-events: none;
}

/* ========== 提交状态 ========== */
.submit-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.submit-status.success {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
  border: 1px solid #000;
}

.submit-status.error {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
  border: 1px solid #000;
}

/* ========== 成功弹窗 ========== */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.success-modal.show {
  display: flex;
}

.success-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

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

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-dialog h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #000;
}

.success-dialog p {
  color: #666;
  margin-bottom: 24px;
}

.success-close {
  padding: 12px 40px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #000;
  border-radius: 24px;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.success-close:hover {
  background: #333;
}

/* ========== 管理员密码弹窗 ========== */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.admin-modal.show {
  display: flex;
}

.admin-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
}

.admin-dialog h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #000;
  text-align: center;
}

.admin-dialog input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 8px;
}

.admin-dialog input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.admin-error {
  color: #ff3b30;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-bottom: 16px;
}

.admin-actions {
  display: flex;
  gap: 12px;
}

.admin-cancel,
.admin-confirm {
  flex: 1;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #000;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-cancel {
  background: #fff;
  color: #000;
}

.admin-cancel:hover {
  background: #f5f5f5;
}

.admin-confirm {
  background: #000;
  color: #fff;
}

.admin-confirm:hover {
  background: #333;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .cover-flow li {
    height: 200px;
    margin-right: calc(200px / 5);
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .info-card {
    position: static;
  }

  .upload-form {
    padding: 20px;
  }

  .tab-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .review-content ul {
    grid-template-columns: 1fr;
  }
}

/* ========== 深色模式 ========== */
@media (prefers-color-scheme: dark) {
  .contribute-page {
    background: #1c1c1e;
    color: #fff;
  }

  .contribute-hero {
    background: #000;
  }

  .review-card::before {
    background: rgba(28, 28, 30, 0.95);
  }

  .review-content h2 {
    color: #fff;
  }

  .review-content li {
    color: #ccc;
  }

  .review-content li::before {
    color: #fff;
  }

  .contribute-tabs {
    background: #1c1c1e;
  }

  .tab-btn {
    border-color: #fff;
    background: transparent;
    color: #fff;
  }

  .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .tab-btn.active {
    background: #fff;
    color: #000;
  }

  .info-card {
    background: #2c2c2e;
    border-color: #3a3a3c;
  }

  .info-icon {
    border-color: #3a3a3c;
  }

  .info-card h3 {
    color: #fff;
  }

  .info-card > p {
    color: #aaa;
  }

  .requirements li {
    color: #aaa;
  }

  .requirements li::before {
    color: #fff;
  }

  .upload-form {
    background: #2c2c2e;
    border-color: #3a3a3c;
  }

  .form-group label {
    color: #fff;
  }

  .required {
    color: #fff;
  }

  .form-group input,
  .form-group textarea {
    background: #1c1c1e;
    border-color: #3a3a3c;
    color: #fff;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  }

  .error-msg {
    color: #fff;
  }

  .dropzone {
    background: #1c1c1e;
    border-color: #3a3a3c;
  }

  .dropzone:hover,
  .dropzone.dragover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }

  .dropzone.has-file {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.02);
  }

  .dropzone-content p {
    color: #aaa;
  }

  .browse-link {
    color: #fff;
  }

  .preview-thumb {
    background: #3a3a3c;
    border-color: #4a4a4c;
  }

  .file-name {
    color: #fff;
  }

  .file-size {
    color: #aaa;
  }

  .remove-file {
    background: #fff;
    color: #000;
  }

  .progress-bar {
    background: #3a3a3c;
    border-color: #4a4a4c;
  }

  .progress-fill {
    background: #fff;
  }

  .submit-btn {
    border-color: #fff;
    background: #fff;
    color: #000;
  }

  .submit-btn:hover:not(:disabled) {
    background: #e0e0e0;
  }

  .submit-status.success,
  .submit-status.error {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #fff;
  }

  .success-dialog {
    background: #2c2c2e;
  }

  .success-icon {
    background: #fff;
    color: #000;
  }

  .success-dialog h3 {
    color: #fff;
  }

  .success-dialog p {
    color: #aaa;
  }

  .success-close {
    border-color: #fff;
    background: #fff;
    color: #000;
  }

  .success-close:hover {
    background: #e0e0e0;
  }

  .admin-dialog {
    background: #2c2c2e;
  }

  .admin-dialog h3 {
    color: #fff;
  }

  .admin-dialog input {
    background: #1c1c1e;
    border-color: #3a3a3c;
    color: #fff;
  }

  .admin-dialog input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  }

  .admin-cancel {
    background: transparent;
    border-color: #fff;
    color: #fff;
  }

  .admin-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .admin-confirm {
    background: #fff;
    color: #000;
    border-color: #fff;
  }

  .admin-confirm:hover {
    background: #e0e0e0;
  }

  .admin-entry-btn {
    border-color: #3a3a3c;
    background: transparent;
    color: #aaa;
  }

  .admin-entry-btn:hover {
    border-color: #fff;
    color: #fff;
  }
}
