:root {
  --text: #e3e3ec;
  --background: #0b0b15;
  --primary: #9a98da;
  --secondary: #26228b;
  --accent: #3c36e2;
}

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

body {
  font-family: 'Fredoka', sans-serif;
  background: var(--background);
  display: flex;
  flex-direction: column;
  justify-content: left;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  gap: 20px;
  box-sizing: border-box;
}

.container,
.done-container,
.admin-container,
.pass-container {
  background: var(--background);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 0 25px var(--accent);
  border: 2px solid var(--accent);
}

.admin-container {
  max-width: 850px;
}

.short-link {
  margin-top: 15px;
  font-weight: bold;
  color: var(--text);
  word-wrap: break-word;
}

.flash.info {
  color: var(--accent);
}

h1, h2, h3 {
  color: var(--primary);
  margin-bottom: 20px;
}

li {
  color: var(--text);
  margin-bottom: 20px;
}

ul {
  list-style-type: disc;
}
ul ul {
  list-style-type: circle;
}

p {
  color: var(--primary);
}

footer {
  color: var(--text);
  text-align: center;
  font-size: 0.9rem;
}

.notfound {
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 25px var(--accent);
  text-align: center;
  width: 100%;
  max-width: 450px;
  border: 2px solid var(--accent);
}

@media screen and (max-width: 500px) {
  .container,
  .done-container,
  .admin-container,
  .pass-container {
    padding: 15px;
    width: 100%;
    max-width: 95vw;
    box-sizing: border-box;
    box-shadow: 0 0 25px var(--accent);
    border: 2px solid var(--accent);
  }

  input {
    width: 100%;
  }

  button {
    width: 70%;
    position: fixed;
  }

  .cf-turnstile {
    transform: scale(0.95);
    transform-origin: top;
  }
}

.feature {
  width: 200px;
  text-align: center;
}

