* {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.container {
  box-sizing: border-box;
  max-width: 1520px;
  min-width: 1240px;
  width: 100%;
  margin: 20px auto;
  margin: 0 auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  padding: 25px 0;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.description {
  font-size: 1rem;
  color: #555;
  max-width: 95%;
  margin: 0 auto;
  line-height: 1.6;
}

.converter-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.input-section,
.settings-section {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #3498db;
}

.input-group {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  align-items: center;
}

.input-group label {
  font-size: 1.1rem;
  font-weight: 500;
  min-width: 100px;
}

input,
select {
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  flex: 1;
}

input:focus,
select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.result-table {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

tr:hover {
  background-color: #f5f7ff;
}

.unit-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 8px;
}

.absolute {
  background-color: #e8f4fd;
  color: #2980b9;
}

.relative {
  background-color: #e6f7ee;
  color: #27ae60;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  height: 30px;
  padding: 0 20px;
  margin-right: 20px;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid #27ae60;
  color: #27ae60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.settings-btn{
  color: #2980b9;
  border-color: #2980b9;
}

.action-btn:hover {
  background: #27ae60;
  color: #fff;
  transform: scale(1.1);
}

.settings-btn:hover {
  background: #2980b9;
}

.instructions {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.instructions h2 {
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instructions-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.instructions-section {
  margin-bottom: 20px;
}

.instructions-section h3 {
  margin-bottom: 10px;
  color: #3498db;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instructions-section p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #555;
}

.unit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.unit-table th,
.unit-table td {
  padding: 10px 12px;
  border: 1px solid #eee;
}

.unit-table th {
  background-color: #f8f9fa;
}

.unit-table tr:nth-child(even) {
  background-color: #fafafa;
}

.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 15px 25px;
  background: #27ae60;
  color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.notification.show {
  transform: translateX(0);
}

.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 15px;
  padding: 30px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #777;
}

.setting-item {
  margin-bottom: 20px;
}

.setting-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #ecf0f1;
  color: #333;
}

.btn-secondary:hover {
  background: #bdc3c7;
}

footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 1rem;
}
