/* DesiLang Playground Styles */

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
}

.controls {
  display: flex;
  gap: 10px;
  padding: 20px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

#examplesSelect {
  padding: 12px 16px;
  min-width: 200px;
}

.editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  min-height: 500px;
}

.editor-section,
.output-section {
  display: flex;
  flex-direction: column;
}

h3 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.2em;
}

#codeEditor {
  flex: 1;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 400px;
}

#codeEditor:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.output-box {
  flex: 1;
  padding: 15px;
  background: #f9f9f9;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
  min-height: 400px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.placeholder {
  color: #999;
  font-style: italic;
}

.success {
  color: #2d5016;
  background: #e7f4e7;
  padding: 10px;
  border-radius: 4px;
  border-left: 4px solid #4caf50;
}

.error {
  color: #c62828;
  background: #ffebee;
  padding: 10px;
  border-radius: 4px;
  border-left: 4px solid #f44336;
}

.info {
  color: #1565c0;
  background: #e3f2fd;
  padding: 10px;
  border-radius: 4px;
  border-left: 4px solid #2196f3;
}

.help-section {
  padding: 20px;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
}

.keywords {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.keyword-group {
  background: white;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.keyword-group strong {
  color: #667eea;
  display: block;
  margin-bottom: 8px;
}

code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: #d63384;
}

footer {
  padding: 20px;
  text-align: center;
  background: #f5f5f5;
  border-top: 1px solid #ddd;
}

footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .editor-container {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
  }

  header h1 {
    font-size: 1.8em;
  }

  .keywords {
    grid-template-columns: 1fr;
  }
}