.feature img {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.feature h3 {
  margin: 0;
  color: var(--text);
}

.feature p {
  font-size: 0.95rem;
  color: var(--primary);
}

.main-footer {
  background-color: var(--background);
  color: var(--primary);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  border-top: 2px solid var(--accent);
  width: 100%;
  bottom: 0;
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 5px;
  font-weight: 400;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .features {
    flex-direction: column;
    align-items: center;
  }

  .feature {
    width: 100%;
    max-width: 300px;
  }
}

.password-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.password-wrapper input {
  padding: 10px;
  font-size: 1rem;
  width: 250px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  box-sizing: border-box;
  height: 44px;
}

.password-wrapper button.toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-wrapper button.toggle img {
  width: 24px;
  height: 24px;
}

.toggle-password {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.toggle-password img {
  width: 26px;
  height: 26px;
}

.copypass button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.coolinput {
  display: flex;
  flex-direction: column;
  width: fit-content;
  position: static;
  max-width: 240px;
  margin: 0 auto 20px auto;
}

.coolinput label.text {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  position: relative;
  top: 0.5rem;
  margin: 0 0 0 7px;
  padding: 0 3px;
  background: var(--text);
  width: fit-content;
}

.coolinput input.input[type="text"],
.coolinput textarea,
.coolinput input.input[type="email"],
.coolinput input.input[type="password"],
.coolinput input.input[type="url"] {
  padding: 11px 10px;
  font-size: 0.75rem;
  border: 2px solid var(--accent);
  border-radius: 5px;
  background: var(--text);
}

.coolinput input.input:focus {
  outline: none;
}

.checkbox-container {
  display: flex;
  align-items: center;
  font-size: 1em;
  cursor: pointer;
  user-select: none;

  --checkmark-size: 1em;
  --border-color: var(--text);
  --checked-bg-color: var(--accent);
  --checked-border-color: var(--accent);
  --checkmark-color: var(--text);
  --focus-outline-color: var(--accent);
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: var(--checkmark-size);
  height: var(--checkmark-size);
  border: 2px solid var(--border-color);
  border-radius: 0.25em;
  background-color: transparent;
  position: relative;
  margin-right: 0.5em;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.checkbox-container input:checked + .checkmark {
  background-color: var(--checked-bg-color);
  border-color: var(--checked-border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.checkmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75em;
  height: 0.75em;
  background-color: transparent;
  border-radius: 0.1em;
  transform: translate(-50%, -50%);
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.checkbox-container input:checked + .checkmark::after {
  background-color: var(--checkmark-color);
  transform: scale(1);
  animation: checkmark-fade-in 0.3s ease forwards;
}

.checkmark:hover {
  border-color: var(--checked-bg-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.checkbox-container input:focus + .checkmark {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-outline-color);
}

@keyframes checkmark-fade-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

button {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: inline-block;
  text-align: center;
  font-weight: bold;
  padding: 0.7em 2em;
  border: 3px solid var(--accent);
  border-radius: 2px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.1);
  color: var(--accent);
  text-decoration: none;
  transition: 0.3s ease all;
  z-index: 1;
}

button:before {
  transition: 0.5s all ease;
  position: absolute;
  top: 0;
  left: 50%;
  right: 50%;
  bottom: 0;
  opacity: 0;
  content: '';
  background-color: var(--accent);
  z-index: -1;
}

button:hover, button:focus {
  color: #fff;
}

button:hover:before, button:focus:before {
  transition: 0.5s all ease;
  left: 0;
  right: 0;
  opacity: 1;
}

button:active {
  transform: scale(0.9);
}

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom, #1a1835, var(--background));
  overflow-x: hidden;
  padding-top: 60px;
  transition: 0.5s;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: var(--primary);
  display: block;
  transition: 0.3s;
}

.sidenav a:hover {
  color: var(--text);
}

.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
  color: var(--accent);
}

.sidenav .closebtn:hover {
  color: red;
}

.openbtn:hover {
  color: #fff;
}

@media screen and (max-height: 450px) {
  .sidenav {padding-top: 15px;}
  .sidenav a {font-size: 18px;}
}

.topbar {
  position: relative;
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  background-color: transparent;
  box-sizing: border-box;
}

.openbtn {
  font-size: 30px;
  cursor: pointer;
  background-color: transparent;
  color: var(--accent);
  padding: 10px 15px;
  border: none;
  text-decoration: none;
}

.brand-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: var(--primary);
  margin: 0;
  white-space: nowrap;
  pointer-events: none;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
  background-color: var(--background);
  border: 2px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--accent);
  color: var(--text);
}

th {
  background-color: var(--accent);
  color: var(--background);
  font-weight: bold;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: var(--secondary);
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats {
  margin-top: 20px;
  margin-bottom: 10px;
}

.stats p {
  margin: 5px 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qr-section {
  margin-top: 20px;
  text-align: center;
}

.qr-section img {
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 10px;
  background: var(--text);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  margin-bottom: 50px;
}

.action-buttons a button {
  width: 250px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: bold;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 40px 20px;
  background-color: var(--background);
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 25px var(--accent);
}

.feature-box {
  flex: 1 1 200px;
  max-width: 250px;
  text-align: center;
  color: var(--text);
}

.feature-box img {
  width: 50px;
  margin-bottom: 10px;
}

.feature-box h3 {
  font-size: 1.2em;
  margin-bottom: 8px;
}

.bottom-footer {
  background-color: var(--secondary);
  color: var(--text);
  text-align: center;
  padding: 20px 10px;
}

.bottom-footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 8px;
}

.bottom-footer a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 40px;
}

.password-container {
  display: none;
  margin-top: 10px;
}

.redirect-container {
  max-width: 100%;
  padding: 15px 15px;
  height: auto;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--background);
  box-shadow: 0 0 25px var(--accent);
  text-align: center;
  border: 2px solid var(--accent);
  border-radius: 12px;
  width: 400px;
}

@media (max-width: 400px) {
  .redirect-container {
    padding: 30px 15px;
    min-height: 240px;
    width: 300px;
  }

  .loader-wrapper {
    transform: scale(0.8);
  }
}

strong {
  color: var(--accent);
}

