body {
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #f8f9fa;
  box-sizing: border-box;
}
.container {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}
input, select, button {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
}
button:hover {
  background-color: #0056b3;
}
button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}
#result {
  margin-top: 25px;
  padding: 15px;
  border-radius: 6px;
  display: none;
}
.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}
.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}
.loading {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
  display: block;
}
.info-text {
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
}
.url-link {
  word-break: break-all;
  color: #007bff;
  text-decoration: none;
}
.url-link:hover {
  text-decoration: underline;
}
.progress-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 4px;
  margin-top: 15px;
  display: none;
}
.progress-bar {
  height: 20px;
  background-color: #007bff;
  width: 0%;
  border-radius: 4px;
  text-align: center;
  line-height: 20px;
  color: white;
  transition: width 0.4s ease;
}

/* Modal styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideIn 0.3s;
  position: relative;
  margin: 0;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.modal-title {
  color: #28a745;
  font-size: 22px;
  font-weight: bold;
  margin: 0;
}

.modal-info {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.modal-info-item {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.modal-info-item:last-child {
  margin-bottom: 0;
}

.modal-info-label {
  font-weight: bold;
  color: #495057;
  min-width: 120px;
  margin-right: 10px;
}

.modal-info-value {
  color: #212529;
  word-break: break-word;
  flex: 1;
}

.modal-url {
  background-color: #e7f3ff;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
}

.modal-url-text {
  font-size: 14px;
  word-break: break-all;
  color: #007bff;
  text-decoration: none;
  display: block;
  margin: 10px 0;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  min-width: 120px;
}

.modal-button-primary {
  background-color: #007bff;
  color: white;
}

.modal-button-primary:hover {
  background-color: #0056b3;
}

.modal-button-success {
  background-color: #28a745;
  color: white;
}

.modal-button-success:hover {
  background-color: #1e7e34;
}

.modal-button-secondary {
  background-color: #6c757d;
  color: white;
}

.modal-button-secondary:hover {
  background-color: #545b62;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.close-modal:hover {
  color: #000;
}

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

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

@media (max-width: 600px) {
  body {
    margin: 10px;
    padding: 0;
  }
  .container {
    padding: 20px;
  }
  .modal-content {
    width: 95%;
    padding: 20px;
    max-height: 90vh;
  }
  
  .modal-buttons {
    flex-direction: column;
  }
  
  .modal-info-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .modal-info-label {
    min-width: auto;
    margin-bottom: 5px;
  }
}
