:root {
  --primary: #6c5ce7;
  --dark: #2d3436;
  --light: #f5f6fa;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--light);
  color: var(--dark);
  min-height: 100vh;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  text-decoration: none;
  color: var(--primary);
  font-weight: bold;
}

a:hover {
  color: #5246a9;
}

.container {
  width: 100%;
  max-width: 800px;
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-top: 40px;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 2.2rem;
  background: linear-gradient(45deg, #6c5ce7, #00cec9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.tab-content {
  width: 100%;
}

.tab-content.hidden {
  display: none;
}

.textarea-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 25px;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #dfe6e9;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

#output-squeeze,
#output-beautify {
  background: #f1f2f6;
}

@media (prefers-color-scheme: dark) {
  textarea {
    background: #2d3436;
    color: #f5f6fa;
    border-color: #636e72;
  }
  #output-squeeze,
  #output-beautify {
    background: #3c4248;
  }
}

.btn {
  background: linear-gradient(45deg, #6c5ce7, #00cec9);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.copy-btn {
  background: #00b894;
  margin-top: 15px;
}

footer {
  margin-top: 40px;
  text-align: center;
  color: #636e72;
  font-size: 14px;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  textarea {
    min-height: 150px;
  }
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #b2bec3 !important;
  box-shadow: none !important;
}

.btn:disabled:hover {
  transform: none !important;
}

[title] {
  position: relative;
}

[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 5px;
}

[title]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% - 5px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
  z-index: 10;
}