.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  width: auto;
  margin: 2rem;
  font-family: "Poppins", sans-serif;
  font-size: 1.6em;
  font-weight: 600;
  user-select: none;
  color: var(--text);
  scale: 2;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background-color: transparent;
  mask: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 6px,
    black 7px,
    black 8px
  );
}

.loader::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 50% 50%, var(--accent) 0%, transparent 50%),
    radial-gradient(circle at 45% 45%, var(--primary) 0%, transparent 45%),
    radial-gradient(circle at 55% 55%, var(--secondary) 0%, transparent 45%),
    radial-gradient(circle at 45% 55%, var(--primary) 0%, transparent 45%),
    radial-gradient(circle at 55% 45%, var(--secondary) 0%, transparent 45%);
  mask: radial-gradient(circle at 50% 50%, transparent 0%, transparent 10%, black 25%);
  animation:
    transform-animation 2s infinite alternate,
    opacity-animation 4s infinite;
  animation-timing-function: cubic-bezier(0.6, 0.8, 0.5, 1);
}

@keyframes transform-animation {
  0% { transform: translate(-55%); }
  100% { transform: translate(55%); }
}

@keyframes opacity-animation {
  0%, 100% { opacity: 0; }
  15% { opacity: 1; }
  65% { opacity: 0; }
}

.loader-letter {
  display: inline-block;
  opacity: 0;
  animation: loader-letter-anim 4s infinite linear;
  z-index: 2;
}

.loader-letter:nth-child(1) { animation-delay: 0.1s; }
.loader-letter:nth-child(2) { animation-delay: 0.205s; }
.loader-letter:nth-child(3) { animation-delay: 0.31s; }
.loader-letter:nth-child(4) { animation-delay: 0.415s; }
.loader-letter:nth-child(5) { animation-delay: 0.521s; }
.loader-letter:nth-child(6) { animation-delay: 0.626s; }
.loader-letter:nth-child(7) { animation-delay: 0.731s; }
.loader-letter:nth-child(8) { animation-delay: 0.837s; }
.loader-letter:nth-child(9) { animation-delay: 0.942s; }
.loader-letter:nth-child(10) { animation-delay: 1.047s; }

@keyframes loader-letter-anim {
  0% { opacity: 0; }
  5% {
    opacity: 1;
    text-shadow: 0 0 4px #fff;
    transform: scale(1.1) translateY(-2px);
  }
  20% { opacity: 0.2; }
  100% { opacity: 0; }
}

.blog-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background-color: var(--secondary);
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
  color: var(--primary);
  width: 800px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-thumb {
  width: 80px;
  height: 80px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.blog-text {
  flex: 1;
}

.blog-date {
  color: var(--primary);
  font-size: 0.9rem;
  margin: 0;
}

.blog-title {
  font-size: 1.5rem;
  margin: 5px 0;
}

.blog-title a {
  color: var(--primary);
  text-decoration: none;
}

.blog-title a:hover {
  text-decoration: underline;
}

.blog-preview {
  font-size: 1rem;
  color: var(--text);
  overflow-wrap: break-word;
}

.blog-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 600px) {
  .blog-card {
    flex-direction: column;
    width: 100%;
    padding: 15px;
  }

  .blog-thumb {
    width: 100%;
    height: 80px;
  }

  .blog-title {
    font-size: 1.2rem;
  }

  .blog-preview {
    font-size: 0.95rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    gap: 10px;
  }

  .openbtn {
    font-size: 1.2rem;
  }

  .brand-title {
    font-size: 1.4rem;
  }

  #mySidenav a {
    font-size: 1rem;
    padding: 10px 15px;
  }
}

.blog-content {
  background-color: var(--background);
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  padding: 2rem;
  border-radius: 16px;
  max-width: 700px;
  margin: 3rem auto;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
}

.blog-content h1 {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.blog-content h2 {
  color: var(--accent);
  margin-top: 2rem;
}

.blog-content p {
  line-height: 1.8;
  font-size: 1.05rem;
  color: var(--text);
}

.blog-content h3 {
  color: var(--primary);
  font-weight: bold;
}

label {
  color: var(--primary);
}