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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 1600px;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #4285f4 0%, #2daeb8 100%);
  color: white;
  padding: 30px 40px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1601px) {
  .header {
    border-radius: 20px 20px 0 0;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

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

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

.controls-panel {
  background: #f8fafc;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  height: fit-content;
}

.controls-panel h3 {
  color: #2d3748;
  margin-bottom: 25px;
  font-size: 1.5rem;
  border-bottom: 3px solid #6c5ce7;
  padding-bottom: 10px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h4 {
  color: #4a5568;
  margin-bottom: 15px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  width: 20px;
  height: 20px;
  background: #6c5ce7;
  border-radius: 50%;
  display: inline-block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #6c5ce7;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.form-group textarea {
  height: 120px;
  resize: vertical;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.simulate-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #4285f4 0%, #2daeb8 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 20px;
}

.simulate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(108, 92, 231, 0.4);
}

.simulate-btn:active {
  transform: translateY(-1px);
}

.results-panel {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.results-panel h3 {
  color: #2d3748;
  margin-bottom: 25px;
  font-size: 1.5rem;
  border-bottom: 3px solid #6c5ce7;
  padding-bottom: 10px;
}

.chart-container {
  position: relative;
  height: 450px;
  margin: 30px 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.result-card {
  background: linear-gradient(135deg, #4285f4 0%, #2daeb8 100%);
  color: white;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.result-card:hover {
  transform: translateY(-5px);
}

.result-card h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  opacity: 0.9;
  font-weight: 500;
}

.result-card .value {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-card .unit {
  font-size: 0.85rem;
  opacity: 0.8;
}

.sequence-analysis {
  background: #f0f9ff;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 2px solid #e0f2fe;
}

.sequence-analysis h4 {
  color: #0c4a6e;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.sequence-display {
  font-family: "Courier New", monospace;
  background: white;
  padding: 15px;
  border-radius: 8px;
  word-break: break-all;
  line-height: 1.8;
  margin-bottom: 15px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  max-height: 150px;
  overflow-y: auto;
}

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

.residue-count {
  background: white;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  border: 2px solid #e2e8f0;
  font-weight: 600;
}

.histidine {
  background: linear-gradient(45deg, #ffd93d, #ff6b35);
  color: white;
  padding: 3px 5px;
  border-radius: 4px;
  font-weight: bold;
}
.asparagine {
  background: linear-gradient(45deg, #ff6b35, #f7931e);
  color: white;
  padding: 3px 5px;
  border-radius: 4px;
  font-weight: bold;
}
.glutamine {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  color: white;
  padding: 3px 5px;
  border-radius: 4px;
  font-weight: bold;
}
.tyrosine {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 3px 5px;
  border-radius: 4px;
  font-weight: bold;
}
.phenylalanine {
  background: linear-gradient(45deg, #f093fb, #f5576c);
  color: white;
  padding: 3px 5px;
  border-radius: 4px;
  font-weight: bold;
}
.cysteine {
  background: linear-gradient(45deg, #ffecd2, #fcb69f);
  color: #333;
  padding: 3px 5px;
  border-radius: 4px;
  font-weight: bold;
}

.performance-section {
  background: #f0fdf4;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #dcfce7;
  margin-bottom: 20px;
}

.performance-section h4 {
  color: #14532d;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
}

.metric-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: #6c5ce7;
  transform: translateY(-2px);
}

.metric-card .label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.metric-card .value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #059669;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.loading-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #6c5ce7;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 20px;
}

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

.warning-box {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
}

.warning-box h5 {
  color: #92400e;
  margin-bottom: 8px;
  font-weight: 600;
}

.warning-box p {
  color: #d97706;
  font-size: 0.9rem;
  line-height: 1.4;
}

.info-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  color: #6c5ce7;
  cursor: help;
  font-weight: bold;
}

.tooltip-content {
  visibility: hidden;
  width: 250px;
  background: #1a202c;
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -125px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  line-height: 1.4;
}

.info-tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

.parameter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px) {
  .parameter-grid {
    grid-template-columns: 1fr;
  }
}
