*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-footer: #f3f5f7;
  --text: #000000;
  --font-size: 1.3rem;
  --font-size-footer: 1rem;
  --card: rgba(0,0,0,0.05);
  --muted: #555;
  --accent: #3872fe;
  --accent-hover: #2c5bcb;
  --border-radius: 5px;
  --color-footer-divider: grey;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #001122;
    --bg-footer: #1a2938;
    --text: #f5f5f5;
    --card: rgba(255,255,255,0.06);
    --muted: #aaa;
    --accent: #3872fe;
	--accent-hover: #2c5bcb;
  }
}

a {
  text-decoration: none;
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

p, button, input, textarea {
  font-size: var(--font-size);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Helvetica', 'Arial', sans-serif; /* LateNighter-liknande */
  margin: 0;
  padding: 0;
}

img {
  height:auto;
  max-width:100%; 
}

.about-header {
  text-align: center;
}

.container {
  max-width: 700px;
  margin: auto;
  padding: 30px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.logo-img {
  display: block;
  object-fit: contain;
}

.logo-fallback {
  display: none;
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}

#site-logo {
  border-radius: var(--border-radius)
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.progress {
  height: 4px;
  background: #222;
  margin-bottom: 20px;
}

#bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s;
}

input, textarea {
  width: 100%;
  padding: 12px;
  margin: 20px 0;
  background: var(--card);
  border: 1px solid #333;
  border-radius: var(--border-radius);
  color: var(--text);
}

textarea {
  resize: vertical;
}

button {
  background: var(--accent);
  border: none;
  border-radius: var(--border-radius);
  margin: 3px 0px;
  padding: 10px 15px;
  color: white;
  cursor: pointer; 
}

button img {
  height: 36px;
}

button:disabled {
  opacity: 0.4;
}

button:hover {
  background: var(--accent-hover);
}

.nav {
  display: flex;
  justify-content: space-between;
}

#retry {
  text-align: center;
  margin: 80px auto 0 auto;
}

.share-result {
  padding: 40px 0 0 0;
  text-align: center;
}

.result-divider {
  height: 4px;
  background: var(--accent);
}

/*#qr {
  margin: 30px auto 0px auto;
  display: none;
}*/

/* Test med ny QR */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg);
  color: var(--text);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  position: relative;

  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);

  opacity: 0;
  transform: scale(0.9);
  animation: modalIn 0.3s ease forwards;
}

/* QR wrapper med accent */
#qrWrapper {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 3px solid var(--accent);
  display: inline-block;
  position: relative;
}

/* canvas */
#qr {
  display: block;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.4s ease forwards;
  animation-delay: 0.2s;
}

/* loader */
#qrLoader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #000;
}

/* knapp */
#copyQR {
  margin: 20px auto 0 auto;
  display: block;
}

/* close */
#closeModal {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
}

/* animationer */
@keyframes modalIn {
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Test med ny QR */


.footer {
  margin: 100px auto auto;
  border-top: var(--color-footer-divider) solid 1px;
  background-color: var(--bg-footer);
}

.footer-content {
  max-width: 700px;
  margin: auto;
  padding: 30px;
  font-size: var(--font-size-footer);
  text-align: center;
}

.share-site {
  border-bottom: var(--color-footer-divider) solid 1px;
  padding-bottom: 35px;
}

.footer-menu {
  padding: 35px 0px;
}

.footer-menu a, #retry a {
  color: white;
  text-decoration: none;
}