/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #e0e0e0;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

.header-content i {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #1877f2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

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

/* Main content */
.main-content {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.main-content .panel {
  max-width: 800px;
  width: 100%;
}

/* Panel */
.panel {
  background: #2d3748;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.3s ease;
  border: 1px solid #4a5568;
}

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

.panel-header {
  background: linear-gradient(135deg, #1877f2, #42a5f5);
  color: white;
  padding: 25px;
  text-align: center;
}

.panel-header h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

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

/* Form */
.conversion-form {
  padding: 30px;
}

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

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

.form-group label i {
  margin-right: 8px;
  color: #1877f2;
  width: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #4a5568;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #1a202c;
  color: #e0e0e0;
  font-family: inherit;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1877f2;
  background: #2d3748;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

.help-text {
  display: block;
  margin-top: 5px;
  color: #a0aec0;
  font-size: 0.9rem;
  font-style: italic;
}

/* Submit button */
.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #1877f2, #42a5f5);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.submit-btn.loading .loading-spinner {
  display: block;
}

.submit-btn.loading span {
  display: none;
}

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

/* Result section */
.result-section {
  margin-top: 30px;
  padding: 25px;
  background: #1a202c;
  border-radius: 8px;
  border-left: 4px solid #1877f2;
  border: 1px solid #4a5568;
}

.result-header h3 {
  color: #1877f2;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-content {
  font-family: "Courier New", monospace;
  background: #2d3748;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #4a5568;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  color: #e0e0e0;
}

.result-success {
  border-left-color: #28a745;
}

.result-error {
  border-left-color: #dc3545;
}

/* Footer */
.footer {
  text-align: center;
  color: white;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Success/Error states */
.success {
  color: #28a745;
}

.error {
  color: #dc3545;
}

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

  .header h1 {
    font-size: 2rem;
  }

  .panel-header {
    padding: 20px;
  }

  .conversion-form {
    padding: 20px;
  }

  .info-panel {
    padding: 20px;
  }
}

/* Animation for form submission */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-section.show {
  animation: fadeIn 0.5s ease;
}

/* Custom scrollbar */
.result-content::-webkit-scrollbar {
  width: 8px;
}

.result-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb {
  background: #1877f2;
  border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb:hover {
  background: #1565c0;
}
