* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    background-color: #66ccff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    font-family: "Chakra Petch", sans-serif;
    margin: 0;
}

/* Верхнее меню */
.top-menu {
    width: 100%;
    background-color: #1e425d;
    /* Цвет как у кнопок */
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

.menu-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
}

.menu_link {
    font-size: 0;
}

.completed {
    position: relative;
}

.completed::after {
    position: absolute;
    content: "";
    width: 35px;
    height: 35px;
    background: url("pixelcheckmark.png");
    background-size: cover;
    background-color: transparent;
    right: 0;
    top: 0;
    transform: translate(50%, -50%);
}

/* Логотип в меню */
.menu-logo {
    height: 60px;
}

/* Контейнер ссылок */
.menu-links {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 20px;
    color: white;
    font-weight: bold;
}

/* Кнопки меню */
.menu-btn {
    width: 60px;
    height: 60px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    color: white;
    font-weight: bold;
    position: relative;
    transition: 0.2s;
}

/* Эффект при наведении */
.menu-btn:hover {
    color: white;
    text-shadow: 2px 2px 0px black, 4px 4px 0px white;
}

/* Логотип на главной */
.logo {
    width: 500px;
    padding-top: 20px;
    margin-bottom: 20px;
}

@media (max-width: 500px) {
    .logo {
        width: 100%; /* Чтобы центрировать карточки */
    }
}



/* Таймер */
.countdown-container {
    font-size: 20px;
    font-weight: bold;
    color: black;
    margin-bottom: 20px;
}

/* Кнопки главного меню */
.btn {
    display: inline-block;
    text-decoration: none;
    font-size: 20px;
    color: white;
    width: 300px;
    padding: 15px 0;
    text-align: center;
    font-weight: bold;
    border: 4px solid white;
    position: relative;
    box-shadow: 6px 6px 0px black;
    transition: 0.2s;
    margin-bottom: 20px;
    background: #1e425d;
}

@media (max-height: 900px) {
    .btn {
        padding: 10px 0;
    }
}

/* Эффект при наведении */
.btn:hover {
    transform: translateY(6px);
    background: white;
    color: black;
    box-shadow: 0px 0px 0px black;
    border: 4px solid black;
}

.game-container {
    margin-top: 40px;
    min-width: 300px;
}

.round-info {
    font-size: 24px;
    width: 100%;
    text-align: center;
}

.difficulty-tag {
    background-color: transparent;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    color: #1e425d;
    text-transform: capitalize;
}

.characters-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 20px auto;
    flex-wrap: wrap;
}

.character-card {
    --curve-size: 0.5em;
    /* Define the curve size */
    background: transparent;
    padding: 15px;
    border: 4px solid black;
    box-shadow: 6px 6px 0px white;
    position: relative;
    border-image: url(pixel.png) 30 round;
    clip-path: polygon(
            /* Top-left */
            0% var(--curve-size),
            var(--curve-size) 0,
            /* top-right */
            100% 0,
            100% calc(100% - var(--curve-size)),
            /* bottom-right 1 */
            calc(100% - var(--curve-size)) 100%,
            /* bottom-right 2 */
            0 100%);
}

.character-card::after {
    position: absolute;
    content: "";
    z-index: -1;
    clip-path: polygon(
            /* Top-left */
            var(--border-width) calc(var(--curve-size) + var(--border-width) * 0.5),
            calc(var(--curve-size) + var(--border-width) * 0.5) var(--border-width),
            /* top-right */
            calc(100% - var(--border-width)) var(--border-width),
            calc(100% - var(--border-width)) calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
            /* bottom-right 1 */
            calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)) calc(100% - var(--border-width)),
            /* bottom-right 2 */
            var(--border-width) calc(100% - var(--border-width)));
}

.image-container {
    position: relative;
    padding-top: 300px;
    overflow: hidden;
    width: 200px;
    margin: 0 auto;
    /* opacity: 0; */
    /* ПОТОМ УБРАТЬ */
}

.image-container img {
    display: "none";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.input-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 3px solid white;
    box-shadow: -2px 2px 0px 0 black;
    background: transparent;
    color: white;
    transition: 0.2s;
    position: relative;
    display: block;

}


input:focus {
    border-color: #1e425d;
    outline: none;
}

