
/* Hero Section */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: #444;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

h2 i {
  color: var(--primary);
}

h3 {
  font-size: 1.4rem;
  margin: 20px 0 15px;
  color: var(--dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.tabs {
  display: flex;
  justify-content: center;
  margin: 0 0 30px;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 25px;
  cursor: pointer;
  background: var(--light-gray);
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.tab.active {
  background: var(--primary);
  color: white;
}

.tab:hover:not(.active) {
  background: #dbe4ff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

input, select, button, textarea {
  margin: 0.5em auto;
  padding: 15px;
  width: 100%;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--light-gray);
  background: var(--light);
  display: block;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  color: #444;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

button {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 15px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button:hover, button:focus {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button.secondary {
  background: var(--light);
  color: var(--primary);
  border: 2px solid var(--primary);
}

button.secondary:hover, button.secondary:focus {
  background: #f0f4ff;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

canvas {
  margin: 1.5em auto;
  display: block;
  max-width: 100%;
  border-radius: 12px;
  background: var(--light);
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--light-gray);
}

.loading {
  display: none;
  text-align: center;
  padding: 30px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  color: #e74c3c;
  padding: 15px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: var(--border-radius);
  margin: 20px 0;
  display: none;
  border-left: 4px solid #e74c3c;
}

.success {
  color: #27ae60;
  padding: 15px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: var(--border-radius);
  margin: 20px 0;
  display: none;
  border-left: 4px solid #27ae60;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 1.5em 0;
  flex-wrap: wrap;
}

.btn-group button {
  width: auto;
  min-width: 180px;
  flex: 1;
}

/* Guide Section */
.guide-section {
  background: var(--light);
  border-radius: var(--border-radius);
  padding: 40px;
  margin: 40px auto;
  box-shadow: var(--box-shadow);
  text-align: center;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 25px;
}

.guide-item {
  padding: 25px;
  background: #f8f9ff;
  border-radius: var(--border-radius);
  text-align: center;
  font-size: 14px;
}

.guide-item h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.guide-item h3 i {
  font-size: 1.8rem;
}

.guide-item p {
  font-size: 1rem;
  color: #444;
}

/* New Color Options Section */
.color-options-container {
  margin: 1.5em 0;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  padding: 20px;
  background: #fafbff;
}

.color-options-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.color-options-header i {
  color: var(--primary);
  font-size: 1.5rem;
}

.text-display-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.color-options-content {
  display: block;
}

.color-group {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 1.5em 0;
  flex-wrap: wrap;
}

.color-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 200px;
}

.color-input label {
  font-weight: 500;
  color: var(--dark);
}

.color-input input[type="color"] {
  width: 60px;
  height: 60px;
  padding: 5px;
  cursor: pointer;
  border-radius: 12px;
  border: 2px solid var(--light-gray);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.color-input input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 1em 0;
  padding: 10px;
  border-radius: 50px;
  background: #f0f4ff;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.toggle-label {
  font-weight: 500;
  color: var(--dark);
  font-size: 1rem;
}

.toggle-switch-visual {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.toggle-switch-visual input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

/* Text Display Options */
.text-display-container {
  margin: 1.5em 0;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  padding: 20px;
  background: #fafbff;
}

.text-display-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.text-display-header i {
  color: var(--primary);
  font-size: 1.5rem;
}

.text-display-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.text-display-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.text-display-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-display-control label {
  font-weight: 500;
  color: var(--dark);
}

.text-display-control input[type="color"] {
  width: 60px;
  height: 60px;
  padding: 5px;
  cursor: pointer;
  border-radius: 12px;
  border: 2px solid var(--light-gray);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.text-display-control input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.text-display-control select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--light-gray);
  background: var(--light);
}

.text-display-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-display-group label {
  font-weight: 500;
  color: var(--dark);
}

.text-display-group input[type="text"] {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--light-gray);
  background: var(--light);
}

.text-display-note {
  text-align: center;
  margin: 15px 0 5px;
  color: #666;
  font-size: 0.9rem;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #e0e0e0;
}

/* Copy to clipboard section */
.copy-container {
  margin: 1.5em 0;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  padding: 20px;
  background: #fafbff;
  display: none;
  text-align: center;
}

.copy-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.copy-header i {
  color: var(--primary);
  font-size: 1.5rem;
}

.copy-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.copy-btn {
  padding: 12px 25px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  font-weight: 600;
  font-size: 1rem;
}

.copy-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.copy-success {
  color: #27ae60;
  text-align: center;
  margin-top: 10px;
  display: none;
  font-weight: 500;
}

/* Responsive Design for Barcode Generator */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .tab {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .guide-section, .uses-section {
    padding: 25px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group button {
    width: 100%;
  }
  
  .guide-grid {
    grid-template-columns: 1fr;
  }
  
  .color-options {
    flex-direction: column;
    align-items: center;
  }

  .text-display-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 40px 0 20px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .card {
    padding: 20px;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
}
