/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 2.5rem;
  max-width: 800px;
  width: 90%;
  margin: 2rem auto;
}

/* 头部样式 */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

header p {
  color: #666;
  font-size: 1.1rem;
}

/* 表单样式 */
form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
  font-size: 1.1rem;
}

.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s;
}

.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 文件上传样式 */
.file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.file-upload label {
  display: block;
  padding: 1rem;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  text-align: center;
  background: #f9f9f9;
  transition: all 0.3s;
  cursor: pointer;
  margin: 0;
}

.file-upload label:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.file-upload label span {
  color: #666;
  font-size: 1rem;
}

/* 图片预览样式 */
.preview-container {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #f9f9f9;
}

.preview-container h3 {
  color: #333;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.preview-container img {
  max-width: 100%;
  max-height: 300px;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 输入框样式 */
.form-group input[type="text"] {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hint {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* 复选框样式 */
.checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 0.8rem;
  margin-bottom: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #667eea;
}

.checkbox-group label {
  font-size: 0.95rem;
  color: #555;
  cursor: pointer;
  font-weight: 400;
  margin-bottom: 0;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  margin-top: 1rem;
}

.btn:hover {
  background: #5a6fd8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #666;
  margin-top: 0;
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.btn-secondary:hover {
  background: #555;
}

.btn-outline {
  background: transparent;
  border: 2px solid #667eea;
  color: #667eea;
  margin-top: 1.5rem;
}

.btn-outline:hover {
  background: #667eea;
  color: white;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  width: auto;
  margin-top: 0;
}

.btn-danger {
  background: #e74c3c;
}

.btn-danger:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* 结果样式 */
.result {
  margin-top: 2rem;
  padding: 2rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
}

.result h2 {
  color: #333;
  margin-bottom: 1rem;
}

.url-container {
  margin: 1.5rem 0;
}

.url-container input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
}

.url-container input:focus {
  outline: none;
  border-color: #667eea;
}

.result .btn-secondary {
  display: block;
  width: 100%;
  margin-top: 1rem;
  margin-left: 0;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.info {
  color: #666;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

/* 底部样式 */
footer {
  margin-top: 3rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1.2rem;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
  }
}