/* Reset and base styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #ffffff;
}

/* Container and layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 80px 0 60px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 300;
  margin: 0 0 16px 0;
  letter-spacing: -1px;
  color: #2c3e50;
}

.hero .tagline {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 300;
  color: #6c757d;
}

.hero-description {
  font-size: 1.125rem;
  color: #495057;
  margin: 20px auto 0;
  max-width: 600px;
}

.hero-examples {
  margin: 40px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-examples img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.cta-button {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.cta-button:hover {
  background: #5468d4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* Content sections */
.content {
  padding: 0 0 80px;
}

/* Links */
.content a {
  color: #667eea;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.content a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

section {
  margin-bottom: 80px;
}

h2 {
  font-size: 2.5rem;
  font-weight: 300;
  text-align: center;
  margin: 0 0 40px 0;
  color: #2c3e50;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 16px 0;
  color: #34495e;
}

/* Examples section */
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 20px;
}

.example-item {
  text-align: center;
  padding: 30px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.example-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.badge-preview {
  margin-bottom: 20px;
}

.badge-preview img {
  max-width: 100%;
  height: auto;
}

.url-display {
  display: inline-block;
  background: #f8f9fa;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.875rem;
  color: #495057;
  border: 1px solid #dee2e6;
  font-weight: 500;
  margin-top: 12px;
}

/* Generator section */
.generator-section {
  text-align: center;
  background: #f8f9fa;
  padding: 50px 40px;
  scroll-margin-top: 20px;
}

.section-description {
  font-size: 1.125rem;
  color: #6c757d;
  margin: 0 auto 30px;
  max-width: 600px;
  text-align: center;
}

.input-wrapper {
  margin-bottom: 25px;
}

.options-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 10px 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.style-options,
.data-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.color-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.color-swatch-label {
  position: relative;
  cursor: pointer;
}
.color-swatch-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.color-swatch {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}
.color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.color-swatch-label input[type="radio"]:checked + .color-swatch {
  border-color: #2c3e50;
  box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
  transform: scale(1.05);
}
.color-swatch-label input[type="radio"]:focus + .color-swatch {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.generator-form {
  max-width: 900px;
  margin: 0 auto;
}

.package-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.package-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.package-input::placeholder {
  color: #adb5bd;
}

/* Badge options */
.badge-options {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.option-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 20px;
  background: white;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.option-label:hover {
  border-color: #667eea;
}

.option-label input {
  cursor: pointer;
}

.option-label input[type="radio"]:checked + span,
.option-label input[type="checkbox"]:checked + span {
  color: #667eea;
  font-weight: 600;
}

.separator {
  width: 1px;
  height: 24px;
  background: #e9ecef;
}

.option-label.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.option-label.disabled input {
  cursor: not-allowed;
}

.status-messages {
  margin-top: 20px;
  min-height: 30px;
}

.package-not-found,
.package-not-valid {
  color: #e74c3c;
  font-weight: 500;
}

.generated-badges {
  margin-top: 30px;
  padding: 0;
  background: transparent;
  border: none;
}

/* Styles section */
.styles-section {
  padding: 80px 0;
}

.style-category {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 60px 0 16px 0;
  text-align: center;
}

.style-category:first-of-type {
  margin-top: 0;
}

.category-description {
  font-size: 1rem;
  color: #6c757d;
  text-align: center;
  margin: 0 auto 40px;
  max-width: 800px;
}

.badge-variant {
  margin-bottom: 30px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  width: 100%;
}

.badge-variant h4 {
  margin: 0 0 20px 0;
  color: #667eea;
  font-size: 1.25rem;
  text-align: center;
}

.badge-display {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  margin-bottom: 20px;
}

.embed-codes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.embed-code h5 {
  margin: 0 0 10px 0;
  color: #34495e;
  font-size: 1rem;
  font-weight: 600;
}

.embed-code pre {
  margin: 0;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 15px;
  border-radius: 6px;
  font-size: 0.85rem;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.embed-code code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
}

@media (max-width: 768px) {
  .badge-variant {
    padding: 20px;
    margin-bottom: 20px;
  }

  .embed-code pre {
    padding: 12px;
    font-size: 0.8rem;
  }
}

/* Usage section */
.code-examples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.code-block {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px;
  border: 1px solid #e9ecef;
}

.code-block h3 {
  margin-top: 0;
  color: #667eea;
}

.code-block pre {
  margin: 0;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.code-block code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-family: inherit;
}

/* Options section */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* API Reference section */
.api-section {
  padding: 80px 0;
  background: #f8f9fa;
}

.api-content {
  max-width: 1000px;
  margin: 0 auto;
}

.api-group {
  margin-bottom: 60px;
}

.api-group:last-child {
  margin-bottom: 0;
}

.api-group h3 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.api-group p {
  color: #6c757d;
  margin-bottom: 20px;
  line-height: 1.6;
}

.api-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.api-table table {
  width: 100%;
  border-collapse: collapse;
}

.api-table th {
  background: #667eea;
  color: white;
  text-align: left;
  padding: 16px;
  font-weight: 600;
}

.api-table td {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.api-table tr:last-child td {
  border-bottom: none;
}

.api-table code {
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.875rem;
  color: #667eea;
  font-weight: 600;
}

.api-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.api-example {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.api-example h4 {
  color: #2c3e50;
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.api-example code {
  display: block;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 12px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.85rem;
  margin-bottom: 12px;
  overflow-x: auto;
}

.api-example p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.url-format {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  margin-bottom: 20px;
}

.url-format code {
  display: block;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 16px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 1rem;
  text-align: center;
}

.option-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.option-card h3 {
  color: #667eea;
  margin-bottom: 12px;
}

.option-card p {
  color: #6c757d;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.option-example {
  margin-bottom: 15px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 8px;
}

.option-card code:not(.url-display) {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid #e9ecef;
  color: #6c757d;
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0 30px;
    margin-bottom: 40px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .example-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .example-item {
    padding: 20px 16px;
  }

  .generator-section {
    padding: 30px 20px;
  }

  .code-examples {
    gap: 20px;
  }

  .code-block {
    padding: 20px;
  }

  .code-block pre {
    padding: 16px;
    font-size: 0.8rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .badge-options {
    flex-direction: column;
    gap: 20px;
  }

  .option-group {
    gap: 10px;
  }

  .separator {
    width: 100%;
    height: 1px;
  }

.option-card {
    padding: 12px;
  }

  .api-section {
    padding: 40px 0;
  }

  .api-examples {
    grid-template-columns: 1fr;
  }

  .api-table {
    font-size: 0.9rem;
  }

  .api-table th,
  .api-table td {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .package-input {
    padding: 14px 16px;
    font-size: 1rem;
  }
}

/* User packages page */
.user-packages {
  padding: 40px 0;
}

.user-packages h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.package-item {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s ease;
}

.package-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.package-item h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
}

.package-item h3 a {
  color: #cb3837;
  text-decoration: none;
}

.package-item h3 a:hover {
  text-decoration: underline;
}

.package-description {
  color: #6c757d;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

/* Legacy compatibility */
.pure-g {
  display: inherit;
}

/* Hide old elements that might still be referenced */
#layout, #main, #makemeone, #nodesource {
  display: none;
}

/* Badge generator result styles */
.badge-result {
  margin-top: 30px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.url-copy-field,
.code-copy-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.url-copy-field:hover,
.code-copy-field:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.url-copy-field:focus,
.code-copy-field:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
}

.embed-codes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-display-wrapper,
.code-display-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.url-display-wrapper label,
.code-display-wrapper label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

.copy-field-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.copy-btn:active {
  transform: scale(0.95);
}