/* ========================================
 * Mirror Flip Text Generator 页面样式
 * ======================================== */

/* ---------- 页面容器 ---------- */
.mf-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* ---------- 页面标题区 ---------- */
.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;
}

/* ---------- 工具包装器 ---------- */
.tool-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .tool-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ---------- 面板样式 ---------- */
.panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.panel h2 {
  font-size: 18px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
}

/* ---------- 输入区域 ---------- */
.input-panel textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  resize: vertical;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.input-panel textarea:focus {
  outline: none;
  border-color: #007bff;
}

.input-panel textarea::placeholder {
  color: #adb5bd;
}

.char-count {
  margin-top: 10px;
  font-size: 13px;
  color: #6c757d;
  text-align: right;
}

/* ---------- 输出区域 ---------- */
.output-preview {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  min-height: 200px;
  margin-bottom: 12px;
  word-break: break-all;
  white-space: pre-wrap;
}

.output-content {
  font-size: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #212529;
  line-height: 1.6;
}

.output-content:empty::before {
  content: 'Your mirror flipped text will appear here...';
  color: #adb5bd;
}

.output-actions {
  display: flex;
  gap: 10px;
}

/* ---------- 按钮样式 ---------- */
.btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #007bff;
  color: #ffffff;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-secondary {
  background: #6c757d;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-large {
  width: 100%;
  max-width: 400px;
  padding: 16px 32px;
  font-size: 16px;
}

/* ---------- 翻转选项区 ---------- */
.options-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.options-section h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 16px;
  font-weight: 600;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 576px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.radio-label:hover {
  background: #e9ecef;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-icon {
  font-size: 20px;
}

.radio-label span:last-child {
  font-size: 14px;
  color: #495057;
}

/* ---------- 示例展示区 ---------- */
.examples-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.examples-section h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.examples-category {
  margin-bottom: 20px;
}

.examples-category:last-child {
  margin-bottom: 0;
}

.examples-category h3 {
  font-size: 17px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
  padding-left: 10px;
  border-left: 4px solid #007bff;
}

.examples-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.example-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.example-original {
  font-size: 15px;
  color: #495057;
  min-width: 140px;
  font-family: 'Courier New', monospace;
}

.example-arrow {
  font-size: 18px;
  color: #007bff;
  font-weight: bold;
}

.example-converted {
  font-size: 16px;
  color: #212529;
}

/* ---------- 知识科普区 ---------- */
.knowledge-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.knowledge-section h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 16px;
  font-weight: 600;
}

.knowledge-section h3 {
  font-size: 17px;
  color: #212529;
  margin-bottom: 10px;
  margin-top: 20px;
  font-weight: 600;
}

.knowledge-section h4 {
  font-size: 15px;
  color: #212529;
  margin-bottom: 8px;
  font-weight: 600;
}

.knowledge-section p {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.7;
  margin-bottom: 12px;
}

/* 翻转类型卡片 */
.flip-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 576px) {
  .flip-types {
    grid-template-columns: 1fr;
  }
}

.flip-type-card {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.flip-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.flip-type-card h4 {
  margin-bottom: 8px;
}

.flip-type-card p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.supported-chars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chars-group {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
}

.chars-group span {
  font-size: 14px;
  color: #495057;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* ---------- 使用场景区 ---------- */
.use-cases-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.use-cases-section h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
}

.use-cases-section p {
  font-size: 15px;
  color: #6c757d;
  margin-bottom: 16px;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 576px) {
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
}

.use-case-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  color: #495057;
}

.use-case-icon {
  font-size: 20px;
}

/* ---------- FAQ区 ---------- */
.faq-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.faq-section h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 20px;
  font-weight: 600;
}

.faq-item {
  margin-bottom: 20px;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item h3 {
  font-size: 16px;
  color: #212529;
  margin-bottom: 8px;
  font-weight: 600;
}

.faq-item p {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}

/* ---------- 支持平台区 ---------- */
.platforms-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.platforms-section h2 {
  font-size: 20px;
  color: #212529;
  margin-bottom: 16px;
  font-weight: 600;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .platforms-grid {
    grid-template-columns: 1fr;
  }
}

.platform-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

/* ---------- 安全提示区 ---------- */
.security-section {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.security-icon {
  font-size: 32px;
}

.security-content h3 {
  font-size: 16px;
  color: #155724;
  margin-bottom: 4px;
  font-weight: 600;
}

.security-content p {
  font-size: 14px;
  color: #155724;
  line-height: 1.5;
  margin: 0;
}

/* ---------- 底部补充段落 ---------- */
.bottom-section {
  text-align: center;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.bottom-section p {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}

/* ---------- CTA区 ---------- */
.cta-section {
  text-align: center;
  margin-bottom: 24px;
}

/* ---------- 相关工具区 ---------- */
.related-tools {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 32px;
}

.related-tools h3 {
  font-size: 17px;
  color: #212529;
  margin-bottom: 12px;
  font-weight: 600;
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 576px) {
  .related-tools-grid {
    grid-template-columns: 1fr;
  }
}

.related-tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.related-tool-item:hover {
  background: #e9ecef;
}

.tool-icon {
  font-size: 18px;
  color: #007bff;
}

.related-tool-item span:last-child {
  font-size: 13px;
  color: #495057;
}

/* ---------- 复制成功动画 ---------- */
.copy-success {
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Toast样式 ---------- */
#common-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #212529;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

#common-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------- 响应式调整 ---------- */
@media (max-width: 576px) {
  .mf-container {
    padding: 10px;
  }
  
  .panel {
    padding: 15px;
  }
  
  .output-preview {
    min-height: 150px;
  }
  
  .input-panel textarea {
    height: 150px;
  }
}