@import url("./fonts.css");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: IRANSansXFa;
}

body {
  font-family: IRANSansXFa;
  background: radial-gradient(circle at 10% 20%, #0f0c1f, #0a0718);
  padding: 2rem 1.5rem;
  color: #f0eaff;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}
#header{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(120deg, #c084fc, #a855f7);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

h1::before {
  content: "✨";
  font-size: 2rem;
  background: none;
  -webkit-background-clip: unset;
  color: #c084fc;
}

.sub {
  color: #c9b6ff;
  margin-bottom: 2rem;
  border-right: 4px solid #a855f7;
  padding-right: 1rem;
  font-weight: 500;
  font-size: 1rem;
  background: rgba(139, 92, 246, 0.12);
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px 0px 0px 20px;
  backdrop-filter: blur(4px);
}

.editor-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin: 2rem 0 1rem;
}

.input-area,
.output-area {
  flex: 1;
  min-width: 300px;
  background: #15122b;
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow:
    0 20px 35px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(168, 85, 247, 0.2);
  transition: all 0.25s ease;
}

.input-area:hover,
.output-area:hover {
  border-color: #a855f7;
  box-shadow: 0 24px 40px -14px rgba(168, 85, 247, 0.3);
  background: #181432;
}

.panel-title {
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #2e2a4a;
  color: #e2d6ff;
}

.panel-title span:first-child {
  background: #2a2448;
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 0.9rem;
}

textarea {
  width: 100%;
  height: 380px;
  background: #0d0b1c;
  color: #eae5ff;
  border: 1.5px solid #332d55;
  border-radius: 20px;
  padding: 1rem 1.2rem;
  font-family: "Fira Code", "Courier New", "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.55;
  resize: vertical;
  direction: ltr;
  text-align: left;
  transition: all 0.2s;
}

textarea:focus {
  outline: none;
  border-color: #c084fc;
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.3);
  background: #110e24;
}

#jsonOutput {
  background: #0f0c1f;
}

.btn-group {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

button {
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #262242;
  color: #d9caff;
}

button.primary {
  background: linear-gradient(105deg, #8b5cf6, #a855f7);
  color: white;
  box-shadow: 0 6px 14px rgba(139, 92, 246, 0.4);
}

button.primary:hover {
  background: linear-gradient(105deg, #7c3aed, #9b4dff);
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px rgba(139, 92, 246, 0.6);
}

button.danger {
  background: #3a1e2e;
  color: #ffa8c4;
}

button.danger:hover {
  background: #55263c;
  color: #ffb8d0;
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  background: #363060;
}

.error-box {
  background: #2e1c25;
  border-right: 6px solid #f97373;
  padding: 1rem 1.2rem;
  border-radius: 20px;
  margin-top: 1.2rem;
  color: #ffbcbc;
  font-family: monospace;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.success-box {
  background: #11221c;
  border-right: 6px solid #6ee7b7;
  padding: 1rem 1.2rem;
  border-radius: 20px;
  margin-top: 1.2rem;
  color: #b2f0cf;
  font-weight: 500;
}

.info-text {
  font-size: 0.8rem;
  background: #1f1b36;
  padding: 0.7rem 1.2rem;
  border-radius: 40px;
  display: inline-block;
  color: #cbb9ff;
  margin-top: 1rem;
}

footer {
  margin-top: 3.5rem;
  text-align: center;
  padding: 1.2rem 0.5rem;
  border-top: 1px solid #2d284c;
  font-size: 0.9rem;
  color: #b9a9ff;
  background: rgba(15, 12, 31, 0.7);
  border-radius: 60px;
  backdrop-filter: blur(4px);
}

footer a {
  color: #c084fc;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
  border-bottom: 1px dashed #6b21a5;
}

footer a:hover {
  color: #e9d5ff;
  border-bottom: 1px solid #c084fc;
}

.brand-footer {
  font-weight: 700;
  background: linear-gradient(130deg, #d8b4fe, #a855f7);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

@media (max-width: 700px) {
  body {
    padding: 1rem;
  }
  textarea {
    height: 260px;
  }
  .btn-group button {
    padding: 0.5rem 1.2rem;
  }
}
