/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* 头部导航 */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
}

.nav-tabs {
  display: flex;
  gap: 1rem;
}

/* 汉堡菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger {
  width: 100%;
  height: 3px;
  background: #667eea;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle.active .hamburger:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-tab {
  padding: 0.8rem 1.5rem;
  border: none;
  background: transparent;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #666;
  text-decoration: none;
  display: inline-block;
}

.nav-tab:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  transform: translateY(-2px);
}

.nav-tab.active {
  background: #667eea;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 主内容区域 */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.content-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-height: 500px;
}

.section-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* 工具区域通用样式 */
.tool-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.upload-area {
  border: 3px dashed #667eea;
  border-radius: 15px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(102, 126, 234, 0.05);
}

.upload-area:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.upload-icon {
  font-size: 4rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.upload-text {
  font-size: 1.2rem;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.upload-hint {
  color: #888;
  font-size: 0.9rem;
}

.preview-area {
  border-radius: 15px;
  overflow: hidden;
  background: #f8f9fa;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-image {
  max-width: 100%;
  max-height: 400px;
  display: none;
}

.controls {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 15px;
}

.control-group {
  margin-bottom: 1.5rem;
}

.control-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-value {
  min-width: 60px;
  text-align: center;
  font-weight: 600;
  color: #667eea;
}

.color-picker {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.placeholder-text {
  color: #888;
  font-size: 1.1rem;
  text-align: center;
  padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header {
    padding: 0.8rem 1rem;
  }

  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-tabs {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    gap: 0;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-tabs.active {
    left: 0;
  }

  .nav-tab {
    width: 90%;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    text-align: center;
    font-size: 1.1rem;
    border-radius: 10px;
    background: transparent;
    transition: all 0.3s ease;
  }

  .nav-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: none;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo-icon {
    font-size: 1.7rem;
  }

  .tool-container {
    grid-template-columns: 1fr;
  }

  .main-container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .action-buttons {
    flex-direction: column;
  }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
  .header {
    padding: 0.6rem 0.8rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-icon {
    font-size: 1.5rem;
  }

  .nav-tabs {
    gap: 0.3rem;
  }

  .nav-tab {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 15px;
  }

  .main-container {
    padding: 0 0.8rem;
    margin: 0.8rem auto;
  }

  .content-section {
    padding: 1.5rem;
    border-radius: 15px;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }

  .upload-area {
    padding: 2rem 1rem;
  }

  .upload-icon {
    font-size: 3rem;
  }

  .upload-text {
    font-size: 1rem;
  }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
  .nav-tab {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  .logo {
    font-size: 1.2rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

/* 页脚 */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background: transparent;
  padding: 1rem 2rem;
  text-align: center;
  color: white;
  margin-top: 4rem;
}

.footer span {
  margin-right: 1rem;
}

.footer img {
  display: inline-block;
  width: 16px;
  height: 18px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.footer a {
  color: white;
  text-decoration: none;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 1rem; /* 添加间距 */
}

.footer a:hover {
  color: #667eea;
  text-decoration: underline;
  text-decoration: underline;
}

.gongan {
  display: flex;
  justify-content: center;
  align-items: center;
}

.validate {
  margin-right: .5rem;
}

@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    /* align-items: flex-start; */
    padding: 1rem;
  }
  .footer > * {
    margin-bottom: 1rem;
  }
  .footer a {
    display: block;
    /* margin-bottom: 0.5rem; */
    margin-right: 0;
  }
}

.footer-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: white;
  text-decoration: underline;
}