body, html {
  height: 100%;
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #f7f7f7;
}

.header {
  padding: 10px;
  display: flex;
  align-items: center;
  background-color: #f7f7f7;
  justify-content: flex-start;
}

.header img {
  height: 100px;
  margin-right: 20px;
}
/* Media query for screen width less than 600px */
@media screen and (max-width: 600px) {
  .header img {
    height: 80px; /* Smaller height for logo */
  }
}

/* Media query for screen width less than 400px */
@media screen and (max-width: 400px) {
  .header img {
    height: 60px; /* Even smaller height for logo */
  }
}
.title-container {
  text-align: center;
  padding: 10px 0;
}

.title {
  font-size: 28px;
  font-weight: bold;
  color: #4a4a4a;
}

.main-container {
  text-align: center;
  margin: 20px;
  padding: 20px;
}

.input-field, .answer-box {
  width: 70%;
  margin: 10px auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  resize: none;
}

.input-field {
  height: 150px;
}

.answer-box {
  height: 300px;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center align items */
  margin-bottom: 20px;
}

.upload-btn {
  padding: 10px 15px;
  background-color: #004652; /* Same color as submit button */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
}

.upload-btn:hover {
  background-color: #00373a;
}

.submit-button {
  display: block;
  width: 15%;
  padding: 10px;
  margin: 20px auto;
  background-color: #004652;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-button.loading {
  position: relative;
  padding: 10px 40px;
  color: transparent;
}

.submit-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #004652;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-icon {
    animation: rotate 2s linear infinite;
}
.input-label {
  display: block;
  margin-top: 20px;
  margin-bottom: 5px;
  font-size: 18px;
}

.error-message {
  margin-top: 10px;
  color: red;
  font-size: 20px;
}

.input-field::placeholder, .answer-box::placeholder {
  color: #909090;
  font-size: 16px;
}

.input-field::-webkit-input-placeholder, .answer-box::-webkit-input-placeholder {
  color: #909090;
  font-size: 16px;
}

.input-field:-ms-input-placeholder, .answer-box:-ms-input-placeholder {
  color: #909090;
  font-size: 16px;
}

.input-field::-moz-placeholder, .answer-box::-moz-placeholder {
  color: #909090;
  font-size: 16px;
}

#myButton {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 10px 15px;
  background-color: #004752;
  color: white;
  border: none;
  border-radius: 5px;
  text-decoration: none;
}

#myButton:hover {
  background-color: #00373a; /* Darker shade for hover effect */
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.drop-area {
  height: 100px;
  border: 2px dashed #ccc;
  border-radius: 4px;
  text-align: center;
  padding: 20px;
  margin-bottom: 10px;
  cursor: pointer;
}

.drop-area:hover {
  background-color: #f8f8f8;
  border-style: solid;
}
.drop-area-text {
    margin: 10px 0;
    font-size: 16px;
    color: #666;
}
.dispay_in_middle{
    display: flex;
    flex-direction: column;
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
}

@media screen and (max-width: 1200px) {
  .input-field, .answer-box {
    width: 80%; /* Increases width for smaller screens */
  }

  .main-container {
    margin: 10px; /* Adjusts margin for smaller screens */
  }

  .submit-button {
    width: 35%; /* Adjusts submit button width for smaller screens */
    padding: 15px; /* Optional: Adjusts padding for better touch accessibility */
    font-size: 1em; /* Optional: Adjusts font size for better readability */
  }
}

@media screen and (max-width: 800px) {
  .input-field, .answer-box {
    width: 90%; /* Increases width for smaller screens */
  }

  .main-container {
    margin: 10px; /* Adjusts margin for smaller screens */
  }

  .submit-button {
    width: 50%; /* Adjusts submit button width for smaller screens */
    padding: 15px; /* Optional: Adjusts padding for better touch accessibility */
    font-size: 1em; /* Optional: Adjusts font size for better readability */
  }

}
@media screen and (max-width: 550px) {

  .submit-button {
    width: 60%; /* Adjusts submit button width for smaller screens */
    padding: 15px; /* Optional: Adjusts padding for better touch accessibility */
    font-size: 0.8em; /* Optional: Adjusts font size for better readability */
  }
  #myButton{
    font-size:0.8em;
  }

}