.guess-btn:hover {
    display: inline-block;
    text-decoration: none;
    font-size: 20px;
    color: white;
    box-shadow: 6px 6px 0px black;
    transition: 0.2s;
    margin-bottom: 20px;
    background: #1e425d;
    display: block;
    cursor: pointer;
}

/* Эффект при наведении */
.guess-btn {
    display: block;
    color: black;
    width: auto;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 4px solid white;
    position: relative;
    transform: translateY(6px);
    background: white;
    margin: 0 auto;
    box-shadow: 0px 0px 0px black;
    border: 4px solid black;
    font-size: 16px;
}

.chardle_title {
    width: 100%;
    text-align: center;
}

.suggestions-list {
    position: absolute;
    width: calc(100% - 2px);
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 120px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f0f0f0;
}

.result-text {
    padding: 5px;
    font-weight: bold;
    text-align: center;
}

.correct {
    color: green;
}

.incorrect {
    color: red;
}

.bigimage-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    /* Центрирует контейнер по горизонтали */
}

.bigimage-container img {
    width: 100%;
    height: auto;
    /* Сохраняет пропорции изображения */
}

.clipdle_button-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.clipdle_button {
    background-color: #2c2c2c;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clipdle_button img {
    width: 20px;
    height: 20px;
}

.clipdle_button:hover {
    background-color: #444;
}

.clipdle_input-container,
.artdle-input-container,
.tagdle-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    position: relative;
}

.clipdle_input-field {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 3px solid white;
    box-shadow: -2px 2px 0px 0 black;
    background: transparent;
    color: white;
    transition: 0.2s;
    position: relative;
    display: block;

}

.clipdle_input-container button {
    transform: translateY(0);
}

.clipdle_input-container button:hover {
    margin-bottom: 0;
    font-size: 16px;
}

.clipdle_title-clue {
    display: none;
    width: 100%;
    text-align: center;
    padding-top: 10px;

}

.clipdle_title-title {
    letter-spacing: 2px;
}

.summary {
    width: 100%;
    max-width: 300px;
}

.summary_container {
    display: flex;
    align-items: center;
    background-color: #1e425d;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    margin-top: 50px;
}

.summary_image {
    position: relative;
    padding-top: 300px;
    width: 200px;
}

.summary_image>img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary_text {
    margin-left: 15px;
    color: #ffffff;
}

.summary_title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.summary_year {
    font-size: 18px;
    color: #fff;
    margin: 5px 0;
    margin-bottom: 20px;
}

.summary_score {
    border-radius: 5px;
    display: inline-flex;
    flex-direction: column;
    text-transform: uppercase;
}

.summary_score_thumb {
    align-self: flex-start;
    background-color: white;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: .5em .75em;
    position: relative;
    color: black
}

.summary_score_thumb {
    border-style: solid;
    border-width: 3px;
    border-color: #000;
    border-image-source: url("border-3.png");
    border-image-slice: 160;
    /* How the image is sliced */
    border-image-width: 2;
    /* Width of the border image */
    border-image-outset: 0;
    /* How far the border image is from the border box */
    border-image-repeat: round;
    /* How the image is repeated */
    border-radius: 14px;
    transform: translateY(10px);
    margin: 0 auto;
    z-index: 10000;
}


.summary_score_number {
    background-color: #66ccff;
    border-radius: 5px;
    border-top-left-radius: 0;
    font-weight: 700;
    padding: .2em .5em;
    text-align: center;
    font-size: 30px;
    color: black;

    /* Добавление стилей из .pixel-borders */
    position: relative;
    display: inline-block;
    padding: 15px 20px;
}

.pixel_border,
.character-card,
.guess-btn,
.final_summary_total,
.artdle-imagebox,
.game_block, 
.game_tag {
    position: relative;
    border-style: solid;
    border-width: 4px;
    border-color: #000;
    border-image-source: url("border-3.png");
    border-image-slice: 160;
    /* How the image is sliced */
    border-image-width: 2;
    /* Width of the border image */
    border-image-outset: 0;
    /* How far the border image is from the border box */
    border-image-repeat: round;
    /* How the image is repeated */

}

@supports (border-image-source: none) {

    .pixel_border,
    .character-card,
    .guess-btn,
    .final_summary_total,
    .game_block,
    .game_tag {
        border-radius: 20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
        border-bottom-left-radius: 20px;
    }
}

