/* ========================================
   Small Text Generator 页面样式
   ======================================== */

/* ---------- 页面容器 ---------- */
.small-text-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  flex: 1;
}

/* ---------- 页面标题区 ---------- */
.page-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.page-header h1 {
  font-size: 32px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
}

.page-header p {
  font-size: 15px;
  color: #6c757d;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- CTA区域 ---------- */
.cta-section {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: #0066cc;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #0052a3;
}

.btn-secondary {
  background-color: #6c757d;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-outline {
  background-color: transparent;
  color: #0066cc;
  border: 2px solid #0066cc;
}

.btn-outline:hover {
  background-color: #0066cc;
  color: #ffffff;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* ---------- 工具区域 ---------- */
.tool-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.panel h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 20px;
  font-weight: 600;
}

/* 输入面板 */
.input-panel textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
  line-height: 1.6;
}

.input-panel textarea:focus {
  outline: none;
  border-color: #0066cc;
}

.input-panel textarea::placeholder {
  color: #adb5bd;
}

.char-count {
  text-align: right;
  margin-top: 10px;
  font-size: 13px;
  color: #6c757d;
}

.char-count #charCount {
  font-weight: 600;
  color: #0066cc;
}

/* 输出面板 */
.output-panel {
  display: flex;
  flex-direction: column;
}

.output-preview {
  flex: 1;
  min-height: 200px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.output-content {
  font-size: 24px;
  color: #212529;
  text-align: center;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.output-content.empty {
  color: #adb5bd;
}

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

.output-actions .btn {
  flex: 1;
}

/* ---------- 功能模块区域 ---------- */
.feature-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
  text-align: center;
}

.feature-section h2 {
  font-size: 24px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
}

.feature-section p {
  font-size: 16px;
  color: #6c757d;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- 样式选择区域 ---------- */
.style-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.style-section h2 {
  font-size: 24px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
}

.style-section p {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 20px;
  line-height: 1.6;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.style-card {
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 20px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.style-card:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.style-card.active {
  background: #e3f2fd;
  border-color: #0066cc;
}

.style-preview {
  font-size: 20px;
  line-height: 1.4;
}

.style-name {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

/* ---------- 示例表格区域 ---------- */
.examples-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.examples-section h3 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 20px;
  font-weight: 600;
}

.examples-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.example-original {
  font-size: 16px;
  color: #495057;
  font-weight: 500;
  min-width: 120px;
  text-align: right;
}

.example-arrow {
  font-size: 20px;
  color: #0066cc;
  font-weight: bold;
}

.example-converted {
  font-size: 20px;
  color: #212529;
  font-weight: 500;
}

/* ---------- 高级选项区域 ---------- */
.advanced-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  font-size: 16px;
  color: #495057;
  font-weight: 500;
  cursor: pointer;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.advanced-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.advanced-options {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f3f5;
  display: none;
}

.advanced-options.show {
  display: block;
}

.option-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #495057;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ---------- FAQ区域 ---------- */
.faq-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.faq-section h2 {
  font-size: 24px;
  color: #212529;
  margin-bottom: 24px;
  font-weight: 600;
}

.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f3f5;
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-question {
  font-size: 16px;
  color: #212529;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-answer {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.6;
}

/* ---------- 信息区域 ---------- */
.info-section,
.platforms-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.info-section h2,
.platforms-section h2 {
  font-size: 24px;
  color: #212529;
  margin-bottom: 20px;
  font-weight: 600;
}

.info-section ol {
  list-style: decimal;
  margin-left: 24px;
}

.info-section li {
  margin-bottom: 12px;
  font-size: 15px;
  color: #495057;
  line-height: 1.6;
}

/* 平台展示 */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.platform-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- 底部补充段落 ---------- */
.bottom-section {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.bottom-section p {
  font-size: 18px;
  color: #ffffff;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- 安全提示区域 ---------- */
.security-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 4px solid #28a745;
}

.security-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.security-content h3 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 8px;
  font-weight: 600;
}

.security-content p {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}

/* ---------- 知识科普区域 ---------- */
.knowledge-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.knowledge-section h2 {
  font-size: 24px;
  color: #212529;
  margin-bottom: 16px;
  font-weight: 600;
}

.knowledge-section h3 {
  font-size: 18px;
  color: #212529;
  margin-bottom: 10px;
  margin-top: 20px;
  font-weight: 600;
}

.knowledge-section p {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.7;
  margin-bottom: 12px;
}

.knowledge-section ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.knowledge-section ul li {
  list-style: disc;
  margin-bottom: 8px;
  font-size: 15px;
  color: #495057;
  line-height: 1.6;
}

.knowledge-section ul li strong {
  color: #212529;
}

/* ---------- 复制成功动画 ---------- */
.copy-success {
  animation: copyPulse 0.5s ease-out;
}

@keyframes copyPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* ---------- Toast 通知样式 ---------- */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #212529;
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast-container.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-container.success {
  background: #28a745;
}

.toast-container.error {
  background: #dc3545;
}

/* ---------- 响应式适配 ---------- */
@media (max-width: 992px) {
  .tool-wrapper {
    grid-template-columns: 1fr;
  }
  
  .style-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  .small-text-container {
    padding: 24px 16px;
  }
  
  .page-header h1 {
    font-size: 32px;
  }
  
  .page-header p {
    font-size: 16px;
  }
  
  .panel {
    padding: 20px;
  }
  
  .output-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .cta-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cta-section .btn {
    width: 100%;
  }
  
  .style-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  
  .style-card {
    padding: 16px 8px;
  }
  
  .style-preview {
    font-size: 16px;
  }
  
  .style-name {
    font-size: 12px;
  }
  
  .option-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .example-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .example-original {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 26px;
  }
  
  .style-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}