* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

header {
  width: 100%;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 5px;
  text-align: center;
}

.subtitle {
  font-size: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
}

.tabs {
  display: flex;
  background: #eef2f7;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 15px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.tab.active {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(37, 117, 252, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1rem;
}

select,
.radio-group,
input[type="text"],
input[type="file"],
textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1.1rem;
  background: white;
  transition: all 0.3s ease;
}

.radio-group{
   padding: 3px 15px;
}


select:focus,
input:focus,
textarea:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  outline: none;
}

.radio-options {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-option input {
  margin-right: 8px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.generate-btn {
  display: block;
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #1181cb 0%, #25fc97 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px 0;
  box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
  cursor: pointer;
}

.generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 117, 252, 0.6);
}

.generate-btn:active {
  transform: translateY(0);
}

.sign-btn {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.verify-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #e67e22 100%);
}

.result-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 20px;
}

.result-box {
  flex: 1;
  min-width: 45%;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.result-header h3 {
  font-size: 1.4rem;
  color: #2c3e50;
}

.copy-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.copy-btn:hover {
  background: #2980b9;
}

textarea {
  height: 200px;
  font-family: monospace;
  font-size: 1rem;
  resize: vertical;
  background: #f9f9f9;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
}

.download-btn {
  padding: 15px 30px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.download-btn:hover {
  background: #219653;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.6);
}

.key-info {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #7f8c8d;
}

.info-section {
  background: #e3f2fd;
  padding: 20px;
  border-radius: 10px;
  margin: 15px 0;
}

.info-section h4 {
  margin-bottom: 10px;
  color: #0d47a1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-section ul {
  padding-left: 25px;
  padding-top: 10px;
}

.info-section li {
  margin-bottom: 8px;
}

.status {
  text-align: center;
  padding: 15px;
  margin: 20px 0;
  border-radius: 10px;
  font-weight: 500;
}

.status.generating {
  background: #fff8e1;
  color: #ff8f00;
}

.status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.status.error {
  background: #ffebee;
  color: #c62828;
}

footer {
  text-align: center;
  padding: 20px 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.key-length-info {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-top: 5px;
}

.algorithm-description {
  margin-top: 5px;
  font-size: 0.9rem;
  color: #7f8c8d;
}

.signature-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.signature-result {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  border: 2px dashed #e0e0e0;
  font-family: monospace;
  min-height: 100px;
  word-break: break-all;
}

.signature-verified {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
}

.signature-verified.valid {
  background: #e8f5e9;
  color: #2e7d32;
}

.signature-verified.invalid {
  background: #ffebee;
  color: #c62828;
}

.algorithm-params {
  display: flex;
  gap: 20px;
}

.algorithm-params>div {
  flex: 1;
}
