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

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

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

/* Header */
.jwt-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) {
  .jwt-tool .tool-header {
    padding: 48px 40px;
    margin-bottom: 28px;
  }
}

.jwt-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;
}

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

.jwt-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;
}

.jwt-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) {
  .jwt-tool .tool-intro {
    font-size: 1rem;
  }
}

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

/* Token Input */
.token-input-section {
  margin-bottom: 24px;
}

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

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

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

.input-actions {
  display: flex;
  gap: 8px;
}

.btn-mini {
  padding: 5px 10px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  background: #44403c;
  color: #d6d3d1;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-mini:hover {
  background: #57534e;
  color: #faf8f5;
}

.token-input-container {
  position: relative;
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.token-input-container:focus-within {
  border-color: #a8a29e;
}

#jwt-input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  border: none;
  background: transparent;
  color: #292524;
  resize: none;
  outline: none;
  word-break: break-all;
  box-sizing: border-box;
}

#jwt-input::placeholder {
  color: #a8a29e;
  word-break: break-all;
}

.jwt-display {
  padding: 14px 16px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  word-break: break-all;
  cursor: text;
  min-height: 60px;
}

.jwt-display .jwt-part-header {
  color: #dc2626;
  font-weight: 600;
}

.jwt-display .jwt-part-payload {
  color: #7c3aed;
  font-weight: 600;
}

.jwt-display .jwt-part-signature {
  color: #0891b2;
  font-weight: 600;
}

.jwt-display .jwt-dot {
  color: #78716c;
  font-weight: 700;
}

/* Token Status */
.token-status {
  margin-top: 10px;
  min-height: 20px;
}

.token-status .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.valid {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge.expired {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-badge.no-exp {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Decoded Section */
.decoded-section {
  margin-bottom: 24px;
}

.decoded-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.decoded-panel {
  background: #292524;
  border: 2px solid #44403c;
  border-radius: 10px;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1c1917;
  border-bottom: 1px solid #44403c;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #d6d3d1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-header {
  background: #dc2626;
}

.dot-payload {
  background: #7c3aed;
}

.dot-signature {
  background: #0891b2;
}

.algo-badge {
  margin-left: auto;
  margin-right: 4px;
  padding: 2px 8px;
  background: #44403c;
  color: #fef3c7;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.claims-count {
  margin-left: auto;
  margin-right: 4px;
  padding: 2px 8px;
  background: #44403c;
  color: #d6d3d1;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.7rem;
  font-weight: 600;
}

.btn-copy {
  background: none;
  border: none;
  color: #78716c;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-size: 0.8rem;
}

.btn-copy:hover {
  color: #faf8f5;
  background: #44403c;
}

.btn-copy.copied {
  color: #4ade80;
}

.decoded-content {
  padding: 0;
  max-height: 400px;
  overflow: auto;
}

.decoded-json {
  margin: 0 !important;
  padding: 12px 16px !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #faf8f5;
  background: transparent !important;
  white-space: pre;
  border-radius: 0 !important;
}

.decoded-json .json-key {
  color: #f87171;
}

.decoded-json .json-string {
  color: #a5f3fc;
}

.decoded-json .json-number {
  color: #fde68a;
}

.decoded-json .json-boolean {
  color: #c4b5fd;
}

.decoded-json .json-null {
  color: #fb923c;
}

.decoded-json .json-punctuation {
  color: #d6d3d1;
}

/* Claims Table */
.claims-section {
  margin-bottom: 20px;
}

.claims-table {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 10px;
  overflow: hidden;
}

.claim-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  border-bottom: 1px solid #f5f0e8;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

.claim-row:last-child {
  border-bottom: none;
}

.claim-row:hover {
  background: #f5f0e8;
}

.claim-key {
  padding: 10px 14px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #292524;
  background: #f5f0e8;
  border-right: 1px solid #e7e0d5;
  display: flex;
  align-items: center;
}

.claim-value {
  padding: 10px 14px;
  color: #44403c;
  word-break: break-all;
  display: flex;
  align-items: center;
  border-right: 1px solid #f5f0e8;
}

.claim-description {
  padding: 10px 14px;
  color: #78716c;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}

.claim-description .timestamp-human {
  color: #57534e;
  font-weight: 600;
}

.claim-description .expired-tag {
  color: #dc2626;
  font-weight: 700;
  margin-left: 6px;
}

.claim-description .valid-tag {
  color: #166534;
  font-weight: 700;
  margin-left: 6px;
}

/* Signature Section */
.signature-section {
  margin-bottom: 24px;
}

.signature-info {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 10px;
  padding: 16px 20px;
}

.signature-info code {
  display: block;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  color: #0891b2;
  word-break: break-all;
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f5f0e8;
  border-radius: 6px;
}

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

.signature-note i {
  color: #a8a29e;
  margin-right: 4px;
}

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

.jwt-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;
}

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

.jwt-tool .reference-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 1024px) {
  .jwt-tool .reference-grid {
    gap: 24px;
  }
}

.jwt-tool .reference-card {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 10px;
  padding: 16px 20px;
}

.jwt-tool .reference-card h4 {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #78716c;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e7e0d5;
}

.jwt-tool .reference-card table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
  background: transparent;
}

.jwt-tool .reference-card tr {
  border: none;
  background: transparent;
}

.jwt-tool .reference-card td {
  padding: 5px 0;
  color: #44403c;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  border: none;
  background: transparent;
}

.jwt-tool .reference-card td:first-child {
  width: 30%;
}

.jwt-tool .reference-card td:last-child {
  color: #78716c;
  font-size: 0.8rem;
}

.jwt-tool .reference-card code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  background: #292524;
  color: #fef3c7;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Syntax Guide */
.jwt-tool .syntax-guide-section {
  margin-bottom: 32px;
}

.jwt-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;
}

