/* style.css */

@font-face {
  font-family: 'Elvish';        /* Tavs brīvais nosaukums */
  src: url('fonts/elvish.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;  /* ieteicams, lai tīkls nenošūpotu tekstu */
}



/* ---- reset ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
}

/* ---- body/background ---- */
html, body {
  height: 100%;
  margin: 0;
}

body {
  background-image: url('img/32.webp');
  background-size: cover;         /* scale it to cover the entire area */
  background-attachment: fixed;   /* optional: lock it in place */

}
body.riddle-page {
  background-image: url('img/moria.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* ---- menu container ---- */
.container {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.menu a {
  display: inline-block;
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid #fff;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.menu a:first-child {
  margin-left: 0;
}

.menu a:hover {
  background: #fff;
  color: #333;
}

/* Riddle/login page */
.riddle-container {
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;            /* mazs sānu atkāpjums maziem ekrāniem */
}
.image-column,
.riddle-column {
  flex: 0 1 350px;            /* neizplešas pilnībā, var sarauties, bāzes platums 350px */
  margin: 0 0.5rem;           /* starp kolonnām neliels atstatums */
  padding: 1rem;
}
.image-column img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.riddle-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#riddle {
  font-family: Elvish;
  font-weight: bold;
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #d0a61c;

}
.riddle-column form {
  display: flex;
  gap: 0.5rem;
}
.riddle-column input, .riddle-column button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-family: Elvish;
}

/* Demo player page */
.player-container {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;

}

.player-container h1 {
  color: #d0a61c;
  font-size: 3rem;
  margin-bottom: 1rem;
}


.playlist {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
.playlist li + li {
  margin-top: 0.5rem;
}
.playlist button {
  background:  #d0a61c;
  border: 2px solid white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}
.playlist button:hover {
  background: #333;
  color: #fff;
}

/* Kļūdu teksts */
.error {
  color: crimson;
  margin-bottom: 1rem;
}

.form-container {
      max-width: 500px;
      margin: 40px auto;
      padding: 20px;
      border: 1px solid #ccc;
      border-radius: 8px;
      background-color: #f9f9f9;
    }
    .form-container h1 {
      text-align: center;
      margin-bottom: 20px;
    }
    .form-container label {
      display: block;
      margin-top: 10px;
      font-weight: bold;
    }
    .form-container input[type="text"],
    .form-container input[type="file"] {
      width: 100%;
      padding: 8px;
      margin-top: 5px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    .form-container button {
      margin-top: 20px;
      width: 100%;
      padding: 10px;
      border: none;
      border-radius: 4px;
      font-size: 16px;
      cursor: pointer;
      background-color: #d0a61c;
      color: white;
    }
    .form-container .errors {
      background: #ffe6e6;
      border: 1px solid #ffcccc;
      padding: 10px;
      border-radius: 4px;
      margin-bottom: 15px;
    }
    .form-container .errors li {
      margin-bottom: 5px;
      color: #cc0000;
    }
    .form-container a {
      display: block;
      text-align: center;
      margin-top: 15px;
      color: #333;
      text-decoration: none;
    }
    .form-container a:hover {
      text-decoration: underline;
    }

/* Mazos ekrānos sasaistām vertikāli un nodrošinām 100% platumu */
@media screen and (max-width: 600px) {
  .riddle-container {
    flex-direction: column;
     align-items: center;    /* horizontāli centrē kolonnas */
    justify-content: center; /* vertikāli centrē, ja konteinerim ir fiksēta augstums */
  }
  .image-column,
  .riddle-column {
    width: 100%;
    text-align: center; /* centruj iekšējo tekstu, bildi u.tml. */
  }
  .image-column {
    order: 1; /* vispirms attēls */
  }
  .riddle-column {
    order: 2; /* pēc tam mīkla/teksts */
  }

  .image-column img {
  width: 50%;
  height: auto;
  border-radius: 8px;
}

#riddle{

  font-size: 2rem;
}

}
