/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variáveis CSS */
:root {
  --primary-color: #1e40af;
  --primary-hover: #1e3a8a;
  --secondary-color: #10b981;
  --secondary-hover: #059669;
  --bg-color: #f0f5ff;
  --card-bg: #ffffff;
  --header-bg: #1e3a8a;
  --text-color: #334155;
  --border-color: #cbd5e1;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --border-radius: 8px;
}

/* Tipografia */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Corpo da página */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-bottom: 2rem;
}

/* Cabeçalho */
header {
  background: var(--header-bg);
  background: linear-gradient(135deg, var(--header-bg) 0%, #2563eb 100%);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

header h1 {
  color: #fff;
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Container principal */
.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.container p {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: #475569;
  font-size: 1.05rem;
}

/* Botões */
button {
  display: inline-block;
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius);
  color: #fff;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* Textareas */
.input-group, .output-group {
  margin-bottom: 1.5rem;
}

.input-group label, .output-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #334155;
}

textarea {
  width: 100%;
  height: 250px;
  margin-bottom: 1rem;
  font-family: 'Fira Code', 'Consolas', monospace;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  resize: vertical;
  outline: none;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border 0.2s, box-shadow 0.2s;
  background-color: #fbfcff;
}

textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Área de saída */
.output-container {
  position: relative;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.output-header strong {
  font-size: 1.05rem;
  color: #334155;
}

.output-header button {
  background-color: var(--secondary-color);
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  margin: 0;
}

.output-header button:hover {
  background-color: var(--secondary-hover);
}

/* Animação de flash para o output */
@keyframes flash {
  0% { background-color: rgba(37, 99, 235, 0.1); }
  100% { background-color: #fbfcff; }
}

.flash-animation {
  animation: flash 1s ease;
}

/* Status indicators */
.status-indicator {
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 1rem;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.status-indicator.visible {
  opacity: 1;
}

.status-indicator.success {
  background-color: #ecfdf5;
  color: #059669;
}

.status-indicator.error {
  background-color: #fef2f2;
  color: #dc2626;
}

.status-indicator::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.success::before {
  background-color: #10b981;
}

.status-indicator.error::before {
  background-color: #ef4444;
}

/* Responsividade */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
}