@font-face {
  font-family: 'ImpactCustom';
  src: url('./assets/fonts/impact.ttf') format('truetype');
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to bottom, #ffcc80, #ff9800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.navbar {
  border-radius: 15px;
  margin-top: 20px;
  margin-bottom: 10px;
  max-width: 800px;
  width: 100%;
  background: #fb8c00;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
}

.navbar a.active,
.navbar a:hover {
  text-decoration: underline;
}

.container {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@media (min-width: 768px) {
  .container {
    flex-direction: row;
    justify-content: space-around;
    gap: 30px;
  }

  .canvas-wrapper {
    width: 60%;
  }

  .form-wrapper {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

h1, h3 {
  color: #e65100;
  margin: 0;
}

h3 {
  margin-bottom: 20px;
}

input[type="text"],
textarea {
  text-transform: uppercase;
}


canvas {
  margin: 20px 0;
  width: 100%;
  max-width: 600px;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 10px;
}

input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  font-size: 16px;
  margin-bottom: 15px;
  border: 2px solid #ffa726;
  border-radius: 5px;
  font-family: 'ImpactCustom', sans-serif;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

button {
  padding: 12px 24px;
  background-color: #fb8c00;
  border: none;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

button:hover {
  background-color: #ef6c00;
}

.qr-display {
  margin: 20px 0 30px 0;
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-display img,
.qr-display canvas {
  width: 100%;
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}

#previewImage,
#qrCanvas {
  transition: opacity 0.4s ease;
}

.fade-out {
  opacity: 0;
}

.fade-in {
  opacity: 1;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

.qr-history {
  margin-top: 0px;
  width: 100%;
  max-width: 800px;
  text-align: left;
}

.qr-history h4 {
  color: #e65100;
  margin-bottom: 10px;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.history-item {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  background: #f9f9f9;
  text-align: center;
  width: 140px;
}

.history-item img {
  width: 100%;
  border-radius: 4px;
}

.history-item p {
  font-size: 12px;
  margin-top: 8px;
  word-break: break-word;
}

.qr-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#clearHistoryBtn {
  background-color: #d32f2f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#clearHistoryBtn:hover {
  background-color: #b71c1c;
}

.history-container {
  width: 100%;
  max-width: 800px;
  background: #fff;
  padding: 20px 30px;
  border-radius: 15px;
  margin-top: 30px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.footer {
  background-color: #fff;
  color: #444;
  text-align: center;
  font-size: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  line-height: 1.5;

  max-width: 800px;        /* Match your container */
  margin: 2rem auto;       /* Center horizontally */
  width: 100%;
  box-sizing: border-box;
}

.footer p {
  margin: 0.4rem 0;
}

.footer a {
  color: #e67e22;
  font-weight: 500;
  text-decoration: none;
}

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

#ad-wrapper {
  text-align: center;
  margin: 20px 0;
}
