* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #1e293b;
  font-family: Arial, sans-serif;
}

.home {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 100px 0 70px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 52px;
  letter-spacing: -2px;
}

.hero-subtitle {
  margin: 14px 0 32px;
  color: #64748b;
  font-size: 20px;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 18px 22px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: white;
  font-size: 16px;
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tools-section {
  padding-bottom: 80px;
}

.tools-section h2 {
  margin-bottom: 24px;
  font-size: 24px;
}

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

.tool-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.tool-icon {
  font-size: 28px;
}

.tool-card h3 {
  margin: 0 0 7px;
  font-size: 17px;
}

.tool-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 800px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .hero {
    padding-top: 60px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

.tool-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.back-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: #1e293b;
}

.tool-header {
  margin: 70px 0 35px;
  text-align: center;
}

.tool-header h1 {
  margin-bottom: 12px;
  font-size: 42px;
  letter-spacing: -1px;
}

.tool-header p {
  color: #64748b;
  font-size: 18px;
}

.converter {
  max-width: 700px;
  margin: 0 auto;
}

.drop-zone {
  padding: 70px 30px;
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  background: white;
  text-align: center;
}

.drop-zone h2 {
  margin: 12px 0 6px;
}

.drop-zone > p {
  color: #64748b;
}

.drop-icon {
  font-size: 44px;
}

.choose-file-button,
.convert-button {
  display: inline-block;
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  background: #1e293b;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.choose-file-button:hover,
.convert-button:hover {
  opacity: 0.9;
}

.drop-zone .privacy-note {
  margin: 24px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.conversion-result {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
  text-align: center;
}

.conversion-result img {
  display: block;
  max-width: 100%;
  max-height: 350px;
  margin: 0 auto 20px;
  border-radius: 10px;
}

.file-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.file-info strong {
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 550px) {
  .tool-header {
    margin-top: 45px;
  }

  .tool-header h1 {
    font-size: 32px;
  }

  .drop-zone {
    padding: 45px 20px;
  }
}
.drop-zone.dragging {
  border-color: #64748b;
  background: #f1f5f9;
}

.converter-options {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
}

.option + .option {
  margin-top: 25px;
}

.option-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.option-heading label {
  font-weight: 600;
  color: #1e293b;
}

.option p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
}

.option input[type="range"] {
  width: 100%;
}

.option input[type="color"] {
  width: 45px;
  height: 35px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: white;
  cursor: pointer;
}

.converter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.secondary-button,
.text-button,
.small-download-button,
.remove-button {
  padding: 11px 17px;
  border-radius: 9px;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button,
.small-download-button {
  border: 1px solid #1e293b;
  background: white;
  color: #1e293b;
}

.text-button,
.remove-button {
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
}

.image-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.image-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.image-item-preview {
  width: 100px;
  height: 80px;
  border-radius: 9px;
  object-fit: contain;
  background: #f8fafc;
}

.image-item-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: #64748b;
  font-size: 13px;
}

.image-item-name {
  overflow: hidden;
  color: #1e293b;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.converted-size {
  color: #334155;
  font-weight: 600;
}

.image-item-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tool-info {
  max-width: 700px;
  margin: 70px auto 0;
  color: #475569;
  line-height: 1.7;
}

.tool-info h2,
.tool-info h3 {
  color: #1e293b;
}

.tool-info h3 {
  margin-top: 30px;
}

.drop-zone.dragging {
  border-color: #64748b;
  background: #f1f5f9;
}

@media (max-width: 650px) {
  .image-item {
    grid-template-columns: 75px minmax(0, 1fr);
  }

  .image-item-preview {
    width: 75px;
    height: 65px;
  }

  .image-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .converter-actions button {
    flex-grow: 1;
  }
}

.resize-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
}

.resize-mode-button {
  padding: 9px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
}

.resize-mode-button.active {
  border-color: #1e293b;
  background: #1e293b;
  color: white;
}

.resize-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.resize-inputs label {
  display: block;
  margin-bottom: 7px;
  color: #1e293b;
  font-weight: 600;
}

.dimension-input {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: white;
}

.dimension-input input {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  outline: none;
  font-size: 15px;
}

.dimension-input span {
  padding-right: 12px;
  color: #94a3b8;
}

.aspect-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 500px) {
  .resize-inputs {
    grid-template-columns: 1fr;
  }
}

.json-tool {
  max-width: 1100px;
  margin: 0 auto;
}

