/* THIS  CODE  IS  WRITTEN  BY  -- ASIM HUSAIN */

/* Main Body */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Ubuntu', sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  z-index: 1;
  color: #333;
}

/* Canvas */
canvas {
  background-color: #000;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Heading */
h1 {
  text-align: center;
  margin-bottom: 40px;
  color: #fff;
  font-weight: 600;
  z-index: 1;
  animation: fadeIn 1s ease-in-out;
  margin-left: 0px; 
}

/* Input Box*/
input[type="text"] {
  padding: 15px;
  width: 650px;
  font-family: 'Ubuntu', sans-serif;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
  text-align: center;
}

input[type="text"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 5px rgba(3, 3, 3, 0.6);
  outline: none;
}

/* Layout */
.input-wrapper {
  position: relative;
  width: 750px;
}

#urlInput {
  width: 100%;
  padding: 10px;
  padding-right: 60px;
  font-size: 16px;
  border-radius: 15px;
}

.qr-icon-container {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.qr-icon-container img {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.qr-icon-container img:hover {
  transform: scale(1.1);
}

.qr-icons {
  display: none;
  flex-direction: row;
  gap: 10px;
}

.qr-icons img {
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.qr-icons img:hover {
  transform: scale(1.2);
}

/* Scanner UI */
#qrScanner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  padding: 20px;
  border-radius: 12px;
  z-index: 9999;
}

#qrScanner button {
  margin-top: 10px;
  padding: 8px 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Button */
button {
  font-family: 'Ubuntu', sans-serif;
  margin-top: 25px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #606060, #adacac); /* grey gradient */
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s;
  z-index: 1;
}

button:hover {
  background: linear-gradient(135deg, #adacac, #606060);
  transform: scale(1.05);
}

/* Result */
#result {
  margin-top: 20px;
  font-size: 16px;
  color: #fff;
  z-index: 1;
}

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

.back-logo {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease;
}

.back-logo:hover {
  transform: translateY(-50%) scale(1.2);
}

#urlInput {
  padding-left: 45px; 
}

#copyIcon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: 6px;
  transition: transform 0.2s ease;
}
#copyIcon:hover {
  transform: scale(1.1);
}

.copy-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.copied-text {
  position: absolute;
  top: -40px;
  left: 30%;
  transform: translateX(-50%);
  font-family: 'Ubuntu', sans-serif;
  font-size: 14px;
  color: grey;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Theme Toggle Icon */
#themeToggle {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 999;
  cursor: pointer;
}

#themeToggle img {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}
#themeToggle img:hover {
  transform: scale(1.1);
}

/* Dark Theme */
body.dark {
  background: #000;
  color: white;
}

canvas.dark {
  background-color: #000;
}

input {
  background-color: #fff !important;
  color: #111 !important;
  border: 1px solid #ccc !important;
}

body.dark h1 {
  color: #fff;
}

body.light h1 {
  color: #111;
}

/* Light Theme */
body.light {
  background: #fff;
  color: #111;
}

canvas.light {
  background-color: #fff;
}

input {
  background-color: #fff !important;
  color: #111 !important;
  border: 1px solid #ccc !important;
}

/* Theme Toggle Position */
#themeToggle {
  position: fixed;
  top: 40px;
  right: 40px;
  z-index: 9999;
  cursor: pointer;
}

/* Icon shape with pure CSS */
#themeIcon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: inset -8px -8px 0 0 black;
}

#themeIcon.sun {
  background: yellow;
  box-shadow: inset -8px -8px 0 0 black;
  box-shadow: none;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: transparent;
  text-align: center;
  padding: 12px 10px 14px;
  z-index: 10;
  font-family: 'Ubuntu', sans-serif;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  color: #fff !important;
  font-size: 14px;
  transition: color 0.2s ease;
}

body.light .footer-links a {
  color: #111 !important;
}

body.light .footer-links a:hover {
  color: #000 !important;
}

.footer-links span {
  color: #666;
  font-weight: bold;
}

.footer-links a:hover {
  color: #fff;
}

/* Theme-aware footer */
body.light .footer h2 {
  color: #111;
}

body.light .footer-links a {
  color: #0077cc;
}

body.light .footer-links a:hover {
  color: #000;
}

body.light .footer-links span {
  color: #aaa;
}

/* Contact Popup Overlay */
.contact-popup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
}

.contact-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 30px 25px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.contact-content.show {
  transform: scale(1);
  opacity: 1;
}
@keyframes popupOpen {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { background: rgba(0, 0, 0, 0); }
  to { background: rgba(0, 0, 0, 0.5); }
}

.contact-content h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
  position: relative;
}

.popup-icon {
  width: 28px;
  vertical-align: middle;
  margin-right: 8px;
}

/*  Input */
.input-group {
  position: relative;
  margin-bottom: 15px;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 20px;
  transform: translateY(-50%);
  opacity: 0.7;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 14px;
  transition: box-shadow 0.2s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  box-shadow: 0 0 5px #060606;
}

.input-group textarea {
  resize: vertical;
  height: 90px;
  padding-left: 15px;
}

.contact-content button {
  width: 100%;
  background: linear-gradient(135deg, #667eea, #556cd6);
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 12px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  color: #040404;
  cursor: pointer;
  transition: transform 0.2s;
}

.close-btn:hover {
  transform: rotate(90deg);
}

#backArrow {
  position: fixed;
  top: 20px;
  left: 25px;
  z-index: 999;
  cursor: pointer;
}

#backArrow img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

#backArrow img:hover {
  transform: scale(1.2);
}

/* Terms & Conditions Popup */
.popup-terms {
  font-family: 'Ubuntu' , sans-serif;
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.popup-content-terms {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  width: 70%;
  max-width: 600px;
  height: 70vh;
  overflow-y: auto;
  position: relative;
  font-family: 'Ubuntu', sans-serif;
}

.close-terms {
  color: #333;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#termsLink {
  color: #007BFF;
  text-decoration: none;
  cursor: pointer;
  margin-top: 0px;
  display: inline-block;
  font-size: 14px;
}

.terms-body {
  margin-top: 20px;
  line-height: 1.6;
  color: #444;
  font-family: 'Ubuntu', sans-serif;
}

/* Popup Styling */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  position: relative;
  background: #fff;
  color: #000;
  padding: 20px 30px;
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.close-mobile-popup {
  position: top right;
  top: 10px;
  right: 10px;
  font-size: 24px;
  color: #000;
  cursor: pointer;
}