* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  position: relative;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

header p {
  opacity: 0.9;
  font-size: 1rem;
}
.main-content {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.input-section,
.output-section {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #2c3e50;
}

.input-group {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.input-group  label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.0rem;
  margin-right: 8px;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 15px;
  border: 2px solid #e0e6ed;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.output-section textarea {
  height: 345px;
}

.rail-input {
  display: flex;
  align-items: center;
  gap: 15px;
}

input[type="number"] {
  width: 100px;
  padding: 12px 15px;
  border: 2px solid #e0e6ed;
  border-radius: 10px;
  font-size: 1.1rem;
  text-align: center;
}

.btn-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  margin-top: 25px;
}

button {
  flex: 1;
  padding: 14px 8px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.encrypt-btn {
  background: linear-gradient(to right, #3498db, #2c80b9);
  color: white;
}

.decrypt-btn {
  background: linear-gradient(to right, #2ecc71, #27ae60);
  color: white;
}

.enum-btn {
  background: linear-gradient(to right, #9b59b6, #8e44ad);
  color: white;
}

.action-btn {
  background: linear-gradient(to right, #e67e22, #d35400);
  color: white;
}

.clear-btn {
  background: linear-gradient(to right, #e74c3c, #c0392b);
  color: white;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: translateY(0);
}

.notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 16px 35px;
  border-radius: 50px;
  font-size: 1.1rem;
  z-index: 1000;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.notice.show {
  transform: translateX(-50%) translateY(0);
}

.explanation {
  padding: 20px;
  background: #fff;
  margin-bottom: 25px;
}

.explanation h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;

}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #2980b9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card p {
  margin-top: 15px;
  color: #555;
}

.example {
  background: #f1f8ff;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border-left: 4px solid #3498db;
}

.example p:first-child{
  margin-top: 0px;
}

footer {
  text-align: center;
  color: #7f8c8d;
  font-size: 1rem;
}
