:root {
  --header-bg: #1e3a8a;
  --footer-bg: #1e3a8a;
  --link-color: #ffffff;
  --hover-color: #93c5fd;
}
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
}
.header {
  background: var(--header-bg);
  color: white;
  padding: 1rem;
}
.nav {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--hover-color);
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}
.footer {
  background: var(--footer-bg);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-links a {
  color: white;
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--hover-color);
}
.salary-calculator-wrapper {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 500px) 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}
.salary-calculator-container {
  grid-column: 2;
}
.calc-title {
  text-align: center;
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}
.calculator-container {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.input-section {
  display: grid;
  gap: 0.5rem;
  padding: 0 1rem;
}
.input-group {
  padding: 0 0.5rem;
}
.input-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: #2c3e50;
  font-weight: 600;
}
.input-group input {
  width: 100%;
  padding: 0.6rem;
  font-size: 0.9rem;
  border: 2px solid #3498db;
  border-radius: 8px;
  background: #f8f9fa;
}
.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0;
}
.calculate-btn,
.clear-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.calculate-btn {
  background: #27ae60;
  color: white;
}
.calculate-btn:hover {
  background: #219653;
}
.clear-btn {
  background: #e74c3c;
  color: white;
}
.clear-btn:hover {
  background: #c0392b;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #e74c3c;
}
.modal-content h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 1rem;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  display: table;
}
.results-table th,
.results-table td {
  padding: 0.6rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}
.results-table th {
  background: #2c3e50;
  color: white;
  font-weight: 600;
}
.results-table td {
  background: white;
}
.results-table tr:last-child td {
  border-bottom: none;
}
.history {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #4b5563;
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 6px;
  display: block;
}
.info-block-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-left: 20px;
}
.info-block {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: block;
}
.salary-calculator-figure {
  margin: 0;
  text-align: center;
  display: block;
}
.salary-calculator-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.salary-calculator-figure figcaption {
  font-size: 0.9rem;
  color: #4b5563;
  margin-top: 0.5rem;
}
@media (max-width: 768px) {
  .salary-calculator-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .salary-calculator-container {
    grid-column: 1;
    order: 2;
  }
  .info-block {
    order: 1;
  }
  .info-block-right {
    order: 3;
    margin-left: 0;
  }
}
