* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  width: 100%;
  margin: 20px auto;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

header {
  margin-bottom: 20px;
  text-align: center;
}

h1 {
  font-size: 2.1rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
}

main {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

section {
  background: #f9fafb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #2c3e50;
  padding-bottom: 15px;
  border-bottom: 2px solid #eaeaea;
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 8px;
}

textarea {
  width: 100%;
  height: 150px;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

select {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  width: 100%;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #3498db;
}

.file-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.btn-group {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.btn {
  padding: 14px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: #3498db;
  color: white;
  flex: 1;
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #ecf0f1;
  color: #2c3e50;
  flex: 1;
}

.btn-secondary:hover {
  background: #d5dbdb;
}

.btn-small {
  padding: 10px 15px;
  font-size: 0.9rem;
}

.btn-file {
  background: #2ecc71;
  color: white;
}

.btn-file:hover {
  background: #27ae60;
}

.btn-clear {
  background: #e74c3c;
  color: white;
}

.btn-clear:hover {
  background: #c0392b;
}

.result-area {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  min-height: 550px;
  font-family: monospace;
  font-size: 1.1rem;
  white-space: pre-wrap;
  word-break: break-all;
  position: relative;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 15px;
}

.btn-copy, .btn-download {
  background: #9b59b6;
  color: white;
}

.btn-copy:hover, .btn-download:hover {
  background: #8e44ad;
}

.examples {
  margin-top: 20px;
}

.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.example-card {
  background: #edf2f7;
  border-radius: 8px;
  padding: 15px;
  font-family: monospace;
  font-size: 0.95rem;
  line-height: 1.5;
}

.example-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 5px;
}

.instructions {
  grid-column: 1 / -1;
  background: #fff9e6;
  border-left: 4px solid #f1c40f;
  padding: 20px;
  margin-top: 10px;
  border-radius: 8px;
}

.instructions h3 {
  margin-bottom: 15px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instructions ul {
  padding-left: 25px;
}

.instructions li {
  margin-bottom: 10px;
}

.ipv4-types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 15px;
}

.type-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  position: relative;
  padding-left: 45px;
}

.type-card::before {
  content: "➤";
  position: absolute;
  left: 15px;
  top: 10px;
  font-size: 1.5rem;
  color: #3498db;
}

.type-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: #2c3e50;
}

.type-example {
  font-family: monospace;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 8px;
  display: inline-block;
}

footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
}

.status {
  text-align: center;
  padding: 10px;
  font-weight: 500;
  border-radius: 6px;
  margin-top: 15px;
  display: none;
}

.success {
  background: #d5f5e3;
  color: #27ae60;
  display: block;
}

.error {
  background: #fadbd8;
  color: #c0392b;
  display: block;
}

.file-name {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-top: 5px;
  display: none;
}
