/* JSON Formatter Styles */

.formatter-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 75vh;
  min-height: 600px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  padding: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s cubic-bezier(0.2, 0.9, 0.25, 1);
  box-sizing: border-box;
}

.formatter-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.formatter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
  backdrop-filter: blur(10px);
  font-weight: 500;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.control-btn.primary-btn {
  background: #fff;
  color: #000;
  border: none;
}

.control-btn.primary-btn:hover {
  background: #fdfdfd;
  box-shadow: 0 6px 15px rgba(255, 255, 255, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.status-indicator {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.status-indicator.success {
  background: rgba(52, 199, 89, 0.2);
  color: #4CDB6E;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-indicator.error {
  background: rgba(255, 59, 48, 0.2);
  color: #FF5147;
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.editor-panes {
  display: flex;
  flex: 1;
  gap: 15px;
  height: calc(100% - 70px);
}

.pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.pane-header {
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

textarea#json-input {
  flex: 1;
  width: 100%;
  resize: none;
  background: transparent;
  border: none;
  color: #fff;
  padding: 15px;
  font-family: 'SF Mono', 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

textarea#json-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.output-container {
  flex: 1;
  overflow: auto;
  padding: 15px;
}

pre#json-output {
  margin: 0;
  color: #f8f8f2;
  font-family: 'SF Mono', 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.pane-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
}

/* Syntax Highlighting Colors */
.json-key { color: #8be9fd; }
.json-string { color: #f1fa8c; }
.json-number { color: #ffb86c; }
.json-boolean { color: #ff79c6; }
.json-null { color: #bd93f9; }

@media(max-width: 900px) {
  .editor-panes {
    flex-direction: column;
  }
  .pane-divider {
    transform: rotate(90deg);
    width: 100%;
    height: 30px;
  }
}
