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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: whitesmoke;
  min-height: 100vh;
  color: #333;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 1200px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.header {
  background: linear-gradient(45deg, rgba(70, 130, 255, 0.7), rgba(102, 126, 234, 0.8));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.main-content {
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.dna-section {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
  border-radius: 15px;
  padding: 25px;
  border: 2px solid #28a745;
  position: relative;
  overflow: hidden;
}

.dna-section::before {
  content: '🧬';
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.3;
}

.section-title {
  font-size: 1.3rem;
  color: #155724;
  margin-bottom: 15px;
  font-weight: 600;
}

.dna-display {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: bold;
  color: #155724;
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  letter-spacing: 3px;
  word-break: break-all;
  border: 2px solid #28a745;
  position: relative;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 10px rgba(40, 167, 69, 0.3); }
  to { box-shadow: 0 0 20px rgba(40, 167, 69, 0.6); }
}

.mutation-section {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-radius: 15px;
  padding: 25px;
  border: 2px solid #ffc107;
  position: relative;
  overflow: hidden;
}

.mutation-section::before {
  content: '⚡';
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.3;
}

.mutation-section .section-title {
  color: #856404;
}

.input-group {
  margin: 15px 0;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #856404;
}

.input-field {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid #ffc107;
  border-radius: 10px;
  background: white;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.input-field:focus {
  outline: none;
  border-color: #ff8c00;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
  transform: scale(1.02);
}

.btn {
  padding: 12px 25px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(45deg, rgba(70, 130, 255, 0.9), rgba(102, 126, 234, 0.95));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  margin-top: 15px;
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
}

.analyze-section {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 20px;
}

/* Container para os botões */
.buttons-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-analyze {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 18px 40px;
  font-size: 1.2rem;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-analyze:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6);
}

.btn-analyze:active {
  transform: translateY(0);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 1000px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.4s ease-out;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  /* Oculta a barra de scroll em todos os navegadores modernos */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE e Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  background: linear-gradient(45deg, rgba(70, 130, 255, 0.7), rgba(102, 126, 234, 0.8));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 25px;
  text-align: center;
  position: relative;
}

.modal-header h2 {
  font-size: 2rem;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modal-body {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.creature-container {
  text-align: center;
  position: relative;
}

.creature-image {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.creature-image:hover {
  transform: scale(1.05);
}

.creature-status {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  border: 2px solid #dee2e6;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.creature-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transition: left 0.5s;
}

.creature-status:hover::before {
  left: 100%;
}

.creature-status h3 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 1.3rem;
}

.creature-status p {
  margin: 0;
  color: #6c757d;
  line-height: 1.6;
}

.result-text {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
  border-left: 5px solid #667eea;
  position: relative;
}

.result-text::before {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.5;
}

.modal-resultado {
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.95rem;
  background: white;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  margin-top: 15px;
}

.alignment-display {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin: 15px 0;
  border-left: 4px solid #e9ecef;
}

.alignment-row {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  margin: 10px 0;
  padding: 10px;
  background: white;
  border-radius: 5px;
  letter-spacing: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

.stat-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin: 5px 0;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-bar {
  background: #e9ecef;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin: 15px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, #28a745, #20c997);
  transition: width 0.8s ease;
  border-radius: 10px;
}

.dna-sequence {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  line-height: 1.8;
  word-break: break-all;
}

.match { color: #28a745; font-weight: bold; }
.mismatch { color: #dc3545; font-weight: bold; }
.gap { color: #6c757d; }

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  .modal-content {
    width: 95%;
    margin: 5% auto;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .dna-display {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }
}

/* Loading Animation */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9rem;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.btn-manual {
  background: linear-gradient(135deg, #8B4513, #A0522D);
  color: white;
  padding: 18px 40px;
  font-size: 1.2rem;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-manual:hover {
  background: linear-gradient(135deg, #A0522D, #CD853F);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

/* Estilos para o modal do manual */
.manual-modal-content {
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.manual-intro {
  background: #f0f0f0;
  color: #495057;
  padding: 20px;
  border-radius: 10px;
  margin: 20px;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  padding: 0 10px;
}

.manual-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.manual-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.manual-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 3px solid #f0f0f0;
  transition: border-color 0.3s ease;
}

.manual-info h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.manual-recipe {
  background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
  border: 2px solid #28a745;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 14px;
}

.manual-recipe strong {
  color: #155724;
}

.gene {
  background: #28a745;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

.manual-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 14px;
}

.manual-example {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
}

.manual-example strong {
  color: #495057;
}

.manual-example code {
  background: #e9ecef;
  color: #6f42c1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