@supports (border-image-source: none) {
    .summary_score_number {
        border-radius: 20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
        border-bottom-left-radius: 20px;
    }
}

.summary_score_number {
    border-style: solid;
    border-width: 4px;
    border-color: #000;
    border-image-source: url("border-3.png");
    border-image-slice: 160;
    /* How the image is sliced */
    border-image-width: 2;
    /* Width of the border image */
    border-image-outset: 0;
    /* How far the border image is from the border box */
    border-image-repeat: round;
    /* How the image is repeated */
}

.final_summary_container {
    text-align: center;
    background-color: #1e425d;
    /* Тёмный фон */
    color: white;
    /* Белый текст */
    padding: 20px;
}

.chardle_title {
    font-size: 24px;
    margin-bottom: 10px;
}

.final_summary_total {
    font-size: 36px;
    margin-bottom: 20px;
    background-color: #66ccff;
    /* Розовый фон */
    padding: 10px 20px;
    display: inline-block;
    color: black;
}


.final_summary_rounds {
    margin-top: 20px;
}

.final_summary_round {
    margin-bottom: 15px;
    line-height: 1.1;
    font-size: 17px;
}

.final_summary_round span {
    display: block;
    margin-bottom: 4px;
}

.final_summary_round .final_summary_round {
    color: #66ccff;
    /* Розовый текст для раунда */
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 0;
}

.final_summary_name {
    font-style: italic;
    font-size: 14px;
}

.final_summary_score {
    font-size: 24px;
}

.final_summary_finalButton:hover {
    display: inline-block;
    text-decoration: none;
    font-size: 20px;
    color: white;
    box-shadow: 6px 6px 0px black;
    transition: 0.2s;
    margin-bottom: 20px;
    background: #1e425d;
    display: block;
    cursor: pointer;
}

/* Эффект при наведении */
.final_summary_finalButton {
    display: block;
    color: black;
    width: auto;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 4px solid white;
    position: relative;
    transform: translateY(6px);
    background: white;
    margin: 0 auto;
    box-shadow: 0px 0px 0px black;
    border: 4px solid black;
    font-size: 20px;
}

.suggestionContainer {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    display: none;
    position: absolute;
    background-color: white;
    z-index: 1000;
    transform: translateY(59px);
}

.char_round_score {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0 auto;
}

.char_round_score>h2 {
    margin-bottom: 0;
}

.char_round_score>h2:last-child {
    padding: 0;
}

.artdle-imagebox {
    position: relative;
    padding-top: 300px;
    width: 300px;
    overflow: hidden;

}

.artdle-imagebox>img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(4);
}

#artdle-input-container,
#tagdle-input-container {
    display: flex;
    width: 300px;
    align-items: center;
    position: relative;
}

#artdle-autofill,
#tagdle-autofill {
    flex: 1;
    /* Занимает оставшуюся ширину */
    padding: 5px;
    margin-right: 5px;
    height: 55px;
    /* Отступ между инпутом и кнопкой */
    font-size: "Chakra Petch", sans-serif;
}

.ui-menu-item,
.ui-widget {
    font-family: 'Chakra Petch', sans-serif !important;
}

#artdle-submit,
#tagdle-submit {
    padding: 5px 10px;
    margin-top: 0;
    transform: translate(0);
    font-size: 16px;
}

#artdle-submit:hover,
#tagdle-submit:hover {
    font-size: 16px;
    transform: translateY(7px);
}

.artdle-imagebox {
    border-image-width: 6px;
    border-width: 7px;
    margin-bottom: 20px;
}

#tagdle-results {
    margin: 0 auto;
}

#artdle-results,
#tagdle-results {
    width: 100%;
    max-width: 300px;
    padding-top: 20px;
}

#artdle-results>div,
#tagdle-results>div {
    width: 100%;
    text-align: center;
}

.cookie-alert {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    max-width: 320px;
    padding: 1rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 20px 20px 30px rgba(0, 0, 0, .05);
    transform: translate(-30px, -30px);
    z-index: 1000;
}

