/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

/* Light Mode */
:root {
  --bg-color: #f0f4f8;
  --text-color: #333;
  --container-bg: rgba(255, 255, 255, 0.9);
  --button-bg: #007bff;
  --button-text: #fff;
  --input-bg: #fff;
  --shadow: rgba(0, 0, 0, 0.1);
  --border-color: #ccc;
}

/* Dark Mode */
.dark-mode {
  --bg-color: #121212;
  --text-color: #fff;
  --container-bg: rgba(30, 30, 30, 0.9);
  --button-bg: #00aaff;
  --button-text: #fff;
  --input-bg: #222;
  --shadow: rgba(255, 255, 255, 0.1);
  --border-color: #555;
}

/* General Styles */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  /* padding-top: 70px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s, color 0.3s;
}

/* Navbar */
nav {
  width: 100%;
  background: var(--container-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  box-shadow: 0 2px 10px var(--shadow);
  position: fixed;
  /* top: 0; */
  /* left: 0; */
  /* height: 60px; */
  /* z-index: 1000; */
}

/* Navbar Title */
nav h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 0 40px;
  color: var(--text-color);
}

/* Dark Mode Toggle Button */
#theme-toggle {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  width: auto;
  margin: 0 40px;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

#theme-toggle:hover {
  opacity: 0.8;
}

/* Container */
.container {
  background: var(--container-bg);
  padding: 10px 30px;
  border-radius: 15px;
  box-shadow: 0px 4px 15px var(--shadow);
  width: 550px;
  text-align: center;
  margin: 80px 0;
}

/* Grid Layout */
.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
  margin-top: 15px;
}

/* Input Fields */
input[type='number'] {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-color);
  text-align: center;
  font-size: 16px;
  transition: background 0.3s, color 0.3s, border 0.3s;
}

/* Options (CheckBoxes & Radio Buttons) */
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Checkbox & Radio Button Styling */
.options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  transition: background 0.3s, border 0.3s;
}

.options input[type='checkbox'],
.options input[type='radio'] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  position: relative;
}

.options input[type='radio'] {
  border-radius: 50%;
}

/* Checked State */
.options input[type='checkbox']:checked,
.options input[type='radio']:checked {
  background: var(--button-bg);
  border-color: var(--button-bg);
}

/* Checkbox and Radio Button Checkmark */
.options input[type='checkbox']::after,
.options input[type='radio']::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--button-text);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  border-radius: 50%;
}

.options input[type='checkbox']:checked::after,
.options input[type='radio']:checked::after {
  opacity: 1;
}

/* Buttons */
button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: 0.3s;
  margin-top: 15px;
}

button:hover {
  opacity: 0.8;
}

.copy-btn {
  width: auto;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 6px;
  transition: 0.3s;

  top: 0;
  right: 0;
  margin: 0;
  position: absolute;
  /* position: sticky; */
  cursor: pointer;
}

/* Output Section */
#output-container {
  background: var(--input-bg);
  padding: 0 15px 15px 15px;
  position: relative;
  border-radius: 8px;
  margin-top: 20px;
  text-align: left;
  font-size: 14px;
  overflow-x: hidden;
  height: auto;
  max-height: 470px;
  overflow-y: auto;
}

/* Footer */
footer {
  width: 100%;
  background: var(--container-bg);
  display: flex;
  justify-content: space-between;
  text-align: center;
  font-size: 14px;
  position: fixed;
  bottom: 0;
  box-shadow: 0 -2px 10px var(--shadow);
}

footer .footer__icons a {
  text-decoration: none;
  color: var(--text-color);
}

.footer__icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 10px;
  margin: 0 40px;
}

footer p {
  color: var(--text-color);
  margin: 15px 40px;
}

/* Responsive Design */
@media (max-width: 600px) {
  .grid-container {
    grid-template-columns: 1fr;
  }

  .container {
    width: 90%;
  }
}

/* Alert Container */
.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Alert Box */
.alert {
  position: relative;
  background: #007bff;
  color: #fff;
  padding: 25px 20px 15px 20px;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  animation: fadeIn 0.3s ease-in-out;
}

/* Alert Close Button (Top Right Corner) */
.alert .close-btn {
  position: absolute;
  top: 5px;
  right: -80px;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.alert span {
  margin: 20px 0 0 0;
}

.alert .close-btn:hover {
  opacity: 0.7;
}

/* Alert Types */
.alert.success {
  background: #28a745;
} /* Green */
.alert.error {
  background: #dc3545;
} /* Red */
.alert.info {
  background: #17a2b8;
} /* Blue */
.alert.warning {
  background: #ffc107;
} /* Yellow */

/* Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
