/* LogoMaker 主样式表 */
:root {
  /* 主色调 - 使用更中性但专业的色彩 */
  --primary-color: #3a86ff;      /* 明亮蓝色，替代原有橙色 */
  --secondary-color: #8338ec;    /* 紫色作为辅助色 */
  --dark-bg: #1a1a2e;            /* 深蓝黑色背景 */
  --light-text: #ffffff;         /* 白色文本 */
  --accent-color: #ff006e;       /* 强调色 */
  --neutral-gray: #8d99ae;       /* 中性灰色 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 导航栏样式 */
.main-nav {
  background-color: rgba(26, 26, 46, 0.9);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--light-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover, 
.nav-links a.active {
  color: var(--primary-color);
}

/* 英雄区域样式 */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--dark-bg), #2a2a5a);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  color: var(--neutral-gray);
}

/* 样式选择器 */
.style-selector {
  padding: 3rem 0;
}

.style-selector h2 {
  text-align: center;
  margin-bottom: 2rem;
}

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

.style-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.style-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.style-card.active {
  transform: translateY(-5px);
  border: 2px solid var(--primary-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.style-card .preview {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Logo编辑器样式 */
.logo-editor {
  padding: 3rem 0;
  background-color: rgba(255, 255, 255, 0.02);
}

.editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
  
  .preview-area {
    min-height: 200px;
  }
  
  .logo-preview {
    font-size: 40px;
    padding: 1rem;
  }
  
  /* 在小屏幕上恢复一列布局 */
  .color-grid,
  .text-grid,
  .checkbox-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 预览区域 */
.preview-area {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color-dark);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  min-height: 300px;
  position: relative;
  overflow: hidden !important; /* 修改：隐藏溢出内容 */
  border: 1px solid var(--border-color);
}

.preview-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(100, 100, 255, 0.05) 0%, rgba(50, 50, 100, 0.02) 70%, transparent 100%);
  pointer-events: none;
}

/* Logo预览 */
.logo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  line-height: 1;
  transform-origin: center center;
  width: auto !important; /* 强制使用自动宽度 */
  height: auto !important; /* 强制使用自动高度 */
  box-sizing: content-box !important; /* 确保padding不计入内容区域 */
  white-space: nowrap !important; /* 强制文本不换行 */
  position: relative; /* 使用相对定位 */
  overflow: visible !important; /* 确保内容不被裁剪 */
  max-width: none !important; /* 防止最大宽度限制 */
  text-rendering: geometricPrecision; /* 提高文本渲染质量 */
  -webkit-font-smoothing: antialiased; /* 平滑字体 */
  -moz-osx-font-smoothing: grayscale; /* 平滑字体 */
}

/* 增强logo预览的边框和背景效果 */
.preview-area .logo-preview {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(1); /* 确保初始缩放为1 */
  transform-origin: center center; /* 确保从中心缩放 */
}

/* 移除默认样式，让JavaScript完全控制样式 */
.logo-preview .prefix,
.logo-preview .suffix {
  display: inline-block !important;
  font-family: Arial, sans-serif !important;
  white-space: nowrap !important; /* 防止文本换行 */
  box-sizing: border-box !important; /* 确保padding计入总宽度 */
  line-height: 1 !important; /* 确保行高一致 */
  max-width: none !important; /* 防止最大宽度限制 */
  vertical-align: middle !important; /* 垂直居中 */
  transform: none !important; /* 防止被其他变换影响 */
}

/* 移除这些默认样式，它们可能会覆盖JavaScript设置的样式 */
.logo-preview .prefix {
  white-space: nowrap !important; /* 防止文本换行 */
  box-sizing: border-box !important;
  display: inline-block !important;
  overflow: visible !important; /* 确保内容不被裁剪 */
  line-height: 1 !important; /* 确保行高一致 */
}

.logo-preview .suffix {
  padding: 0 8px !important; /* 确保足够的水平内边距 */
  box-sizing: border-box !important;
  display: inline-block !important;
  white-space: nowrap !important;
  overflow: visible !important; /* 确保内容不被裁剪 */
  border-radius: 4px !important; /* 确保圆角一致 */
  width: auto !important;
  height: auto !important;
  line-height: 1 !important; /* 确保行高一致 */
}

