.qr-page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  background: #faf8f5;
  min-height: 100vh;
}

.qr-tool {
  max-width: 1200px;
  width: 100%;
  padding: 0;
  background: #faf8f5;
}

body:has(.qr-tool) {
  background: #faf8f5 !important;
}

/* Header */
.qr-tool .tool-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 40px 30px;
  background: linear-gradient(135deg, #292524 0%, #44403c 100%);
  border-radius: 16px;
  color: #faf8f5;
  box-shadow: 0 4px 20px rgba(41, 37, 36, 0.2);
}

@media (min-width: 1024px) {
  .qr-tool .tool-header {
    padding: 48px 40px;
    margin-bottom: 28px;
  }
}

.qr-tool .tool-title {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.qr-tool .tool-title i {
  font-size: 1.6rem;
  color: #fef3c7;
}

.qr-tool .tool-subtitle {
  font-size: 1rem;
  margin: 0;
  opacity: 0.75;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: #d6d3d1;
}

.qr-tool .tool-intro {
  text-align: center;
  color: #57534e;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 auto 24px;
  padding: 0 16px;
}

@media (min-width: 1024px) {
  .qr-tool .tool-intro {
    font-size: 1rem;
  }
}

.qr-tool .tool-intro strong {
  color: #44403c;
}

/* Main Generator Layout */
.qr-generator-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

/* Input Section */
.qr-input-section {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 12px;
  padding: 24px;
}

.qr-input-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.qr-input-section .section-header label {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: #374151;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-input-section .section-header label i {
  color: #78716c;
}

/* Content Type Tabs */
.qr-content-tabs {
  display: flex;
  gap: 0;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.qr-tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: #fffdf9;
  border: none;
  border-right: 1px solid #e7e0d5;
  cursor: pointer;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #78716c;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qr-tab-btn:last-child {
  border-right: none;
}

.qr-tab-btn.active {
  background: #292524;
  color: #fef3c7;
}

.qr-tab-btn:hover:not(.active) {
  background: #f5f0e8;
}

.qr-tab-btn i {
  font-size: 0.85rem;
}

/* Input Fields */
.qr-input-group {
  margin-bottom: 16px;
}

.qr-input-group label {
  display: block;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #57534e;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.qr-input-group input[type="text"],
.qr-input-group input[type="url"],
.qr-input-group input[type="email"],
.qr-input-group input[type="tel"],
.qr-input-group input[type="password"],
.qr-input-group textarea,
.qr-input-group select {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  background: #fffdf9;
  color: #292524;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.qr-input-group input:focus,
.qr-input-group textarea:focus,
.qr-input-group select:focus {
  border-color: #a8a29e;
}

.qr-input-group input::placeholder,
.qr-input-group textarea::placeholder {
  color: #a8a29e;
}

.qr-input-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Customization Options */
.qr-customize-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e7e0d5;
}

.qr-customize-section .section-label {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #57534e;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-customize-section .section-label i {
  color: #78716c;
}

.qr-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qr-option-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-option-item label {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #78716c;
}

.qr-option-item select,
.qr-option-item input[type="color"] {
  padding: 8px 10px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  background: #fffdf9;
  color: #292524;
  cursor: pointer;
  outline: none;
}

.qr-option-item select:focus {
  border-color: #a8a29e;
}

.qr-color-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.qr-color-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-color-item label {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #78716c;
  white-space: nowrap;
}

.qr-color-item input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 2px;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  cursor: pointer;
  background: #fffdf9;
}

.qr-color-item input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

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

/* Generate Button */
.qr-generate-row {
  margin-top: 20px;
}

.qr-tool .btn-generate {
  width: 100%;
  padding: 14px 24px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #292524;
  color: #faf8f5;
  box-shadow: 0 2px 12px rgba(41, 37, 36, 0.2);
}

.qr-tool .btn-generate:hover {
  background: #44403c;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(41, 37, 36, 0.25);
}

.qr-tool .btn-generate:active {
  transform: translateY(0);
}

/* Output Section */
.qr-output-section {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-output-section .section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.qr-output-section .section-header label {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: #374151;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-output-section .section-header label i {
  color: #78716c;
}

/* QR Code Display */
.qr-canvas-wrapper {
  background: #ffffff;
  border: 2px solid #e7e0d5;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  position: relative;
}

.qr-canvas-wrapper canvas {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #a8a29e;
  text-align: center;
  padding: 20px;
}

.qr-placeholder i {
  font-size: 3rem;
  opacity: 0.4;
}

.qr-placeholder span {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Download Buttons */
.qr-download-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 340px;
}

.qr-tool .btn-download {
  flex: 1;
  padding: 10px 16px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fffdf9;
  color: #44403c;
}

.qr-tool .btn-download:hover {
  background: #f5f0e8;
  border-color: #d6cfc4;
}

.qr-tool .btn-download:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qr-tool .btn-download:disabled:hover {
  background: #fffdf9;
  border-color: #e7e0d5;
}

.qr-tool .btn-download-primary {
  background: #292524;
  color: #faf8f5;
  border-color: #292524;
}

.qr-tool .btn-download-primary:hover {
  background: #44403c;
  border-color: #44403c;
}

.qr-tool .btn-download-primary:disabled {
  opacity: 0.4;
}

.qr-tool .btn-download-primary:disabled:hover {
  background: #292524;
  border-color: #292524;
}

.qr-tool .btn-copy-qr {
  padding: 10px 16px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fffdf9;
  color: #44403c;
  width: 100%;
  max-width: 340px;
  margin-top: 8px;
}

.qr-tool .btn-copy-qr:hover {
  background: #f5f0e8;
  border-color: #d6cfc4;
}

.qr-tool .btn-copy-qr:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qr-tool .btn-copy-qr:disabled:hover {
  background: #fffdf9;
  border-color: #e7e0d5;
}

.qr-tool .btn-copy-qr.copied {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

/* QR Info */
.qr-info-bar {
  width: 100%;
  max-width: 340px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #f5f0e8;
  border-radius: 8px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  color: #78716c;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.qr-info-bar:empty {
  display: none;
}

.qr-info-bar .info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qr-info-bar .info-label {
  font-weight: 700;
  color: #57534e;
}

/* Reference Section */
.qr-tool .reference-section {
  margin-bottom: 32px;
}

.qr-tool .reference-section h3 {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #44403c;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-tool .reference-section h3 i {
  color: #78716c;
}

.qr-tool .reference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.qr-tool .reference-card {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.qr-tool .reference-card .ref-icon {
  font-size: 1.8rem;
  color: #78716c;
  margin-bottom: 12px;
}

.qr-tool .reference-card h4 {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #292524;
  margin: 0 0 6px 0;
}

.qr-tool .reference-card p {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: #78716c;
  margin: 0;
  line-height: 1.5;
}

/* Syntax Guide */
.qr-tool .syntax-guide-section { margin-bottom: 32px; }
.qr-tool .syntax-guide-section > h3 { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1rem; font-weight: 700; color: #44403c; margin: 0 0 16px 0; display: flex; align-items: center; gap: 8px; }
.qr-tool .syntax-guide-section > h3 i.fa-graduation-cap { color: #7c3aed; }
.qr-tool .syntax-guide-content { background: #fffdf9; border: 2px solid #e7e0d5; border-radius: 12px; overflow: hidden; }
.qr-tool .guide-article { padding: 24px 28px; border-bottom: 1px solid #e7e0d5; }
.qr-tool .guide-article:last-child { border-bottom: none; }
.qr-tool .guide-article h2 { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1.15rem; font-weight: 700; color: #292524; margin: 0 0 12px 0; }
.qr-tool .guide-article p { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0.9rem; color: #57534e; margin: 0 0 12px 0; line-height: 1.7; }
.qr-tool .guide-article p:last-child { margin-bottom: 0; }
.qr-tool .guide-article a { color: #292524; font-weight: 600; text-decoration: underline; text-decoration-color: #d6cfc4; text-underline-offset: 3px; transition: text-decoration-color 0.15s ease; }
.qr-tool .guide-article a:hover { text-decoration-color: #292524; }
.qr-tool .guide-article ul { list-style: none; padding: 0; margin: 0; }
.qr-tool .guide-article ul li { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0.9rem; color: #57534e; line-height: 1.7; padding: 8px 0 8px 20px; position: relative; border-bottom: 1px solid #f5f0e8; }
.qr-tool .guide-article ul li:last-child { border-bottom: none; }
.qr-tool .guide-article ul li::before { content: "\2022"; color: #f59e0b; font-weight: bold; position: absolute; left: 0; }
.qr-tool .guide-article ol { list-style: none; padding: 0; margin: 0; counter-reset: guide-step; }
.qr-tool .guide-article ol li { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0.9rem; color: #57534e; line-height: 1.7; padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid #f5f0e8; counter-increment: guide-step; }
.qr-tool .guide-article ol li:last-child { border-bottom: none; }
.qr-tool .guide-article ol li::before { content: counter(guide-step); color: #faf8f5; font-weight: 700; font-size: 0.7rem; position: absolute; left: 0; top: 10px; background: #292524; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.qr-tool .guide-article code { font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace; background: #292524; padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; color: #fef3c7; }

/* FAQ */
.qr-tool .faq-section { margin-bottom: 40px; padding: 30px; background: #f5f0e8; border-radius: 16px; border: 2px solid #e7e0d5; }
.qr-tool .faq-section h2 { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1.25rem; font-weight: 700; color: #44403c; margin: 0 0 24px 0; display: flex; align-items: center; gap: 10px; }
.qr-tool .faq-section h2 i { color: #78716c; }
.qr-tool .faq-item { background: #fffdf9; border: 2px solid #e7e0d5; border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.qr-tool .faq-item:last-child { margin-bottom: 0; }
.qr-tool .faq-item h3 { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1rem; font-weight: 700; color: #292524; margin: 0 0 10px 0; }
.qr-tool .faq-item p { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0.9rem; color: #78716c; margin: 0; line-height: 1.6; }
.qr-tool .faq-item a { color: #44403c; font-weight: 600; }
.qr-tool .faq-item code { font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace; background: #292524; padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; color: #fef3c7; }

/* Ad sections */
.qr-tool .dedicated-ad-section { margin: 32px 0; padding: 16px 0; }
.qr-tool .bottom-ad-section { margin: 40px 0 20px 0; padding: 16px 0; }
.qr-tool .top-ad-section { margin: 0 0 24px 0; }

/* Responsive */
@media (max-width: 900px) {
  .qr-generator-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .qr-page-wrapper { padding: 15px 12px 30px; }
  .qr-tool .tool-header { padding: 30px 20px; border-radius: 12px; }
  .qr-tool .tool-title { font-size: 1.5rem; }
  .qr-content-tabs { flex-wrap: wrap; }
  .qr-tab-btn { flex: none; width: calc(33.33% - 1px); }
  .qr-options-grid { grid-template-columns: 1fr; }
  .qr-tool .reference-grid { grid-template-columns: 1fr; }
  .qr-tool .faq-section { padding: 20px; }
  .qr-tool .guide-article { padding: 20px; }
  .qr-download-actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .qr-tool .tool-title { font-size: 1.3rem; flex-direction: column; gap: 8px; }
  .qr-tab-btn { width: calc(50% - 1px); }
  .qr-canvas-wrapper { padding: 24px; }
}
