/* Author: Mehmet Kahya */
/* Created: 17 March 2024 */
/* Last Updated: 5 May 2024 */

:root {
  --primary-color: #040e66; /* Dark blue */
  --secondary-color: #6c757d; /* Grey */
  --dark-color: #343a40; /* Dark grey */
  --light-color: #f8f9fa; /* Light grey */
  --danger-color: #dc3545; /* Red */
  --success-color: #28a745; /* Green */
  --warning-color: #ffc107; /* Yellow */
  --info-color: #17a2b8; /* Teal */
  --font-color: #212529; /* Black */
  --font-size: 1.2rem;
  --border-radius: 0.5rem; /* Increased border-radius for softer edges */
  --transition: all 0.3s ease; /* Slightly faster transitions */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  height: 100vh;
  width: 100%;
  background-color: var(--light-color);
  color: var(--font-color);
  font-size: var(--font-size);
  margin: 0;
  padding: 0;
  transition: var(--transition);
}

header {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 1rem 0;
  text-align: center;
  position: relative;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow); /* Soft shadow under the header */
}

header .ascii-art {
  font-size: 0.6rem;
  font-weight: bolder;
  color: rgb(255, 255, 255);
  margin: 0;
}

header p {
  margin: 0;
  font-size: 60%;
  text-align: center;
  color: #fff;
  font-weight: bolder !important;
}

button {
  padding: 0.5rem 1rem; /* Slightly larger padding */
  font-size: 0.85rem; /* Larger font size */
  font-weight: bolder;
  border: none; /* No border */
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  margin: 0.25rem;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  background-color: var(--primary-color);
  color: var(--light-color);
  box-shadow: var(--shadow); /* Shadow for buttons */
}

button:hover {
  background-color: #06138b; /* Darken background on hover */
  transform: translateY(-2px); /* Slight lift effect */
}

button.danger {
  background-color: var(--danger-color);
  color: var(--light-color);
}

button.success {
  background-color: var(--success-color);
  color: var(--light-color);
}

input {
  padding: 0.5rem; /* Increased padding */
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--secondary-color);
  margin: 0.25rem;
  width: 100%;
  outline: none;
  transition: var(--transition); /* Transition for input */
}

input:focus {
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 4px rgba(4, 14, 102, 0.5); /* Focus shadow */
}

.popup {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1001; /* Above other elements */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 400px;
  background-color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); /* Deeper shadow for popup */
  border-radius: var(--border-radius);
  text-align: center;
  padding: 20px;
}

.popup .main {
  font-weight: bolder;
}

.popup-content {
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px; /* Position the close button to the right */
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  background-color: var(--danger-color);
  color: #fff;
  width: 30px; /* Slightly larger close button */
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.close-btn:hover {
  background-color: #c82333; /* Darken on hover */
}

.horizontalContainer {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  justify-content: center;
  margin: 0 auto;
}

#addr {
  flex: 1;
  max-width: 49%;
}

.horizontalContainer button {
  padding: 10px 20px;
  cursor: pointer;
}

#emails {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  text-align: center;
}

#emails th,
#emails td {
  border: 1px solid #ddd;
  padding: 10px; /* Increased padding */
}

#emails th {
  background-color: #f2f2f2;
}

footer {
  background-color: var(--primary-color);
  color: var(--light-color);
  text-align: center;
  font-size: small;
  padding: 1rem; /* Increased padding */
  position: fixed;
  bottom: 0;
  left: 0;
  margin: 0;
  width: 100%;
  font-weight: bolder;
  box-shadow: var(--shadow); /* Shadow for footer */
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social a {
  margin: 5px;
  font-size: 1rem;
  color: var(--light-color);
}

.social a:hover {
  color: rgb(214, 227, 243);
}

.warning-button {
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 0.5rem;
  padding: 0.5rem;
  margin: 0.75rem;
}

.warning-button:hover {
  background-color: var(--danger-color);
  color: var(--light-color);
}

@media (max-width: 768px) {
  button {
    font-size: 0.65rem; /* Slightly smaller */
  }

  input {
    font-size: 0.76rem;
  }

  table {
    font-size: 0.76rem;
  }

  #emails th,
  #emails td {
    padding: 0.4rem; /* Increased padding */
  }

  header p {
    font-size: 50%;
  }

  footer {
    font-size: 50%;
  }
}

@media (max-width: 576px) {
  .ascii-art {
    font-size: 0.5rem !important;
  }

  button {
    font-size: 0.4rem;
  }

  input {
    font-size: 0.6rem;
  }

  table {
    font-size: 0.6rem;
  }

  header p {
    font-size: 40%;
  }

  footer {
    font-size: 40%;
  }
}

@media (max-width: 320px) {
  .ascii-art {
    font-size: 0.4rem !important;
  }

  button {
    font-size: 0.3rem;
  }

  input {
    font-size: 0.5rem;
  }

  table {
    font-size: 0.5rem;
  }

  header p {
    font-size: 30%;
  }

  footer {
    font-size: 30%;
  }
}

.copy-icon {
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-icon:hover {
  color: var(--danger-color); /* Change color on hover */
  transform: scale(1.1); /* Slightly enlarge on hover */
}

#loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.spinner {
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