.title {
    font-weight: 600;
    color: rgb(31 41 55);
    display: flex;
    align-items: center;
    font-size: 20px;
  }
  
  .description {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: rgb(75 85 99);
  }
  
  .description a {
    --tw-text-opacity: 1;
    color: rgb(59 130 246);
  }
  
  .description a:hover {
    -webkit-text-decoration-line: underline;
    text-decoration-line: underline;
  }
  
  .actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    -moz-column-gap: 1rem;
    column-gap: 1rem;
    flex-shrink: 0;
  }
  
  .pref {
    font-size: 0.75rem;
    line-height: 1rem;
    color: rgb(31 41 55 );
    -webkit-text-decoration-line: underline;
    text-decoration-line: underline;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background-color: transparent;
  }
  
  .pref:hover {
    color: rgb(156 163 175);
  }
  
  .pref:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
  }
  
  .accept {
    font-size: 0.75rem;
    line-height: 1rem;
    background-color: rgb(17 24 39);
    font-weight: 500;
    border-radius: 0.5rem;
    color: #fff;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    border: none;
    transition: all .15s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .accept:hover {
    background-color: rgb(55 65 81);
    cursor: pointer;
  }
  
  .accept:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  .cookie-image {
    height: 40px;
    margin-right: 10px;
  }

  .footer {
    background-color: #1e425d;
    color: white;
    padding: 20px;
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
}



.copyright {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
}

.footer_links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer_link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

.footer_link:hover {
    color: #66ccff;
}

.footer_link::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s;
  }
  .footer_link:hover {
    color: white;
  }
  .footer_link:hover:after {
    transform-origin: bottom left;
    transform: scaleX(1);
  }

  @media (max-height: 800px) {
    .footer {
        position: relative; /* Чтобы центрировать карточки */
    }
}

@media (max-width: 800px) {
    .menu-links > span {
        display: none; /* Чтобы центрировать карточки */
    }

    .menu-links {
        gap: 5px;
    }
}

.game_block {
    width: 100%;
    max-width: 600px;
    min-width: 400px;
    padding: 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;

}

.game_tag {
    background-color: white;
    padding: 5px 10px;
    font-size: 20px;
    position: relative;
    font-weight: 700;
    color: #000;
    overflow: hidden;
  }
  
  /* Glitch effect for 1s */
  .glitch {
    animation: shift 0.2s ease-in-out forwards;
  }
  
  .glitch:before,
  .glitch:after {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    width: 100%;
    color: #000;
    overflow: hidden;
    background: white;
    animation-fill-mode: forwards;
  }
  
  .glitch:before {
    left: -2px;
    text-shadow: -1px 0 #00ffff;
    animation: noise-before 0.6s linear forwards;
  }
  
  .glitch:after {
    left: 2px;
    text-shadow: 1px 0 #ff00ff;
    animation: noise-after 0s linear forwards;
  }
  
  @keyframes shift {
    0%, 40%, 100% {
      transform: skewX(0deg);
    }
    41% { transform: skewX(10deg); }
    42% { transform: skewX(-10deg); }
    59% { transform: skewX(40deg) skewY(10deg); }
    60% { transform: skewX(-40deg) skewY(-10deg); }
    63% { transform: skewX(10deg) skewY(-5deg); }
    70% { transform: skewX(-50deg) skewY(-20deg); }
    71% { transform: skewX(10deg) skewY(-10deg); }
  }
  
  @keyframes noise-before {
    0% { clip: rect(10px, 9999px, 20px, 0); }
    20% { clip: rect(30px, 9999px, 10px, 0); }
    40% { clip: rect(5px, 9999px, 25px, 0); }
    60% { clip: rect(15px, 9999px, 10px, 0); }
    80% { clip: rect(20px, 9999px, 30px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
  }
  
  @keyframes noise-after {
    0% { clip: rect(15px, 9999px, 10px, 0); }
    20% { clip: rect(5px, 9999px, 25px, 0); }
    40% { clip: rect(25px, 9999px, 5px, 0); }
    60% { clip: rect(0px, 9999px, 20px, 0); }
    80% { clip: rect(10px, 9999px, 15px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
  }
  
  #tagdle-attempts {
    text-align: center;
  }

  .surrender_block {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.surrender_image {
    height: 40px;
    margin-right: 10px;
}

.surrender_text {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 15px;
}

.surrender_par {
    margin: 0;
    padding: 0;
}

#tagdle-surrender {
    padding: 0;
    margin: 0;
    font-size: 15px;
    background: none;
    border: none;
    cursor: pointer;
}

#tagdle-surrender:hover {
    background: none;
    border: none;
}
