* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/*BODY*/
body {
  min-height: 100vh;
  /*
  display: flex;
  flex-direction: column;
  */
}

/*HEADER*/
/*------------------------------------*/
header {
  font-family: arial;
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 99;
  box-shadow: 0 0 10px #000;
  /*background: rgba(0, 0, 0, 0.5);*/
  background: #1b1b1e;
}

header h1 a {
  text-decoration: none;
  color: #fff;
}
header .logo {
  display: flex;
  flex: 1;
  margin-left: 50px;
  text-transform: uppercase;
  font-size: 15px;
}

main {
  display: flex;
  /*
  justify-content: center;
  align-items: center;
  */
  flex: 1;
  height: 100%;
}

section {
  width: 100%;
}

.container {
  flex: 1;
  /*
  background-color: pink;
  display: flex;
  justify-content: center;
  align-items: center;
  */
  height: 80vh;
}

.mainHeadline {
  text-align: center;
  padding: 30px 0px 30px 0px;
  padding-top: 50px;
}

.mainHeadline h1 {
  font-family: "Fjalla One", sans-serif;
  text-transform: uppercase;
  font-size: 36px;
  margin-bottom: 15px;
}

.mainHeadline p {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.box2 {
  display: flex;
  justify-content: center;
  height: 500px;
}

.arvausBox {
  width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.vastausBox {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

fieldset {
  padding: 100px;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
    rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

legend {
  font-family: "Fjalla One", sans-serif;
  font-size: 36px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.input-box {
  padding: 8px;
}

input[type="radio"] {
  margin-right: 10px;
}

label {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}
.radioBox {
}

.kolikko {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.kolikko img {
  width: 230px;
  height: 230px;
  margin-bottom: 25px;
}

button {
  background-color: #4caf50;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
  border: none;
  width: 200px;
  font-weight: 700;
}

button:hover {
  background-color: #45a049;
}

.nollaaTulokset {
  background-color: red;
}

aside {
  padding-top: 30px;
  width: 800px;
  order: 1;
  height: 80vh;
  /*box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
    rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;*/
}

.otsikko h2 {
  text-align: center;
  font-family: "Fjalla One", sans-serif;
  font-size: 36px;
  text-transform: uppercase;
  padding: 30px 0px 30px 0px;
}

/*FOOTER*/
footer {
  width: 100%;
  z-index: 100;
  box-shadow: 0 0 10px #000;
  background: #1b1b1e;
  /*background: rgba(0, 0, 0, 0.5);*/
  transition: opacity 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

footer .headline ul li {
  list-style: none;
}

footer .headline a i {
  color: #fff;
  font-size: 25px;
  padding: 20px;
  margin: 10px 0 10px 0;
  text-decoration: none;
}

footer .info ul li {
  list-style: none;
}

/*MEDIA*/

/* Mediasäännöt mobiililaitteille */

@media screen and (min-width: 769px) and (max-width: 1024px) {
  header .logo {
    margin-left: 30px;
    font-size: 14px;
  }

  .mainHeadline h1 {
    font-size: 28px;
  }

  .mainHeadline p {
    font-size: 16px;
  }

  .box2 {
    flex-direction: column;
    height: auto;
  }

  .arvausBox,
  .kolikko {
    width: 100%;
    padding: 15px;
  }

  fieldset {
    padding: 30px;
  }

  legend {
    font-size: 28px;
  }

  .kolikko img {
    width: 180px;
    height: 180px;
  }

  aside {
    width: 800%;
    height: auto;
    padding: 20px;
  }

  .otsikko h2 {
    font-size: 28px;
  }

  button {
    width: 160px;
    padding: 10px 15px;
    font-size: 15px;
  }
}

@media screen and (max-width: 768px) {
  body,
  html {
    height: auto;
  }

  .box2 {
    flex-direction: column;
  }
  .arvausBox {
    order: 1; /* Asettaa radioBoxin ensimmäiseksi */
    width: 100%;
    padding: 10px;
  }

  .kolikko {
    order: 2; /* Asettaa kolikon toiseksi */
    width: 100%;
  }

  main {
    min-height: 100vh; /* Tämä varmistaa, että pääsisältö vie riittävästi tilaa */
  }

  footer {
    position: relative; /* varmistaa, että footer pysyy sivun lopussa */
  }
}

@media screen and (max-width: 480px) {
  body,
  html {
    height: auto;
  }

  .container {
    padding: 5px;
  }
  main {
    min-height: 100vh;
  }

  .arvausBox {
    order: 1; /* Asettaa radioBoxin ensimmäiseksi */
    width: 100%;
    padding: 10px;
  }

  .kolikko {
    order: 2; /* Asettaa kolikon toiseksi */
    width: 100%;
  }
  header .logo {
    margin-left: 10px;
  }

  .mainHeadline h1 {
    font-size: 20px;
  }

  .mainHeadline p {
    font-size: 12px;
  }

  fieldset {
    padding: 15px;
  }

  legend {
    font-size: 20px;
  }

  .kolikko img {
    width: 120px;
    height: 120px;
  }

  aside {
    box-shadow: none;
    border: none;
    width: 40%;
    padding: 5px;
  }

  button {
    width: 120px;
    padding: 7px;
    font-size: 12px;
  }
}
