::selection {
  background: transparent;
}
::-moz-selection {
  background: transparent;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  src: local(""), url("./fonts/poppins-v23-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  src: local(""), url("./fonts/poppins-v23-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  src: local(""), url("./fonts/poppins-v23-latin-700.woff2") format("woff2");
}
:root {
  --primary-color: #000000;
  --primary-hover: #000000;
  --danger-color: #dc3545;
  --light-gray: #f8f9fa;
  --medium-gray: #dee2e6;
  --dark-gray: #495057;
  --container-bg: #ffffff;
  --text-color: #1c1e21;
  --body-bg-start: #e9ecef;
  --body-bg-end: #ffffff;
  --border-radius: 12px;
  --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
body.dark-mode {
  --primary-color: #696363;
  --primary-hover: #888888;
  --light-gray: #2c3034;
  --medium-gray: #495057;
  --dark-gray: #adb5bd;
  --container-bg: #1c1e21;
  --text-color: #f8f9fa;
  --body-bg-start: #0f1012;
  --body-bg-end: #1c1e21;
}
body {
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  background-image: linear-gradient(
    to bottom,
    var(--body-bg-start),
    var(--body-bg-end)
  );
  background-attachment: fixed;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 2rem;
  box-sizing: border-box;
  user-select: none;
  overflow-x: hidden !important;
  transition: background-color 0.3s, color 0.3s;
}
.container {
  background-color: var(--container-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 1200px;
  text-align: center;
  transition: all 0.3s ease-in-out;
}
h1,
h2 {
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-weight: 700;
}
.screen {
  display: none;
}
.screen.active {
  display: block;
}
.input-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .input-section {
    grid-template-columns: 1fr 1fr;
  }
}
.input-group label {
  font-weight: 600;
  color: var(--dark-gray);
  text-align: left;
  display: block;
  margin-bottom: 0.5rem;
}
.input-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--container-bg);
  color: var(--text-color);
}
.input-group input:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}
.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}
button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}
button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}
button.clear {
  background-color: var(--danger-color);
}
button.clear:hover {
  background-color: #b02a37;
}
button svg {
  width: 24px;
  height: 24px;
}
#results,
#cidr-results {
  margin-top: 2rem;
  text-align: left;
  overflow-x: auto;
}
.error {
  color: var(--danger-color);
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  padding: 1rem;
  border-radius: 8px;
}
#summary,
#cidr-summary {
  background-color: rgba(13, 110, 253, 0.1);
  border-left: 5px solid var(--primary-color);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  min-width: 600px;
  table-layout: fixed;
}
tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}
body.dark-mode tbody tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}
th,
td {
  border: 1px solid var(--medium-gray);
  padding: 0.8rem;
  text-align: center;
  vertical-align: middle;
}
th {
  background-color: var(--light-gray);
  font-weight: 600;
}
.bottom-nav {
  display: none;
}
.info-card {
  text-align: center;
  padding: 2rem 0;
}
.info-card h3 {
  margin: 0.5rem 0;
  font-weight: 600;
  color: var(--text-color);
}
.info-card p {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
}
.website-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: background-color 0.2s;
}
.website-link svg {
  width: 20px;
  height: 20px;
}
.website-link:hover {
  background-color: var(--primary-hover);
}
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
}
.settings-item label {
  font-weight: 600;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary-color);
}
input:checked + .slider:before {
  transform: translateX(22px);
}
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}
.modal-content {
  background-color: var(--container-bg);
  padding: 20px;
  border: 1px solid var(--medium-gray);
  width: 100%;
  max-width: 800px;
  border-radius: var(--border-radius);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.details-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}
.details-btn svg {
  width: 24px;
  height: 24px;
}
.details-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.home-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.option-card {
  background-color: var(--light-gray);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--medium-gray);
}
.option-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}
.option-card svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--primary-color);
}
.option-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

@media (min-width: 768px) {
  .home-options {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 721px) {
  body {
    padding: 0;
  }
  .container {
    padding: 1.5rem 1.5rem 100px 1.5rem;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  h1 {
    font-size: 1.8rem;
  }
  .input-group label {
    font-size: 0.9rem;
  }
  table {
    font-size: 0.8rem;
    min-width: 100%;
  }
  th,
  td {
    padding: 0.6rem;
    font-size: 0.75rem;
  }
  #summary,
  #cidr-summary {
    font-size: 0.85rem;
  }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    justify-content: space-around;
    padding: 10px 0;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  .nav-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--dark-gray);
    text-decoration: none;
    flex: 1;
  }
  .nav-item svg {
    width: 24px;
    height: 24px;
  }
  .nav-item span {
    font-size: 0.7rem;
  }
  .nav-item.active {
    color: var(--primary-color);
  }
  .option-card {
    padding: 1.5rem;
  }
  .option-card h3 {
    font-size: 1.2rem;
  }
}
