/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Nunito', sans-serif;
  background: #f7f7f7;
  color: #333;
  line-height: 1.6;
}

/* Container */
.container {
  width: 95%;
  max-width: 2400px;
  margin: 0 auto;
  padding: 0% 0;
}

/* Header */
.header {
  background: #6495ED;
  color: #fff;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.8em;
  font-weight: 700;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f7f7f7, #e0eafc);
  padding: 20px 0;
}
.hero-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: center;
}
.hero-text {
  flex: 1 1 300px;
}
.hero-text h2 {
  font-size: 2.5em;
  margin-bottom: 30px;
}
.hero-text p {
  font-size: 1.1em;
  margin-bottom: 20px;
}
.cta {
  text-decoration: none;
  padding: 10px 20px;
  background: #6495ED;
  color: #fff;
  border-radius: 5px;
  font-weight: 600;
}
.hero-generator {
  flex: 1 1 400px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Controls & Canvas (Generator Tool) */
.controls-card {
  margin-bottom: 20px;
}
.controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.control-group {
  display: flex;
  flex-direction: column;
}
.control-group label {
  font-weight: 700;
  margin-bottom: 5px;
}
input[type="text"],
input[type="range"],
input[type="color"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
input[type="range"] {
  width: 100%;
}
.color-group {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.color-control {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.color-control input[type="color"] {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
}

/* Download Buttons */
.download-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}
.download-group button {
  background: #6495ED;
  color: #fff;
  border: none;
  padding: 10px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.download-group button:hover {
  background: #f36f3f;
}

/* Canvas Container */
.canvas-container {
  width: 100%;
  height: 500px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 2rem;
  overflow: hidden;
}

#myCanvas {
  width: 100%;
  height: 100%;
}

/* Testimonials Section */
.testimonials {
  background: #fff;
  padding: 40px 0;
  text-align: center;
}
.testimonials h2 {
  margin-bottom: 30px;
  font-size: 2em;
  font-weight: 700;
}
.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.testimonial {
  max-width: 300px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f9f9f9;
}
.testimonial p {
  font-style: italic;
  margin-bottom: 10px;
}
.testimonial cite {
  font-weight: bold;
  color: #555;
}

/* FAQ Section */
.faq {
  padding: 40px 0;
  background: #e0eafc;
}
.faq h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2em;
}
.faq-item {
  margin-bottom: 20px;
}
.faq-item h3 {
  font-weight: 700;
  margin-bottom: 10px;
}
.faq-item p {
  margin-left: 20px;
}

/* Features Section */
.features {
  padding: 4rem 0;
  background-color: #f8f9fa;
}

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

.feature-item {
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-item h3 {
  color: #213B45;
  margin-bottom: 1rem;
}

.feature-item p {
  color: #666;
  line-height: 1.5;
}

/* Usage Examples Section */
.usage-examples {
  padding: 4rem 0;
  background-color: white;
}

.examples-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.examples-list li {
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  color: #213B45;
  transition: background-color 0.3s ease;
}

.examples-list li:hover {
  background-color: #e9ecef;
}

/* Footer */
footer.footer {
  background: #6495ED;
  color: #fff;
  text-align: center;
  
}
footer.footer p {
  font-weight: 600;
}

/* Generator Layout */
.generator {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.controls-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .container {
    padding: 10px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .examples-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 968px) {
  .generator {
    grid-template-columns: 1fr;
  }
  
  .canvas-container {
    height: 400px;
  }
}

/* 颜色预设样式 */
.preset-colors {
    margin-top: 1.5rem;
}

.preset-colors label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preset-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-bottom: 0.3rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-preview {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.preset-btn span:last-child {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.2rem;
}

/* 背景图片上传控件样式 */
.background-control {
    margin-top: 1.5rem;
}

.background-control label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.upload-group {
    display: flex;
    gap: 0.5rem;
}

.file-input {
    display: none;
}

.upload-btn, .remove-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.upload-btn:hover, .remove-btn:hover {
    background: #f5f5f5;
}

.remove-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.remove-btn:hover {
    background: #fff5f5;
}

/* SVG代码显示区域样式 */
.svg-code-container {
    margin-top: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.copy-btn {
    padding: 0.25rem 0.75rem;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #f8f9fa;
}

.copy-btn.copied {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

#svgCodeDisplay {
    padding: 1rem;
    margin: 0;
    max-height: 200px;
    overflow: auto;
    font-family: monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 美化滚动条 */
#svgCodeDisplay::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#svgCodeDisplay::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#svgCodeDisplay::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#svgCodeDisplay::-webkit-scrollbar-thumb:hover {
    background: #555;
} 