.json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.json-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.json-indent {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

.json-indent select {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #1e293b;
}

.json-editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.json-editor {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.json-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.json-editor-heading > div {
  display: flex;
  gap: 5px;
}

.json-small-action {
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
}

.json-small-action:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.json-editor textarea {
  display: block;
  width: 100%;
  min-height: 450px;
  padding: 18px;
  border: 0;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  background: #ffffff;
  color: #1e293b;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  tab-size: 2;
}

.json-editor textarea::placeholder {
  color: #94a3b8;
}

.json-status {
  min-height: 22px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.json-status:empty {
  padding: 0;
}

.json-status-success {
  background: #f0fdf4;
  color: #166534;
}

.json-status-error {
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 800px) {
  .json-editors {
    grid-template-columns: 1fr;
  }

  .json-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .json-editor textarea {
    min-height: 300px;
  }
}

.text-counter {
  max-width: 900px;
  margin: 0 auto;
}

.counter-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.counter-stat {
  padding: 18px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  text-align: center;
}

.counter-stat strong {
  display: block;
  overflow: hidden;
  color: #1e293b;
  font-size: 23px;
  text-overflow: ellipsis;
}

.counter-stat span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.counter-editor {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.counter-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.counter-editor-heading > div {
  display: flex;
  gap: 5px;
}

.counter-editor textarea {
  display: block;
  width: 100%;
  min-height: 400px;
  padding: 20px;
  border: 0;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  color: #1e293b;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
}

@media (max-width: 800px) {
  .counter-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 450px) {
  .counter-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.percentage-tool {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.percentage-card {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.percentage-card h2 {
  margin: 0 0 18px;
  color: #1e293b;
  font-size: 18px;
}

.percentage-row,
.percentage-adjustment {
  display: flex;
  align-items: center;
  gap: 12px;
}

.percentage-row input,
.percentage-adjustment input {
  width: 130px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  font-size: 16px;
}

.percentage-row input:focus,
.percentage-adjustment input:focus {
  border-color: #64748b;
}

.percentage-row span,
.percentage-adjustment span {
  color: #64748b;
  white-space: nowrap;
}

.percentage-row strong,
.percentage-adjustment strong {
  color: #1e293b;
  font-size: 18px;
}

.percentage-adjustment select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  font-size: 17px;
}

@media (max-width: 650px) {
  .percentage-row,
  .percentage-adjustment {
    align-items: stretch;
    flex-direction: column;
  }

  .percentage-row input,
  .percentage-adjustment input,
  .percentage-adjustment select {
    width: 100%;
    box-sizing: border-box;
  }
}

.home {
  min-height: 100vh;
  color: #1e293b;
}

.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 90px 20px 70px;
  text-align: center;
}

.brand {
  display: inline-block;
  margin-bottom: 25px;
  color: #475569;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -3px;
}

.hero-subtitle {
  max-width: 620px;
  margin: 22px auto 30px;
  color: #64748b;
  font-size: 18px;
  line-height: 1.6;
}

.home-search {
  display: flex;
  align-items: center;
  max-width: 570px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  background: white;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
}

.search-icon {
  padding-left: 17px;
  color: #94a3b8;
  font-size: 22px;
}

.home-search input {
  width: 100%;
  padding: 16px 17px;
  border: 0;
  outline: none;
  background: transparent;
  color: #1e293b;
  font-size: 16px;
}

.hero-note {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 13px;
}

.tool-directory {
  width: min(1050px, calc(100% - 40px));
  margin: 0 auto;
}

.tool-category {
  margin-bottom: 55px;
}

.category-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 17px;
}

.category-icon {
  display: flex;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  color: #475569;
  font-weight: 700;
}

.category-heading h2 {
  margin: 0 0 2px;
  color: #0f172a;
  font-size: 20px;
}

.category-heading p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

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

.home-tool-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 17px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: white;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.home-tool-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 7px 22px rgba(15, 23, 42, 0.06);
}

.home-tool-icon {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 16px;
  font-weight: 800;
}

.home-tool-card h3 {
  margin: 0 0 4px;
  color: #1e293b;
  font-size: 15px;
}

.home-tool-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.tool-arrow {
  color: #cbd5e1;
  font-size: 18px;
  transition: transform 0.15s ease;
}

.home-tool-card:hover .tool-arrow {
  transform: translateX(3px);
  color: #64748b;
}

.no-tools {
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.no-tools strong {
  color: #334155;
  font-size: 18px;
}

.no-tools p {
  margin-top: 6px;
}

.home-about {
  max-width: 650px;
  margin: 90px auto;
  padding: 0 20px;
  text-align: center;
}

.home-about h2 {
  margin-bottom: 13px;
  color: #0f172a;
  font-size: 28px;
}

.home-about p {
  color: #64748b;
  line-height: 1.7;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  width: min(1050px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 13px;
}

.home-footer strong {
  color: #475569;
}

[hidden] {
  display: none !important;
}

@media (max-width: 850px) {
  .home-tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 570px) {
  .hero {
    padding-top: 60px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

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

  .home-footer {
    gap: 8px;
    flex-direction: column;
  }
}

/* ========================================
   HandyKitz clean homepage
   ======================================== */

.home-clean {
  width: min(1050px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 80px;
}

.clean-hero {
  padding: 70px 0 68px;
  text-align: center;
}

.clean-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
}

.clean-hero p {
  margin: 18px 0 0;
  color: #64748b;
  font-size: 16px;
}

.clean-search {
  width: min(560px, 100%);
  margin: 32px auto 0;
}

.clean-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 17px;

  border: 1px solid #dbe3ec;
  border-radius: 11px;

  outline: none;

  background: white;
  color: #1e293b;

  font-family: inherit;
  font-size: 15px;

  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.clean-search input::placeholder {
  color: #94a3b8;
}

.clean-search input:focus {
  border-color: #94a3b8;
  box-shadow:
    0 5px 18px rgba(15, 23, 42, 0.05),
    0 0 0 3px rgba(148, 163, 184, 0.12);
}


/* Tools */

.clean-tools {
  margin-top: 0;
}

.clean-tools > h2 {
  margin: 0 0 18px;
  color: #1e293b;
  font-size: 20px;
  font-weight: 700;
}

.clean-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}


/* Tool card */

.clean-tool-card {
  display: flex;
  min-width: 0;
  min-height: 76px;

  align-items: center;
  gap: 15px;

  box-sizing: border-box;
  padding: 16px 18px;

  border: 1px solid #dfe6ee;
  border-radius: 11px;

  background: white;
  color: inherit;
  text-decoration: none;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.clean-tool-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;

  box-shadow:
    0 7px 20px rgba(15, 23, 42, 0.06);
}

.clean-tool-icon {
  display: flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  align-items: center;
  justify-content: center;

  background: transparent;
  color: #1e293b;

  font-size: 22px;
  font-weight: 700;
}

.clean-code-icon {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
}

.clean-code-icon {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
}

.clean-text-icon,
.clean-percent-icon {
  font-size: 15px;
  font-weight: 700;
}

.clean-tool-card > div:last-child {
  min-width: 0;
}

.clean-tool-card h3 {
  margin: 0 0 5px;

  overflow: hidden;

  color: #1e293b;

  font-size: 14px;
  font-weight: 700;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.clean-tool-card p {
  margin: 0;

  color: #94a3b8;

  font-size: 12px;
  line-height: 1.4;
}


/* Empty search */

.home-clean .no-tools {
  padding: 50px 0;
  text-align: center;
}

.home-clean .no-tools strong {
  color: #334155;
  font-size: 16px;
}

.home-clean .no-tools p {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 13px;
}


/* Tablet */

@media (max-width: 800px) {
  .clean-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Mobile */

@media (max-width: 540px) {
  .home-clean {
    width: min(100% - 28px, 1050px);
  }

  .clean-hero {
    padding: 50px 0 55px;
  }

  .clean-hero h1 {
    font-size: 42px;
  }

  .clean-hero p {
    font-size: 15px;
  }

  .clean-search {
    margin-top: 27px;
  }

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

  .clean-tool-card {
    min-height: 74px;
  }
}

/* ========================================
   Global site header
   ======================================== */

.site-header {
  width: 100%;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.95);
}

.site-header-inner {
  display: flex;
  width: min(1050px, calc(100% - 40px));
  height: 68px;
  margin: 0 auto;

  align-items: center;
  justify-content: space-between;
}

.site-logo {
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.site-logo:hover {
  color: #334155;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: #0f172a;
}


/* ========================================
   Global site footer
   ======================================== */

.site-footer {
  width: min(1050px, calc(100% - 40px));
  margin: 100px auto 0;
  padding: 34px 0 25px;

  border-top: 1px solid #e2e8f0;
}

.site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.site-footer-logo {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.site-footer-inner p {
  margin: 7px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.site-footer-links {
  display: flex;
  gap: 22px;
}

.site-footer-links a {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer-links a:hover {
  color: #0f172a;
}

.site-footer-bottom {
  display: flex;
  margin-top: 30px;
  padding-top: 20px;

  align-items: center;
  justify-content: space-between;

  border-top: 1px solid #edf2f7;

  color: #94a3b8;
  font-size: 12px;
}


/* Mobile */

@media (max-width: 600px) {
  .site-header-inner {
    width: calc(100% - 28px);
    height: 62px;
  }

  .site-footer {
    width: calc(100% - 28px);
    margin-top: 70px;
  }

  .site-footer-inner {
    flex-direction: column;
  }

  .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

.back-to-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 15px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  background: white;
  color: #334155 !important;

  font-size: 13px;
  font-weight: 700;
  text-decoration: none;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.back-to-tools:hover {
  transform: translateX(-2px);
  border-color: #b8c5d4;
  background: #f8fafc;
  color: #0f172a !important;
}

.tool-category {
  margin-bottom: 46px;
}

.tool-category:last-of-type {
  margin-bottom: 0;
}

.tool-category > h2 {
  margin-bottom: 18px;
}

/* Image Cropper */

.cropper-workspace {
  margin-top: 24px;
}

.cropper-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 16px;
}

.cropper-toolbar strong {
  display: block;
  margin-bottom: 9px;

  color: #334155;
  font-size: 13px;
}

.cropper-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cropper-preset {
  padding: 8px 12px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
  color: #475569;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.cropper-preset:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
}

.cropper-preset.active {
  border-color: #0f172a;
  background: #0f172a;
  color: white;
}

.cropper-stage {
  position: relative;

  display: inline-block;
  max-width: 100%;

  overflow: hidden;

  border-radius: 10px;
  background: #0f172a;

  line-height: 0;

  user-select: none;
  touch-action: none;
}

.cropper-stage > img {
  display: block;

  width: auto;
  max-width: 100%;
  max-height: 650px;

  object-fit: contain;

  user-select: none;
  pointer-events: none;
}

.cropper-selection {
  position: absolute;

  box-sizing: border-box;

  border: 2px solid white;

  cursor: move;

  touch-action: none;

  box-shadow:
    0 0 0 9999px rgba(15, 23, 42, 0.62),
    0 0 0 1px rgba(15, 23, 42, 0.35);
}

.cropper-grid {
  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      to right,
      transparent 33.333%,
      rgba(255, 255, 255, 0.55) 33.333%,
      rgba(255, 255, 255, 0.55) calc(33.333% + 1px),
      transparent calc(33.333% + 1px),
      transparent 66.666%,
      rgba(255, 255, 255, 0.55) 66.666%,
      rgba(255, 255, 255, 0.55) calc(66.666% + 1px),
      transparent calc(66.666% + 1px)
    ),
    linear-gradient(
      to bottom,
      transparent 33.333%,
      rgba(255, 255, 255, 0.55) 33.333%,
      rgba(255, 255, 255, 0.55) calc(33.333% + 1px),
      transparent calc(33.333% + 1px),
      transparent 66.666%,
      rgba(255, 255, 255, 0.55) 66.666%,
      rgba(255, 255, 255, 0.55) calc(66.666% + 1px),
      transparent calc(66.666% + 1px)
    );
}

.cropper-handle {
  position: absolute;

  width: 16px;
  height: 16px;

  border: 2px solid #0f172a;
  border-radius: 50%;

  background: white;

  touch-action: none;
}

.cropper-handle-nw {
  top: -9px;
  left: -9px;
  cursor: nwse-resize;
}

.cropper-handle-ne {
  top: -9px;
  right: -9px;
  cursor: nesw-resize;
}

.cropper-handle-sw {
  bottom: -9px;
  left: -9px;
  cursor: nesw-resize;
}

.cropper-handle-se {
  right: -9px;
  bottom: -9px;
  cursor: nwse-resize;
}

.cropper-size-readout {
  margin-top: 10px;

  color: #64748b;
  font-size: 13px;
}

.cropper-size-readout strong {
  color: #334155;
}

.cropper-output-options {
  margin-top: 24px;
}

.cropper-dragging {
  cursor: grabbing;
  user-select: none;
}

@media (max-width: 600px) {
  .cropper-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .cropper-stage > img {
    max-height: 500px;
  }

  .cropper-handle {
    width: 20px;
    height: 20px;
  }

  .cropper-handle-nw {
    top: -11px;
    left: -11px;
  }

  .cropper-handle-ne {
    top: -11px;
    right: -11px;
  }

  .cropper-handle-sw {
    bottom: -11px;
    left: -11px;
  }

  .cropper-handle-se {
    right: -11px;
    bottom: -11px;
  }
}

/* Case Converter */

.text-converter {
  width: min(850px, 100%);
  margin: 0 auto;
}

.case-editor label {
  display: block;
  margin-bottom: 9px;

  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.case-textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 300px;
  padding: 18px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 10px;

  outline: none;

  background: white;
  color: #0f172a;

  font: inherit;
  font-size: 15px;
  line-height: 1.65;
}

.case-textarea:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.case-stats {
  display: flex;
  gap: 20px;

  margin-top: 9px;

  color: #94a3b8;
  font-size: 12px;
}

.case-stats strong {
  color: #64748b;
}

.case-actions {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 9px;

  margin-top: 22px;
}

.case-button {
  min-height: 44px;
  padding: 10px 12px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
  color: #334155;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.case-button:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
  color: #0f172a;
}

.case-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 22px;
}

@media (max-width: 700px) {
  .case-actions {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .case-textarea {
    min-height: 250px;
  }
}

/* Aspect Ratio Calculator */

.aspect-calculator {
  display: grid;
  width: min(850px, 100%);
  margin: 0 auto;
  gap: 18px;
}

.aspect-card {
  padding: 25px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.aspect-card h2 {
  margin: 0;

  color: #0f172a;
  font-size: 18px;
}

.aspect-description {
  margin: 7px 0 20px;

  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.aspect-dimensions,
.aspect-resize-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;

  align-items: end;
  gap: 14px;
}

.aspect-field label {
  display: block;
  margin-bottom: 7px;

  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.aspect-field input {
  box-sizing: border-box;

  width: 100%;
  height: 45px;
  padding: 0 13px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #0f172a;

  font: inherit;
}

.aspect-field input:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.aspect-dimension-symbol {
  padding-bottom: 11px;

  color: #94a3b8;
  font-size: 20px;
  font-weight: 700;
}

.aspect-result {
  display: flex;
  margin-top: 20px;
  padding: 17px 20px;

  align-items: center;
  gap: 14px;

  border-radius: 9px;

  background: #f8fafc;
}

.aspect-result span {
  color: #64748b;
  font-size: 13px;
}

.aspect-result strong {
  color: #0f172a;
  font-size: 24px;
}

.aspect-result small {
  margin-left: auto;

  color: #94a3b8;
  font-size: 12px;
}

.aspect-presets {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;

  margin-top: 18px;
}

.aspect-presets button {
  display: flex;
  padding: 14px;

  align-items: flex-start;
  flex-direction: column;
  gap: 4px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  background: white;

  cursor: pointer;
}

.aspect-presets button:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
}

.aspect-presets strong {
  color: #0f172a;
  font-size: 15px;
}

.aspect-presets span {
  color: #94a3b8;
  font-size: 11px;
}

.aspect-scale-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 18px;
}

.aspect-scale-buttons button {
  padding: 9px 14px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
  color: #334155;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.aspect-scale-buttons button:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
}

.aspect-scale-result {
  margin-top: 15px;
  padding: 13px 15px;

  border-radius: 8px;

  background: #f8fafc;
  color: #475569;

  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .aspect-card {
    padding: 19px;
  }

  .aspect-presets {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .aspect-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .aspect-result small {
    margin-left: 0;
  }
}

/* Password Generator */

.password-generator {
  width: min(720px, 100%);
  margin: 0 auto;
}

.password-card {
  padding: 26px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.password-output {
  display: flex;
  gap: 9px;
}

.password-output input {
  box-sizing: border-box;

  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 15px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: monospace;
  font-size: 16px;
}

.password-copy {
  min-width: 80px;
  padding: 0 16px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  background: white;
  color: #334155;

  cursor: pointer;

  font-weight: 700;
}

.password-copy:hover {
  background: #f8fafc;
}

.password-strength {
  margin-top: 17px;
}

.password-strength-header {
  display: flex;
  justify-content: space-between;

  color: #64748b;
  font-size: 12px;
}

.password-strength-header strong {
  color: #334155;
}

.password-strength-track {
  height: 6px;
  margin-top: 8px;

  overflow: hidden;

  border-radius: 999px;

  background: #e2e8f0;
}

.password-strength-bar {
  width: 0;
  height: 100%;

  border-radius: inherit;

  background: currentColor;

  color: #64748b;

  transition: width 0.2s ease;
}

.password-strength-bar[data-strength="weak"] {
  color: #ef4444;
}

.password-strength-bar[data-strength="fair"] {
  color: #f59e0b;
}

.password-strength-bar[data-strength="strong"] {
  color: #3b82f6;
}

.password-strength-bar[data-strength="very-strong"] {
  color: #22c55e;
}

.password-setting {
  margin-top: 28px;
}

.password-setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 9px;
}

.password-setting-heading label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.password-setting-heading strong {
  color: #0f172a;
  font-size: 14px;
}

.password-setting input[type="range"] {
  width: 100%;
}

.password-range-labels {
  display: flex;
  justify-content: space-between;

  margin-top: 3px;

  color: #94a3b8;
  font-size: 11px;
}

.password-options {
  display: grid;
  margin-top: 24px;
  gap: 0;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  overflow: hidden;
}

.password-option {
  display: flex;
  min-height: 60px;
  padding: 11px 15px;

  box-sizing: border-box;

  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border-bottom: 1px solid #edf2f7;

  cursor: pointer;
}

.password-option:last-child {
  border-bottom: 0;
}

.password-option:hover {
  background: #f8fafc;
}

.password-option div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.password-option strong {
  color: #334155;
  font-size: 13px;
}

.password-option span {
  color: #94a3b8;
  font-size: 11px;
}

.password-option input {
  width: 17px;
  height: 17px;

  flex: 0 0 auto;

  cursor: pointer;
}

.password-generate-button {
  width: 100%;
  margin-top: 22px;
}

.password-error {
  margin: 12px 0 0;

  color: #b91c1c;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .password-card {
    padding: 18px;
  }

  .password-output {
    flex-direction: column;
  }

  .password-copy {
    min-height: 42px;
  }
}

/* QR Code Generator */

.qr-generator {
  width: min(950px, 100%);
  margin: 0 auto;
}

.qr-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(300px, 0.85fr);

  gap: 20px;
}

.qr-settings,
.qr-preview-panel {
  padding: 24px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.qr-field {
  margin-bottom: 20px;
}

.qr-field > label {
  display: block;
  margin-bottom: 8px;

  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.qr-field textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 150px;
  padding: 14px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  color: #0f172a;
  background: white;

  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.qr-field textarea:focus,
.qr-field select:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.qr-input-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;

  margin-top: 7px;

  color: #94a3b8;
  font-size: 11px;
}

.qr-options-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}

.qr-options-grid .qr-field {
  margin-bottom: 18px;
}

.qr-field select {
  box-sizing: border-box;

  width: 100%;
  height: 43px;
  padding: 0 11px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #334155;

  font: inherit;
  font-size: 13px;
}

.qr-color-control {
  display: flex;
  height: 43px;
  padding: 5px 10px;

  box-sizing: border-box;

  align-items: center;
  gap: 10px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
}

.qr-color-control input {
  width: 32px;
  height: 28px;
  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;
}

.qr-color-control span {
  color: #64748b;

  font-family: monospace;
  font-size: 12px;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 4px;
}

.qr-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin-bottom: 17px;
}

.qr-preview-heading strong {
  color: #334155;
  font-size: 14px;
}

.qr-preview-heading span {
  color: #94a3b8;

  font-size: 11px;
  text-align: right;
}

.qr-preview {
  display: flex;

  aspect-ratio: 1 / 1;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  background: #f8fafc;
}

.qr-preview canvas {
  display: block;

  width: 100%;
  height: auto;

  max-width: 100%;
  max-height: 100%;
}

.qr-placeholder {
  display: flex;

  padding: 25px;

  align-items: center;
  flex-direction: column;
  gap: 12px;

  color: #94a3b8;

  font-size: 12px;
  text-align: center;
}

.qr-placeholder-icon {
  color: #64748b;
  font-size: 46px;
  line-height: 1;
}

.qr-download-actions {
  display: grid;
  grid-template-columns:
    1fr 1fr;

  gap: 9px;

  margin-top: 15px;
}

.qr-download-actions button {
  width: 100%;
}

.qr-error {
  margin: 13px 0 0;

  color: #b91c1c;

  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 750px) {
  .qr-layout {
    grid-template-columns: 1fr;
  }

  .qr-preview-panel {
    max-width: 500px;
  }
}

@media (max-width: 500px) {
  .qr-settings,
  .qr-preview-panel {
    padding: 18px;
  }

  .qr-options-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .qr-input-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .qr-download-actions {
    grid-template-columns: 1fr;
  }
}

/* Base64 Encoder & Decoder */

.base64-tool {
  width: min(1050px, 100%);
  margin: 0 auto;
}

.base64-mode-switch {
  display: flex;

  width: fit-content;
  margin: 0 auto 20px;
  padding: 4px;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  background: white;
}

.base64-mode-button {
  min-width: 110px;
  padding: 9px 18px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.base64-mode-button:hover {
  color: #0f172a;
}

.base64-mode-button.active {
  background: #0f172a;
  color: white;
}

.base64-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  align-items: center;
  gap: 14px;
}

.base64-panel {
  padding: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.base64-panel-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 9px;
}

.base64-panel-heading label {
  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.base64-panel-heading span {
  color: #94a3b8;

  font-size: 11px;
  text-align: right;
}

.base64-textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 300px;
  padding: 14px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
}

.base64-textarea:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px
    rgba(148, 163, 184, 0.12);
}

.base64-textarea[readonly] {
  color: #475569;
}

.base64-middle {
  display: flex;
  justify-content: center;
}

.base64-middle .convert-button {
  white-space: nowrap;
}

.base64-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 12px;
}

.base64-error {
  margin: 14px 0 0;

  color: #b91c1c;

  font-size: 12px;
  text-align: center;
}

@media (max-width: 800px) {
  .base64-grid {
    grid-template-columns: 1fr;
  }

  .base64-middle .convert-button {
    width: 100%;
  }

  .base64-textarea {
    min-height: 220px;
  }
}

@media (max-width: 500px) {
  .base64-panel {
    padding: 16px;
  }

  .base64-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .base64-mode-switch {
    width: 100%;
    box-sizing: border-box;
  }

  .base64-mode-button {
    flex: 1;
    min-width: 0;
  }
}

/* Unix Timestamp Converter */

.timestamp-tool {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.timestamp-current {
  display: flex;
  padding: 17px 20px;
  margin-bottom: 18px;

  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 11px;

  background: white;
}

.timestamp-current div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timestamp-current span {
  color: #64748b;
  font-size: 13px;
}

.timestamp-current strong {
  color: #0f172a;
  font-family: monospace;
  font-size: 18px;
}

.timestamp-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}

.timestamp-card {
  padding: 24px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.timestamp-card h2 {
  margin: 0;

  color: #0f172a;
  font-size: 18px;
}

.timestamp-description {
  margin: 7px 0 20px;

  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.timestamp-field label {
  display: block;
  margin-bottom: 7px;

  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.timestamp-field input {
  box-sizing: border-box;

  width: 100%;
  height: 45px;
  padding: 0 13px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #0f172a;

  font: inherit;
}

.timestamp-field input:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.timestamp-unit-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;

  margin-top: 14px;
}

.timestamp-unit-switch label {
  display: flex;
  align-items: center;
  gap: 6px;

  color: #475569;

  cursor: pointer;

  font-size: 12px;
  font-weight: 600;
}

.timestamp-results,
.timestamp-date-results {
  display: grid;
  gap: 9px;

  margin-top: 20px;
}

.timestamp-results[hidden],
.timestamp-date-results[hidden] {
  display: none;
}

.timestamp-result {
  display: grid;
  grid-template-columns:
    75px minmax(0, 1fr) auto;

  align-items: center;
  gap: 10px;

  padding: 11px 12px;

  border-radius: 8px;

  background: #f8fafc;
}

.timestamp-result span,
.timestamp-big-result span {
  color: #94a3b8;
  font-size: 11px;
}

.timestamp-result strong {
  overflow-wrap: anywhere;

  color: #334155;

  font-family: monospace;
  font-size: 11px;
}

.timestamp-result button {
  padding: 5px 8px;

  border: 0;
  border-radius: 5px;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 11px;
  font-weight: 700;
}

.timestamp-result button:hover {
  background: #e2e8f0;
}

.timestamp-big-result {
  display: grid;
  grid-template-columns:
    1fr auto;

  align-items: center;
  gap: 5px 12px;

  padding: 14px;

  border-radius: 9px;

  background: #f8fafc;
}

.timestamp-big-result span {
  grid-column: 1;
}

.timestamp-big-result strong {
  grid-column: 1;

  overflow-wrap: anywhere;

  color: #0f172a;

  font-family: monospace;
  font-size: 16px;
}

.timestamp-big-result button {
  grid-column: 2;
  grid-row: 1 / 3;
}

.timestamp-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 20px;
}

.timestamp-timezone {
  margin: 17px 0 0;

  color: #94a3b8;
  font-size: 11px;
}

.timestamp-timezone strong {
  color: #64748b;
}

.timestamp-error {
  margin: 13px 0 0;

  color: #b91c1c;
  font-size: 12px;
}

@media (max-width: 800px) {
  .timestamp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .timestamp-current {
    align-items: flex-start;
    flex-direction: column;
  }

  .timestamp-current div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .timestamp-card {
    padding: 18px;
  }

  .timestamp-result {
    grid-template-columns: 1fr auto;
  }

  .timestamp-result span {
    grid-column: 1;
  }

  .timestamp-result strong {
    grid-column: 1;
  }

  .timestamp-result button {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

/* URL Encoder & Decoder */

.url-codec-tool {
  width: min(1050px, 100%);
  margin: 0 auto;
}

.url-codec-mode-switch {
  display: flex;
  width: fit-content;

  margin: 0 auto 20px;
  padding: 4px;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  background: white;
}

.url-codec-mode-button {
  min-width: 110px;
  padding: 9px 18px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.url-codec-mode-button:hover {
  color: #0f172a;
}

.url-codec-mode-button.active {
  background: #0f172a;
  color: white;
}

.url-codec-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  align-items: center;
  gap: 14px;
}

.url-codec-panel {
  padding: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.url-codec-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 9px;
}

.url-codec-heading label {
  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.url-codec-heading span {
  color: #94a3b8;
  font-size: 11px;
}

.url-codec-textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 300px;
  padding: 14px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
}

.url-codec-textarea:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.url-codec-textarea[readonly] {
  color: #475569;
}

.url-codec-middle {
  display: flex;

  flex-direction: column;
  align-items: center;

  gap: 10px;
}

.url-codec-middle .convert-button {
  white-space: nowrap;
}

.url-codec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 12px;
}

.url-codec-error {
  margin: 14px 0 0;

  color: #b91c1c;

  font-size: 12px;
  text-align: center;
}

@media (max-width: 800px) {
  .url-codec-grid {
    grid-template-columns: 1fr;
  }

  .url-codec-middle {
    width: 100%;
  }

  .url-codec-middle .convert-button {
    width: 100%;
  }

  .url-codec-textarea {
    min-height: 220px;
  }
}

@media (max-width: 500px) {
  .url-codec-panel {
    padding: 16px;
  }

  .url-codec-mode-switch {
    box-sizing: border-box;
    width: 100%;
  }

  .url-codec-mode-button {
    flex: 1;
    min-width: 0;
  }
}

/* Image Rotate & Flip */

.rotate-tool {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.rotate-upload {
  padding: 50px 24px;

  border: 2px dashed #cbd5e1;
  border-radius: 14px;

  background: white;

  text-align: center;

  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.rotate-upload.dragging {
  border-color: #64748b;
  background: #f8fafc;
}

.rotate-upload > div {
  display: flex;

  flex-direction: column;
  align-items: center;

  gap: 9px;
}

.rotate-upload-icon {
  margin-bottom: 4px;
  font-size: 35px;
}

.rotate-upload strong {
  color: #0f172a;
  font-size: 16px;
}

.rotate-upload span {
  margin-bottom: 7px;

  color: #94a3b8;
  font-size: 12px;
}

.rotate-editor {
  display: grid;
  gap: 18px;
}

.rotate-editor[hidden] {
  display: none;
}

.rotate-preview-card,
.rotate-controls-card {
  padding: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.rotate-preview-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  margin-bottom: 15px;
}

.rotate-preview-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rotate-preview-heading strong {
  color: #0f172a;
  font-size: 13px;
}

.rotate-preview-heading span {
  color: #94a3b8;
  font-size: 11px;
}

.rotate-preview {
  display: flex;

  min-height: 380px;
  padding: 20px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 9px;

  background:
    repeating-conic-gradient(
      #f1f5f9 0% 25%,
      white 0% 50%
    )
    50% / 20px 20px;
}

.rotate-preview canvas {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 500px;

  object-fit: contain;

  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.08);
}

.rotate-controls-card h2 {
  margin: 0 0 16px;

  color: #0f172a;
  font-size: 16px;
}

.rotate-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.rotate-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 16px;

  padding-top: 20px;
  margin-top: 20px;

  border-top: 1px solid #e2e8f0;
}

.rotate-options .option {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rotate-options label {
  color: #475569;

  font-size: 12px;
  font-weight: 700;
}

.rotate-options select {
  height: 40px;
  padding: 0 10px;

  border: 1px solid #d7e0ea;
  border-radius: 7px;

  background: white;
  color: #334155;
}

.rotate-bottom-actions {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding-top: 20px;
  margin-top: 20px;

  border-top: 1px solid #e2e8f0;
}

.rotate-error {
  margin: 13px 0 0;

  color: #b91c1c;
  font-size: 12px;
}

@media (max-width: 650px) {
  .rotate-preview {
    min-height: 260px;
    padding: 12px;
  }

  .rotate-options {
    grid-template-columns: 1fr;
  }

  .rotate-bottom-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rotate-bottom-actions .convert-button {
    width: 100%;
  }
}