:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --danger-color: #e74c3c;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;


body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1400px;
  min-width: 1100px;
  width: 100%;
  margin: 20px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}


h1 {
  font-size: 2.1rem;
  color: var(--dark-color);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.subtitle {
  font-size: 0.9rem;
  color: #555;
  max-width: 98%;
  margin: 0 auto;
  line-height: 1.6;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.input-section,
.output-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

textarea {
  width: 100%;
  height: 250px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: 'Consolas', monospace;
  font-size: 15px;
  resize: vertical;
  outline: none;
  transition: all 0.3s;
  background: #fafafa;
}

textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
  background: white;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 140px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-encrypt {
  background: var(--primary-color);
  color: white;
}

.btn-decrypt {
  background: var(--secondary-color);
  color: white;
}

.btn-demo {
  background: #9b59b6;
  color: white;
}

.btn-clear {
  background: var(--danger-color);
  color: white;
}

.btn-copy {
  background: #f39c12;
  color: white;
}

.info-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-top: 30px;
}

.info-section h2 {
  font-size: 1.3rem;
  color: var(--dark-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.info-content {
  line-height: 1.8;
}

.info-content p {
  margin-bottom: 15px;
}

.info-content ul {
  padding-left: 25px;
  margin-top: 10px;
}

.info-content li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 4px;
}

.char-counter {
  font-size: 0.9rem;
  color: #777;
  text-align: right;
  margin-top: 8px;
}

.status {
  padding: 15px;
  margin: 15px 0;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
  display: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.success {
  background: rgba(46, 204, 113, 0.15);
  color: #27ae60;
  border: 1px solid rgba(46, 204, 113, 0.3);
  display: block;
}

.error {
  background: rgba(231, 76, 60, 0.15);
  color: #c0392b;
  border: 1px solid rgba(231, 76, 60, 0.3);
  display: block;
}

footer {
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  color: #666;
  font-size: 0.9rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.info-card {
  background: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 15px;
  border-left: 4px solid var(--primary-color);
}

.info-card h3 {
  color: var(--dark-color);
  margin-bottom: 10px;
}

.card-purple {
  border-left-color: #9b59b6;
}

.card-green {
  border-left-color: var(--secondary-color);
}

.card-orange {
  border-left-color: #f39c12;
}
