*{
  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;
}

.main-content {
  display: flex;
  gap: 22px;
  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;
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

textarea {
  width: 100%;
  height: 180px;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  resize: none;
  font-size: 1rem;
  line-height: 1.75;
  transition: border-color 0.3s;
}

textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #2ecc71;
  color: white;
}

.btn-secondary:hover {
  background: #27ae60;
}

.btn-warning {
  background: #f39c12;
  color: white;
}

.btn-warning:hover {
  background: #d35400;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.output-area {
  background: white;
  border-radius: 10px;
  padding: 15px;
  height: 250px;
  border: 2px solid #e0e0e0;
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-grid {
  margin-bottom: 25px;
}

.grid-title {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.3rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.grid-item {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px;
  text-align: center;
  transition: all 0.2s;
}

.grid-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

.grid-item.header {
  background: #2c3e50;
  color: white;
  font-weight: bold;
}

.grid-item .letter {
  font-size: 1.4rem;
  font-weight: bold;
  color: #3498db;
  margin-bottom: 5px;
}

.grid-item .code {
  font-size: 1rem;
  color: #7f8c8d;
}

.notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.notice.show {
  opacity: 1;
}

.examples {
  margin-bottom: 25px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
}

.examples h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.example-item {
  margin-top: 15px;
  padding: 15px;
  border: 1px solid #eee;
  border-left: 4px solid #3498db;
  background: white;
  border-radius: 0 8px 8px 0;
}

.example-item strong {
  color: #2c3e50;
}

.example-item code {
  background: #f1f2f3;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

footer {
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9rem;
}
