* {
  margin: 0;
  padding: 0;
}

body {
  background: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}

header p {
  font-size: 16px;
  opacity: 0.85;
}

.input-section,.result-section,.instructions{
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 20px;
  margin-bottom: 20px;
  color: #2c3e50;
  font-weight: 600;
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
}

.input-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.input-item {
  flex: 1;
}

.container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
}

.container input[type="text"],
.container input[type="number"],
.container select,
.container textarea{
  width: 100%;
  padding: 14px;
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
}

.container textarea{
  min-height: 120px;
  max-height: 600px;
  line-height: 1.5;
}

.container input[type="text"]:focus,
.container input[type="number"]:focus,
.container select:focus,
.container textarea:focus{
  outline: none;
  border-color: #4d90fe;
  box-shadow: 0 0 0 2px rgba(77, 144, 254, 0.2);
}

.radio-group {
  display: flex;
  gap: 20px;
  background: #f9fbfd;
  border-radius: 8px;
  padding: 12.75px 14px;
  border: 1px solid #d1d9e6;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-option label{
  margin-bottom: 0;
  padding-left: 6px;
  cursor: pointer;
}

.buttons {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.btn {
  padding: 14px 46px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #cb1175 0%, #b325fc 100%);
  color: white;
}

.btn-validate {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
}

.btn-copy {
  background: linear-gradient(135deg, #25b1fc 0%, #11cb69 100%);
  color: white;
}


.btn-secondary {
  background: #e0e4e8;
  color: #2c3e50;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.result-area {
  margin-top: 30px;
}

.result-box {
  background: #f9fbfd;
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  padding: 15px;
  min-height: 120px;
  font-size: 15px;
  word-break: break-all;
  line-height: 1.5;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f0f4f8;
  border: none;
  border-radius: 6px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s;
}

.copy-btn:hover {
  background: #e1e8f0;
}

.instructions h3 {
  font-size: 17px;
  margin: 15px 0 10px;
  color: #2c3e50;
}

.instructions p,
.instructions ul {
  margin-top: 15px;
  font-size: 15px;
  color: #4a5568;
}

.instructions ul {
  padding-left: 25px;
}

.instructions li {
  margin-bottom: 8px;
}

.notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 15px;
  z-index: 1000;
  display: none;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    bottom: 0;
  }

  10% {
    opacity: 1;
    bottom: 30px;
  }

  90% {
    opacity: 1;
    bottom: 30px;
  }

  100% {
    opacity: 0;
    bottom: 0;
  }
}

.algorithm-select {
  position: relative;
}

.algorithm-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.algorithm-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.algorithm-option:hover {
  background: #f0f4f8;
}

.algorithm-option.active {
  background: #e1ebff;
  font-weight: 600;
}

footer {
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}
