/*
Title: json.css
Author: Tango Hunter
Date Created: 4/20/26
Date Modified: 4/20/26
Description: Style Sheet for the JSON Converter Web App
*/

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: #111;
  color: #eee;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: auto;
}

.top-nav {
  text-align: center;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-around;
}

.top-nav a {
  color: #4caf50;
  text-decoration: none;
  font-weight: bold;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
}

input, textarea {
  padding: 10px;
  border-radius: 6px;
  border: none;
}

#techContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tech-row {
  display: flex;
  gap: 10px;
  position: relative;
}

button {
  padding: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #4caf50;
  color: white;
}

button:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

#output {
  white-space: pre-wrap;
}

.danger { background: #e53935; }
.secondary { background: #555; }

.file-controls {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ✨ STATUS ANIMATION */
.status {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
}

.status.show {
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.success {
  animation: pulseSuccess 1.5s infinite alternate;
}

.error {
  animation: pulseError 1.5s infinite alternate;
}

@keyframes pulseSuccess {
  from { background-color: #2e7d32; }
  to   { background-color: #43a047; }
}

@keyframes pulseError {
  from { background-color: #c62828; }
  to   { background-color: #e53935; }
}

.status.fade-out {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Preview */
.preview-section {
  margin-top: 50px;
}

.scroll-btn {
  display: block;
  margin: 20px auto;
  text-align: center;
  background: #2196f3;
  color: white;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
}

.entry {
  background: #1a1a1a;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.entry.selected {
  border: 2px solid #4caf50;
}

.edit-badge {
  text-align: center;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 6px;
  background: #ff9800;
  color: #000;
  font-weight: bold;
}

.hidden { display: none; }

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  width: 800px;
  height: 500px;
  display: flex;
  flex-direction: column;
}

.modal-content pre {
  flex: 1;
  overflow: auto;
  background: #000;
  padding: 10px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
}

/* TECH STACK OVERFLOW CORRECTION */
@media (max-width: 550px) {
  .tech-row {
  flex-direction: column;
  z-index: 0;
  }
  #tech-del::before {
    content: "X Remove Tech";
    pointer-events: none;
    z-index: 1;
    position: absolute;
    bottom: 0;
    left: 2.5%;
    height: 25px;
    Width: 95%;
    color:#fff;
    background: #e53935;
  }
}
