/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 登录弹窗 */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.login-modal.show {
  display: flex;
}

.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.login-box h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}

.login-box p {
  color: #999;
  margin-bottom: 25px;
}

.login-box input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 20px;
}

.login-box input:focus {
  outline: none;
  border-color: #07c160;
}

.login-box button {
  width: 100%;
  padding: 15px;
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 10px;
}

.login-box button.cancel-btn {
  background: #f5f5f5;
  color: #666;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, #07c160 0%, #10b981 100%);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-info {
  text-align: center;
  margin-top: 15px;
  color: #fff;
}

#loginStatus {
  margin-right: 15px;
}

.logout-btn-small {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  padding: 5px 15px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 14px;
}

/* 登录提示 */
.login-tip {
  background: #fff;
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tip-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.login-tip p {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

.login-trigger-btn {
  background: #07c160;
  color: #fff;
  border: none;
  padding: 15px 40px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.logo-icon {
  font-size: 36px;
  margin-right: 10px;
}

.logo-text {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.nav-link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* 主体内容 */
.main {
  padding: 30px 0;
}

.section {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.section-header {
  margin-bottom: 25px;
}

.section-header h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 8px;
}

.section-header p {
  color: #999;
  font-size: 14px;
}

/* 上传区域 */
.upload-area {
  border: 3px dashed #ddd;
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #07c160;
  background: #f0f9f4;
}

.upload-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.upload-text {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.upload-hint {
  font-size: 14px;
  color: #999;
}

#fileInput {
  display: none;
}

/* 上传列表 */
.upload-list {
  margin-top: 20px;
}

.upload-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 10px;
}

.upload-item-icon {
  font-size: 32px;
  margin-right: 15px;
}

.upload-item-info {
  flex: 1;
}

.upload-item-name {
  font-size: 15px;
  color: #333;
  margin-bottom: 5px;
}

.upload-item-size {
  font-size: 13px;
  color: #999;
}

.upload-item-status {
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
}

.upload-item-status.waiting {
  background: #e6f7ed;
  color: #07c160;
}

.upload-item-status.uploading {
  background: #e6f4ff;
  color: #1890ff;
}

.upload-item-status.success {
  background: #f6ffed;
  color: #52c41a;
}

.upload-item-status.error {
  background: #fff1f0;
  color: #ff4d4f;
}

/* 搜索框 */
.search-box {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.search-box input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.search-box button {
  padding: 10px 20px;
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.search-box button:hover {
  background: #06ad56;
}

/* 文件表格 */
.file-table-wrapper {
  overflow-x: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th,
.file-table td {
  padding: 15px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.file-table th {
  font-weight: 600;
  color: #666;
  font-size: 14px;
  background: #fafafa;
}

.file-table td {
  font-size: 14px;
  color: #333;
}

.file-table tr:hover {
  background: #fafafa;
}

.col-type {
  width: 60px;
  text-align: center;
}

.col-name {
  min-width: 200px;
}

.col-size {
  width: 100px;
}

.col-time {
  width: 150px;
}

.col-download {
  width: 80px;
  text-align: center;
}

.col-action {
  width: 200px;
}

.file-icon {
  font-size: 28px;
}

.file-name {
  color: #07c160;
  cursor: pointer;
}

.file-name:hover {
  text-decoration: underline;
}

.empty-tip {
  text-align: center;
  color: #999;
  padding: 60px 0;
}

/* 操作按钮 */
.action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn.copy {
  background: #e6f7ed;
  color: #07c160;
}

.action-btn.copy:hover {
  background: #d9f7e4;
}

.action-btn.replace {
  background: #e6f4ff;
  color: #1890ff;
}

.action-btn.replace:hover {
  background: #d9f0ff;
}

.action-btn.delete {
  background: #fff1f0;
  color: #ff4d4f;
}

.action-btn.delete:hover {
  background: #ffe6e6;
}

.action-btn.download {
  background: #f6ffed;
  color: #52c41a;
}

.action-btn.download:hover {
  background: #e6f7d9;
}

/* 教程卡片 */
.tutorial-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.tutorial-card {
  background: linear-gradient(135deg, #f5f5f5 0%, #fff 100%);
  border-radius: 12px;
  padding: 25px;
  position: relative;
  border: 1px solid #f0f0f0;
}

.tutorial-step {
  position: absolute;
  top: -15px;
  left: 20px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #07c160 0%, #10b981 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.tutorial-body h3 {
  font-size: 18px;
  margin-bottom: 10px;
  margin-top: 10px;
  color: #333;
}

.tutorial-body p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.tutorial-img {
  font-size: 48px;
  text-align: center;
  opacity: 0.8;
}

/* 教程详情 */
.tutorial-detail {
  background: #fafafa;
  border-radius: 12px;
  padding: 25px;
}

.tutorial-detail h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}

.detail-section {
  margin-bottom: 25px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-size: 16px;
  color: #07c160;
  margin-bottom: 12px;
}

.detail-section ol {
  padding-left: 25px;
}

.detail-section li {
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: #fafafa;
  border-radius: 10px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.faq-question:hover {
  background: #f0f0f0;
}

.faq-icon {
  width: 28px;
  height: 28px;
  background: #07c160;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
}

.faq-question span:nth-child(2) {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.faq-toggle {
  font-size: 20px;
  color: #999;
  transition: all 0.3s;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 20px 18px 60px;
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

/* 底部 */
.footer {
  text-align: center;
  padding: 40px 0;
  color: #999;
  font-size: 14px;
}

.footer p:first-child {
  font-size: 16px;
  color: #666;
  margin-bottom: 5px;
}

/* 提示框 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .nav {
    gap: 10px;
  }
  
  .nav-link {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .section {
    padding: 20px;
  }
  
  .upload-area {
    padding: 40px 20px;
  }
  
  .file-table th,
  .file-table td {
    padding: 12px 8px;
    font-size: 13px;
  }
  
  .action-btns {
    flex-direction: column;
    gap: 5px;
  }
  
  .action-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .tutorial-content {
    grid-template-columns: 1fr;
  }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #07c160;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
