/* 统一内页样式 - 简约大气设计 */

/* 全局重置和基础样式 */
* {
  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;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* 头部样式 - 统一标题布局 */
header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3rem 0 2rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  margin-bottom: 2rem;
}

header h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.6s ease-out;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

header h1.title-animate {
  opacity: 1;
  transform: translateY(0);
}

header p,
header .page-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
  line-height: 1.5;
}

/* 主内容区域 */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* 生成器容器 - 统一布局 */
.generator,
.generator-container,
.text-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.generator.animate-ready,
.generator-container.animate-ready,
.text-box.animate-ready {
  opacity: 1;
  transform: translateY(0);
}

/* 输入区域样式 */
.input-section,
.input-area,
.text-box:first-of-type {
  margin-bottom: 2rem;
}

.input-section label,
.input-area label,
.text-box label,
.label {
  display: block;
  color: white;
  font-weight: 600;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 统一文本输入框样式 */
textarea,
#textInput,
#inputText {
  width: 100%;
  min-height: 120px;
  padding: 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s ease;
  font-family: inherit;
}

textarea:focus,
#textInput:focus,
#inputText:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 1);
}

/* 样式按钮组 - 统一设计 */
.style-controls,
.style-buttons {
  display: flex;
  gap: 0.8rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  justify-content: center;
}

.style-btn {
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  min-width: 120px;
}

.style-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.style-btn.active {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

/* 输出区域 - 统一样式 */
.output-section,
.output-area,
.text-box:last-of-type {
  margin-top: 2rem;
  position: relative;
}

.output-section label,
.output-area label {
  display: block;
  color: white;
  font-weight: 600;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 统一输出容器样式 */
.output-container,
#output,
#outputText,
.output-area {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  font-size: 1.4rem;
  line-height: 1.6;
  color: #333;
  word-wrap: break-word;
  font-family: 'Satisfy', cursive;
}

.output-container:hover,
#output:hover,
#outputText:hover,
.output-area:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 按钮组样式 */
.button-group {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

/* 统一复制按钮样式 */
.copy-btn,
#copyBtn {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 复制图片按钮样式 */
.copy-image-btn,
#copyImageBtn {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 0.5rem;
}

/* 下载按钮样式 */
.download-btn,
#downloadBtn {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 0.5rem;
}

.copy-btn:hover,
#copyBtn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.copy-image-btn:hover,
#copyImageBtn:hover {
  background: linear-gradient(135deg, #d69e2e 0%, #c05621 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
}

.download-btn:hover,
#downloadBtn:hover {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.copy-btn:active,
#copyBtn:active,
.copy-image-btn:active,
#copyImageBtn:active,
.download-btn:active,
#downloadBtn:active {
  transform: translateY(0);
}

/* 复制消息提示 */
.copy-msg,
#copyMsg {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #48bb78;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.copy-msg.show,
#copyMsg.show {
  opacity: 1;
}

.copy-msg.error,
#copyMsg.error {
  color: #e53e3e;
}

/* 页脚样式 - 简约设计 */
footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.footer-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    padding: 2rem 0 1.5rem;
  }
  
  header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }
  
  header p,
  header .page-desc {
    font-size: 1rem;
    padding: 0 1.5rem;
  }
  
  .generator,
  .generator-container,
  .text-box {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .style-controls,
  .style-buttons {
    gap: 0.5rem;
  }
  
  .style-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    min-width: 100px;
  }
  
  textarea,
  #textInput,
  #inputText {
    min-height: 100px;
    padding: 1rem;
  }
  
  .output-container,
  #output,
  #outputText,
  .output-area {
    padding: 1.2rem;
    min-height: 100px;
    font-size: 1.2rem;
  }
  
  .copy-btn,
  #copyBtn {
    position: static;
    margin-top: 1rem;
    width: 100%;
    padding: 0.8rem;
  }
  
  .footer-nav {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 0.5rem 1rem;
  }
  
  .generator,
  .generator-container,
  .text-box {
    padding: 1rem;
  }
  
  .style-controls,
  .style-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .style-btn {
    width: 100%;
    max-width: 200px;
  }
}

/* SEO优化 - 结构化内容 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-ready {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* 打印样式 */
@media print {
  body {
    background: white;
    color: black;
  }
  
  header,
  footer {
    background: none;
    box-shadow: none;
  }
  
  .copy-btn,
  #copyBtn,
  .style-controls,
  .style-buttons {
    display: none;
  }
}