body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom right, #e0f7fa, #ffffff);
  margin: 0;
  padding: 0;
  color: #333;
}
header {
  text-align: center;
  background: #0288d1;
  color: white;
  padding: 20px;
}
.banner {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  border-bottom: 2px solid #0097d1;
  background: #0288d1;
  margin-top: 10px;
}

nav button {
  appearance: none;
  background: #fff;
  color: #222;
  font-weight: 500;
  border: none;
  border-radius: 0;
  padding: 12px 28px 10px 28px;
  margin: 0;
  border-bottom: 3px solid transparent;
  font-size: 1.1rem;
  transition: color 0.2s, border-bottom 0.2s, background 0.2s;
  cursor: pointer;
}

nav button.active,
nav button:focus,
nav button:hover {
  color: #fff;
  background: #0288d1;
  font-weight: bold;
  border-bottom: 3px solid #009688;
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    border-bottom: none;
    gap: 0;
  }
  nav button {
    width: 100%;
    text-align: center;
    border-radius: 0;
    border-bottom: 1.5px solid #0097d1;
    margin: 0;
    padding: 16px 0 14px 0;
  }
  nav button:last-child {
    border-bottom: none;
  }
}
main {
  padding: 30px;
}
.tool-section {
  display: none;
  background: #ffffffc0;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.tool-section:first-child {
  display: block;
}
input, textarea {
  width: 93%;
  padding: 10px 10px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
}
button {
  background: linear-gradient(to right, #007acc, #00c6ff);
  color: white;
  font-weight: bold;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  margin: 10px 5px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  background: linear-gradient(to right, #005f99, #00aaff);
}

button:active {
  transform: scale(0.98);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
footer {
  text-align: center;
  padding: 20px;
  background: #f1f1f1;
}

#json-input,
#base64-result {
  display: block;
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-height: 2.6em;
  max-height: 240px;
  padding: 12px;
  margin-top: 10px;
  font-size: 1.08em;
  line-height: 1.5;
  word-break: break-all;
  overflow-y: auto;
}

#copy-base64-btn {
  margin-left: 12px;
  padding: 5px 15px;
  background: #43e97b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#copy-base64-btn {
  margin-left: 12px;
  padding: 5px 15px;
  background: #43e97b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#copy-base64-btn:hover {
  background: #009688;
}
