*{
  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: 1.1rem;
}

.input-output-section {
  display: flex;
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  gap: 25px;
  margin-bottom: 25px;
}

.section {
  flex: 1;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #3498db;
}

textarea {
  width: 100%;
  height: 240px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
  background-color: #fff;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.btn {
  padding: 14px 50px;
  font-size: 1.1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-encrypt {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.btn-decrypt {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.btn-copy {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
}

.btn-clear {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.explanation {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.explanation h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.explanation-content {
  line-height: 1.7;
}

.explanation-content p {
  margin-bottom: 15px;
}

.explanation ul{
  margin-left: 20px;
}

.explanation ul li{
  margin-top: 10px;
  opacity: 0.85;
}

.code-block {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Consolas', monospace;
  overflow-x: auto;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.example {
  background: #f1c40f20;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid #f1c40f;
}

.example p{
  margin-bottom: 0;
}

.notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  z-index: 1000;
  display: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.char-mapping {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.char-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.original-char {
  color: #3498db;
  font-size: 1.3rem;
}

.arrow {
  color: #7f8c8d;
  margin: 0 5px;
}

.mapped-char {
  color: #e74c3c;
  font-size: 1.3rem;
}
