/* Modern Styles for Google Sheets Processor */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f0f2f5;
  padding: 20px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
  font-weight: 700;
  font-size: 28px;
}

h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 22px;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 10px;
}

/* Form Styles */
.form-group {
  margin-bottom: 25px;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4a5568;
}

input[type="text"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: #f8fafc;
}

input[type="text"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Read-only styles */
.read-only-text {
  background-color: #f8fafc;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 14px;
  color: #4a5568;
}

.parameter-display {
  background-color: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.parameter-list {
  list-style-type: none;
  padding: 0;
}

.parameter-item {
  padding: 8px 12px;
  margin-bottom: 8px;
  background-color: #edf2f7;
  border-radius: 4px;
  display: inline-block;
  margin-right: 8px;
  color: #4a5568;
  font-size: 14px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  background-color: #3182ce;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-test {
  background-color: #48bb78;
  margin-right: 10px;
}

.btn-test:hover {
  background-color: #38a169;
}

.btn-process {
  background-color: #ed8936;
}

.btn-process:hover {
  background-color: #dd6b20;
}

.btn-google {
  background-color: #4285F4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-google:hover {
  background-color: #3367D6;
}

.btn-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 15px;
}

/* Checkbox and Multi-select Styles */
.checkbox-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  margin-top: 10px;
  background-color: #f8fafc;
}

.checkbox-item {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

/* Status and Results Styles */
.status {
  margin-top: 25px;
  padding: 15px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
}

.status.success {
  background-color: #c6f6d5;
  color: #276749;
}

.status.error {
  background-color: #fed7d7;
  color: #9b2c2c;
}

.status.loading {
  background-color: #e2e8f0;
  color: #4a5568;
}

/* Result Links Styles */
.result-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 25px;
  gap: 15px;
}

.download-link {
  display: block;
  text-align: center;
  padding: 12px 24px;
  color: white;
  background-color: #4299e1;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
}

.download-link:hover {
  background-color: #3182ce;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.excel-link {
  background-color: #48bb78;
  margin-top: 10px;
}

.excel-link:hover {
  background-color: #38a169;
}

/* Progress Bar Styles */
.progress-container {
  margin-top: 25px;
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.progress-container h3 {
  margin-bottom: 15px;
  color: #2c3e50;
  text-align: center;
  font-weight: 600;
}

.progress-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.progress-details p {
  flex: 1;
  min-width: 150px;
  margin: 5px;
  padding: 10px;
  background-color: #edf2f7;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  color: #4a5568;
}

.progress-bar-container {
  height: 20px;
  background-color: #edf2f7;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background-color: #4299e1;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-percentage {
  text-align: center;
  font-weight: 600;
  color: #2c3e50;
}

/* Generated Content Styles */
.generated-content {
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.generated-content p {
  color: #4a5568;
  font-weight: 600;
  margin-bottom: 10px;
}

/* History Styles */
.history-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.history-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.history-date {
  font-weight: 500;
  color: #4a5568;
}

.history-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.status-completed {
  background-color: #c6f6d5;
  color: #276749;
}

.status-error {
  background-color: #fed7d7;
  color: #9b2c2c;
}

.status-processing {
  background-color: #e2e8f0;
  color: #4a5568;
}

.history-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.history-details p {
  flex: 1;
  min-width: 150px;
  padding: 8px;
  background-color: #edf2f7;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  color: #4a5568;
}

.history-progress {
  margin-bottom: 15px;
}

.history-item .download-link {
  margin-top: 10px;
  width: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .btn-container {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .btn-test {
    margin-right: 0;
  }

  .history-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .history-details {
    flex-direction: column;
  }

  .history-details p {
    width: 100%;
  }
}
