 /* Modern Editor CSS with optimized space usage */
 :root {
  /* Primary Colors */
  --primary-color: #7b68ee;         /* Soft vibrant purple */
  --primary-hover: #6a5acd;         /* Slightly darker purple */
  
  /* Secondary Colors */
  --secondary-color: #48d1cc;       /* Modern teal */
  --secondary-hover: #40c9c4;       /* Slightly darker teal */
  
  /* Backgrounds */
  --dark-bg: #121218;              /* Deep dark background */
  --card-bg: #1e1e2a;              /* Slightly lighter cards */
  --card-hover: #252534;           /* Hover state for cards */
  
  /* Text */
  --text-primary: #f8f8f8;          /* Crisp white */
  --text-secondary: #b8c2cc;        /* Soft gray for secondary text */
  
  /* Accents & Status */
  --success: #2ecc71;               /* Vibrant green */
  --warning: #f39c12;               /* Golden yellow */
  --danger: #e74c3c;                /* Alert red */
  --info: #3498db;                  /* Bright blue (new addition) */
  
  /* UI Elements */
  --border-radius: 10px;            /* Slightly more modern than 12px */
  --border-color: rgba(255, 255, 255, 0.1); /* Subtle borders */
  
  /* Shadows (More refined) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother curve */
  --transition-fast: all 0.15s ease; /* For interactive elements */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  line-height: 1.6;
  overflow: hidden;
}

.header {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(26, 26, 37, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}

.editor-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.gradient-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6c5ce7, #00cec9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.file-info {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--text-secondary);
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 4px 12px;
  border-radius: 16px;
}

#controls {
  width: 100%;
  background-color: rgba(26, 26, 37, 0.95);
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-groups {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.control-group {
  display: flex;
  gap: 8px;
}

button {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
}

.file-btn {
  background: linear-gradient(135deg, #6c5ce7, #5f27cd);
  color: white;
}

.run-btn {
  background: linear-gradient(135deg, #00b894, #20bf6b);
  color: white;
}

.tool-btn {
  background: linear-gradient(135deg, #fdcb6e, #fab1a0);
  color: #2d3436;
}

.clear-btn {
  background: linear-gradient(135deg, #ff7675, #d63031);
  color: white;
}

.container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 115px);
  position: relative;
}

#editor {
  flex: 1;
  min-height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.resize-handle {
  height: 8px;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  cursor: row-resize;
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resize-handle:hover {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  height: 12px;
  box-shadow: var(--shadow-md);
}

.resize-handle::before {
  content: '⋯⋯⋯';
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  letter-spacing: 4px;
}

.output-container {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 150px;
  height: 300px;
}

.output-header {
  padding: 8px 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.output-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.output-section {
  height: 100%;
  overflow-y: auto;
  background: #111;
  color: #0f0;
  font-family: monospace;
  padding: 10px;
  border-top: 1px solid #333;
}

#output {
  background: transparent;
  color: var(--text-primary);
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.toast {
  min-width: 250px;
  margin-bottom: 10px;
  padding: 15px;
  border-radius: 4px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  animation: slide-in 0.3s, fade-out 0.5s 2.5s forwards;
  overflow: hidden;
  position: relative;
}

.toast.success {
  background-color: var(--success);
}

.toast.warning {
  background-color: var(--warning);
}

.toast.error {
  background-color: var(--danger);
}

.toast.info {
  background-color: var(--info);
}

.toast .close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  margin-left: 10px;
}

.toast .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  animation: progress 3s linear;
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Resize cursor when dragging */
.resizing {
  cursor: row-resize !important;
}

.resizing * {
  cursor: row-resize !important;
  user-select: none;
  pointer-events: none;
}

/* Responsive design */
@media (max-width: 992px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
  }

  .control-groups {
    flex-direction: column;
    width: 100%;
  }

  .control-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .gradient-text {
    font-size: 1.2rem;
  }

  button {
    padding: 6px 10px;
    font-size: 11px;
  }
}