@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;700&family=Manrope:wght@200..800&family=Montserrat:wght@100..900&family=Poppins:wght@300;600&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&display=swap');

:root {
    --bg-color-body: #ECF2F8;
    --bg-color-main: #FFFFFF;
    --grey-900: #48556A;
    --grey-500: #6E8098;
    --grey-400: #9DAEC2;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
button {
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  background-color: transparent;
  cursor: pointer;
}

body {
    background-color: var(--bg-color-body);
    color: var(--grey-900);
    font-family: "Manrope", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-size: 0.8rem;
}

label {
    font-size: 1rem;
}

.container {        
    display: flex;
    justify-content: center;
    align-items: center; 
    width: 100vw; 
    height: 100vh; 
    padding: 1.5rem;    
}
.contntent {
    max-width: 38rem;
    height: auto;
    background-color: var(--bg-color-main);
    border-radius: 0.75rem;
    box-shadow: 0px 40px 40px -10px rgba(201, 213, 225, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    overflow: hidden;
}
.article__image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.article__content {
     padding: 0 2rem;
     margin: 2rem;
}
.article__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--grey-900);
    font-size: 1.25rem;
    padding: 1rem 0;
}
.wrapper {
    position: relative;
    padding: 1rem;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.author__image {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}
.author__name {
    font-weight: 700;
    color: var(--grey-900);
}

.author__share {
    margin-left: auto;
    margin-right: 1.5rem;
}
.overlay-block {
  width: 100%;
  height: 100%;
  padding: 2rem;
  background: var(--grey-900);
  z-index: 100; 
  display: flex;
  top: 0;
  left: 0;
  align-items: center;
  position: absolute;
}

.share {
    color: var(--grey-400);
    text-transform: uppercase;
    padding: 0 0.5rem;
}
.social-icon {
    display: flex;
}
.social-icon img {
    width: 1.25rem;
    height: 1.25rem;
    fill: var(--grey-500);
    margin: 0 0.5rem 0 1.5rem;
}
.hide-el {
    display: none;
}
.article__description {
    padding-top: 1.5rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    padding-bottom: 1.5rem;
}
.article__description button{
    width: 100%;
    padding: 0.75rem;
    color: var(--bg-color-main);
    background-color: var(--grey-900);
    border-radius: 0.5rem;
    margin: 1 rem;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(128, 128, 128, 0.5); /* сіра, майже прозора */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-window {
  background: #fff;
  border: 2px solid #007BFF; /* синя рамка */
  border-radius: 12px;
  width: 90vw;
  max-width: 400px;
  padding: 20px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.close-modal {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.incorrect{
    color: #ff0000;
    font-size: 1.5rem;
}
.correct-answer{
    color: #808000;
    font-size: 1rem;
}
.btn-group{
    display: block;
    border: 1px solid #007BFF;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
}
h2, h3, p {
   text-align: center;
}

.question-block {
  display: flex;
  flex-direction: column;
  margin: 16px 0;
  padding: 8px;
}

.question-block label {
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 16px;
}

.question-block input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #038FFF;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 16px;
  outline: none;
}

.question-block input[type="text"]:focus {
  border-color: #026fd0;
  box-shadow: 0 0 4px rgba(3, 143, 255, 0.4);
}

.question-block input.nmbr-inpt {
  display: inline-block;
  width: 60px; /* або 4ch для адаптивності */
  padding: 10px 12px;
  border: 2px solid #038FFF;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 16px;
  /* outline: none; */
  text-align: center;
  /* vertical-align: middle; */
}

.question-block input.nmbr-inpt:focus {
  border-color: #026fd0;
  box-shadow: 0 0 4px rgba(3, 143, 255, 0.4);
}

.vector-coords {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
}

.vector-coords span {
  font-weight: bold;
}

.vector-coords input.nmbr-inpt {
  width: 60px;
  padding: 6px 8px;
  font-size: 16px;
  text-align: center;
  border: 2px solid #038FFF;
  border-radius: 6px;
  box-sizing: border-box;
}

.vector-coords input.nmbr-inpt:focus {
  border-color: #026fd0;
  box-shadow: 0 0 4px rgba(3, 143, 255, 0.4);
}

@keyframes hide {
  0% {
    left: 0;
  }
  100% {
    left: -100%;
  }
}

@keyframes fide {
  0% {
    left: 200%;
  }
  100% {
    left: 0;
  }
}

@keyframes back_hide {
  0% {
    left: 0;
  }
  100% {
    left: 200%;
  }
}

@keyframes back_fide {
  0% {
    left: -100%;
  }
  100% {
    left: 0;
  }
}

.quizHide {
  animation: hide 1.5s;
}

.quizFide {
  animation: fide 1s;
}

.backHide {
  animation: back_hide 1.5s;
}

.backFide {
  animation: back_fide 1s;
}
#quiz-questions{
    position: relative;
}

#result-table {
  width: 100%;
  min-width: 320px; /* мінімум для мобільного */
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
  height: 100;
  overflow-y: scroll;
}

#result-table th,
#result-table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}


@media (max-width: 480px) {

  #result-table {
    font-size: 13px;
  }

  #result-table th,
  #result-table td {
    padding: 6px;
  }
  .article {
    overflow-y: auto;
    max-height: 100%;
  }
}


@media screen and (min-width: 48rem) {
    .container {
        padding: 2rem;
    }
    .contntent {
        display: flex;
        justify-content: center;
        align-items: center; 
        flex-direction: row;
        overflow: auto;
    }
    .contntent__image {
        width: 150%;
        height: 100%;
        overflow: hidden;
        text-align: center;
    }
    .contntent__image img {
        height: 100%;
        width: auto;
        object-fit: cover;
        object-position: center;
    }
    .wrapper {
        position: relative;
        padding: 1rem;
        overflow: visible;       
    }
    .overlay-block {
        position: absolute;
        padding: 0.8rem 1rem;
        border-radius: 0.8rem;
        height: auto;
        width: auto;
        z-index: 1;
        left: 51%;
        top: -70%
    }

    .overlay-block::after {
        content: "";
        position: absolute;
        bottom: -0.9rem; 
        left: 50%;
        margin-left: -1rem;
        width: 2rem;
        height: 1rem;
        background-color: var(--grey-900);
        clip-path: polygon(0 0, 50% 100%, 100% 0);
    }
    
    .article__description {
        position: relative;
        overflow-y: auto;
        max-height: 100%;
    }
}
@media screen and (min-width: 64rem) {
    .contntent {
        max-width: 46.625rem;
        
    }
    .article {
        padding: 0.5rem;
    }
    .overlay-block {
        left: 54%;
    }
}
@media (max-width: 23rem) {
  .share {
    padding: 0;
  }
  .social-icon img {
    margin: 0 0.5rem;
   }
}

.results {
  max-height: 400px;
  overflow-y: auto;
}