/* 控制面板样式增强 */
.control-panel {
  background-color: rgba(25, 25, 50, 0.6);
  border-radius: 8px;
  padding: 0.75rem;
  max-height: none;
  overflow-y: visible;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

/* 控制面板内部分组样式 */
.panel-section {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 导出区域增强 */
.export-section {
  margin-top: 1rem;
  position: relative;
}

#export-btn {
  width: 100%;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  background-color: #ff9900;
  color: #000000;
  box-shadow: 0 4px 10px rgba(255, 153, 0, 0.3);
}

#export-btn:hover {
  background-color: #e68a00;
}

.btn-primary {
  background-color: #ff9900; /* 修改主要按钮颜色为PornHub橙色 */
  color: #000; /* 黑色文字 */
}

.btn-primary:hover {
  background-color: #ff8800; /* 深一点的橙色 */
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

/* 移动设备上的响应式调整 */
@media (max-width: 768px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
  
  .preview-area {
    min-height: 200px;
    padding: 1rem;
  }
  
  .logo-preview {
    font-size: 40px;
    padding: 1rem;
  }
  
  /* 控制面板在移动设备上的布局调整 */
  .control-panel {
    padding: 0.75rem;
    max-height: none;
  }
  
  .panel-section {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
  }
  
  .panel-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  /* 在小屏幕上调整输入框布局 */
  .control-group {
    margin-bottom: 0.5rem;
  }
  
  .control-group label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
  
  .control-group input[type="text"],
  .control-group input[type="number"],
  .control-group input[type="color"] {
    padding: 0.35rem;
  }
  
  /* 在小屏幕上恢复一列布局 */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

.control-panel::-webkit-scrollbar {
  display: none;
}

.control-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 3px;
}

.panel-section h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.control-group {
  margin-bottom: 0.5rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

.control-group input[type="text"],
.control-group input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
}

.control-group input[type="color"] {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 4px;
  background-color: transparent;
}

.control-group input[type="range"] {
  width: 100%;
  margin: 0.25rem 0;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #1a1a2e; /* 深色背景 */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.5rem 0;
  z-index: 10;
  margin-top: 0.5rem;
  min-width: 150px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  left: 0;
  right: 0;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 功能特点样式 */
.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.feature-card p {
  color: var(--neutral-gray);
}

/* 法律免责声明 */
.legal-disclaimer {
  padding: 3rem 0;
  background-color: rgba(0, 0, 0, 0.2);
}

.legal-disclaimer h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.legal-disclaimer p {
  max-width: 800px;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--neutral-gray);
}

/* 关于页面内容样式 */
.content-section {
  padding: 3rem 0;
}

.content-card {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.content-card h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-card p {
  margin-bottom: 1rem;
  color: var(--light-text);
}

.feature-list, .legal-guidelines, .usage-steps {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-list li, .legal-guidelines li {
  margin-bottom: 1rem;
}

.usage-steps {
  counter-reset: step;
  list-style-type: none;
}

.usage-steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
}

.usage-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-weight: bold;
}

.contact-info {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.contact-info p {
  margin-bottom: 0.75rem;
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* 页脚样式 */
.main-footer {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a, 
.contact-link {
  color: var(--neutral-gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover, 
.contact-link:hover {
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--neutral-gray);
  font-size: 0.9rem;
}

.copyright a {
  color: var(--primary-color);
  text-decoration: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* 预览动画效果 */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.logo-preview.updated {
  animation: pulse 0.5s ease;
}

/* 基础按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

/* 字符计数样式 */
.char-count {
  font-size: 0.75rem;
  color: var(--neutral-gray);
  margin-left: 0.5rem;
  font-weight: normal;
}

/* 当接近最大字符数时改变颜色 */
.char-count.warning {
  color: #ffcc00;
}

.char-count.limit {
  color: #ff6b6b;
}

/* 确保logo预览中的所有span元素正确显示 */
.logo-preview span {
  display: inline-block !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-family: Arial, sans-serif !important;
  font-weight: bold !important;
  vertical-align: middle !important;
  max-width: none !important; /* 防止最大宽度限制 */
  box-sizing: border-box !important;
  overflow: visible !important;
  transform: none !important; /* 防止被其他变换影响 */
}

/* 特殊处理带背景的span */
.logo-preview span[style*="background-color"] {
  border-radius: 4px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  transform: none !important;
} 