#nanotest-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.nanotest-header {
  text-align: center;
  margin-bottom: 30px;
}

.nanotest-header h2 {
  color: #2c3e50;
  font-size: 28px;
  margin: 0;
  font-weight: 600;
}

.nanotest-search-form {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.form-group label {
  font-weight: 600;
  color: #34495e;
  min-width: 140px;
}

.form-group input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #2ea85d;
  box-shadow: 0 0 0 3px rgba(46, 168, 93, 0.1);
}

.form-group button {
  background: #2ea85d;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.form-group button:hover {
  background: #1e7a41;
}

#loading-spinner {
  text-align: center;
  padding: 40px;
}

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

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

.results-container {
  margin-top: 30px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ecf0f1;
}

.results-header h3 {
  color: #2c3e50;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.print-button-container {
  display: flex;
  gap: 10px;
}

.print-button {
  background: #2ea85d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.print-button:hover {
  background: #1e7a41;
}

.marksheet {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 18px;
  padding: 20px;
  box-sizing: border-box;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", Georgia, serif;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
}
.institution-title {
  text-align: left;
  display: block;
  width: 100%;
  margin-bottom: 25px;
}
.marksheet .sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid #2ea85d;
  padding-bottom: 15px;
  margin-bottom: 20px;
  position: relative;
}

.institution-title {
  text-align: left;
  display: block;
  width: 100%;
  margin-bottom: 25px;
}

.institution-main {
  font-size: 28px;
  font-weight: 700;
  color: #2ea85d;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  line-height: 1.1;
  display: block;
  letter-spacing: 1px;
}

.institution-sub {
  font-size: 18px;
  font-weight: 500;
  color: #2ea85d;
  margin: 6px 0 0 0;
  padding: 0;
  line-height: 1.2;
  display: block;
  font-style: italic;
}

.marksheet .student-info {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-top: 12px;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 15px;
}

.compact-table th,
.compact-table td {
  padding: 5px 3px;
  border: 1px solid #ccc;
  text-align: center;
  vertical-align: middle;
}

.compact-table th {
  background: #f0f0f0;
  font-weight: bold;
  color: #2ea85d;
  font-size: 10px;
}

.compact-table td {
  font-size: 10px;
}

.print-actions {
  text-align: right;
  margin-bottom: 10px;
}

.sheet-header img {
  border: 2px solid #2ea85d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.error-message {
  background: #e74c3c;
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  text-align: center;
  font-weight: 600;
}

.no-results {
  background: #f39c12;
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 768px) {
  #nanotest-container {
    padding: 15px;
  }

  .form-group {
    flex-direction: column;
    align-items: stretch;
  }

  .form-group label {
    min-width: auto;
  }

  .results-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .field-name {
    width: 120px;
  }

  .marksheet {
    padding: 12px;
  }

  .institution-main {
    font-size: 22px !important;
  }

  .institution-sub {
    font-size: 12px !important;
  }

  .compact-table {
    font-size: 9px;
  }

  .compact-table th,
  .compact-table td {
    padding: 3px 2px;
    font-size: 8px;
  }
}

@media print {
  .institution-title {
    margin-bottom: 25px !important;
  }
}