.jwt-tool .syntax-guide-section > h3 i.fa-graduation-cap {
  color: #7c3aed;
}

.jwt-tool .syntax-guide-content {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 12px;
  overflow: hidden;
}

.jwt-tool .guide-article {
  padding: 24px 28px;
  border-bottom: 1px solid #e7e0d5;
}

.jwt-tool .guide-article:last-child {
  border-bottom: none;
}

.jwt-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;
}

.jwt-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;
}

.jwt-tool .guide-article p:last-child {
  margin-bottom: 0;
}

.jwt-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;
}

.jwt-tool .guide-article a:hover {
  text-decoration-color: #292524;
}

.jwt-tool .guide-article ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.jwt-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;
}

.jwt-tool .guide-article ul li:last-child {
  border-bottom: none;
}

.jwt-tool .guide-article ul li::before {
  content: "\2022";
  color: #f59e0b;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.jwt-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 */
.jwt-tool .faq-section {
  margin-bottom: 40px;
  padding: 30px;
  background: #f5f0e8;
  border-radius: 16px;
  border: 2px solid #e7e0d5;
}

.jwt-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;
}

.jwt-tool .faq-section h2 i {
  color: #78716c;
}

.jwt-tool .faq-item {
  background: #fffdf9;
  border: 2px solid #e7e0d5;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.jwt-tool .faq-item:last-child {
  margin-bottom: 0;
}

.jwt-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;
}

.jwt-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;
}

.jwt-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 */
.jwt-tool .dedicated-ad-section {
  margin: 32px 0;
  padding: 16px 0;
}

.jwt-tool .bottom-ad-section {
  margin: 40px 0 20px 0;
  padding: 16px 0;
}

.jwt-tool .top-ad-section {
  margin: 0 0 24px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .jwt-page-wrapper {
    padding: 15px 12px 30px;
  }

  .jwt-tool .tool-header {
    padding: 30px 20px;
    border-radius: 12px;
  }

  .jwt-tool .tool-title {
    font-size: 1.5rem;
  }

  .decoded-panels {
    grid-template-columns: 1fr;
  }

  .claim-row {
    grid-template-columns: 80px 1fr;
  }

  .claim-description {
    display: none;
  }

  .jwt-tool .reference-grid {
    grid-template-columns: 1fr;
  }

  .jwt-tool .faq-section {
    padding: 20px;
  }

  .jwt-tool .guide-article {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .jwt-tool .tool-title {
    font-size: 1.3rem;
    flex-direction: column;
    gap: 8px;
  }

  #jwt-input {
    font-size: 0.8rem;
  }

  .decoded-json {
    font-size: 0.8rem;
  }
}
