.generation-container {
    width: 100%;
    padding-bottom: 40px;
    padding-top: 12px;
    border-radius: 20px;
    margin-top: 20px;
    position: relative;
    border: 2px solid rgba(35, 255, 242, 0.25);
    background: rgba(255, 255, 255, 0.03);;
    box-shadow: 0 0 15px rgba(35, 255, 242, 0.15);
}

.generation-container h1 {
    text-align: center;
    font-size: calc(1.125rem + 1vw);
    margin-bottom: 30px;
    margin-top: 12px;
    color: white;
}

.wheel-prizes-link {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 5px;
    max-width: 210px;
    padding: 7px 10px;
    border-radius: 12px;
    position: relative;
    background: #1a1a1a;
    border: none;
    margin: 10px auto 0;
    text-decoration: none;
}

.wheel-prizes-link::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff, #ff0000);
    background-size: 400% 400%;
    border-radius: 14px;
    z-index: 0;
    animation: gradient-border 4s linear infinite;
}

.wheel-prizes-link:hover img {
    animation: swing 0.6s ease-in-out; /* Применение анимации */
}

@keyframes swing {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(7deg);
    }
    50% {
        transform: rotate(-7deg);
    }
    75% {
        transform: rotate(2deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes gradient-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.wheel-prizes-link span {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-wrap: nowrap;
}

.wheel-prizes-link img {
    position: relative;
    z-index: 1;
    height: 50px;
    aspect-ratio: 1 / 1;
}

.work-types-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0 auto 18px;
    padding: 0;
    width: 85%;
}

.work-types-list li {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--button-color);
    color: var(--button-color);
    border-radius: 4px;
    min-width: 135px;
    height: 46px;
    text-align: center;
    transition: all 0.5s ease;
}

.work-types-list li:hover {
    background-color: var(--button-color);
}

.work-types-list li:hover a {
    color: black;
}

.active-item {
    color: black!important;
    background-color: var(--button-color)!important;
}

.active-item a {
    color: black!important;
}

.work-types-list a {
    text-decoration: none;
    color: var(--button-color);
    padding: 12px 25px;
    width: 100%;
}

.form-container {
    width: 85%;
    margin: 0 auto;
}

#generation-form {
    width: 100%;
    display: flex;
    justify-content: center;
    column-gap: 10px;
}

#generation-form label {
    display: none;
}

#generation-form div {
    width: 81%;
}

#generation-form div input {
    width: 100%;
    height: 55px;
    border-radius: 10px;
    border: 2px solid var(--base-border-color);
    color: white;
    background: none;
    font-size: 1.125rem;
    padding-left: 12px;
    transition: 0.5s ease-in-out;
}

#generation-form div input:hover {
    border-color: var(--button-color);
}

#generate-button {
    width: 19%;
    height: 55px;
    border-radius: 10px;
    border: none;
    background-color: var(--button-color);
    box-shadow: 0 0 12px 0 var(--button-color);
    color: black;
    font-size: 1.25rem;
    cursor: pointer;
}

#generate-button:hover {
    background-color: #a7fffa;
}

#generation-form div input:focus {
    outline: none;
    box-shadow: 0 0 12px 0 var(--button-color);
}

.open-theme-generator {
    text-decoration: none;
    font-size: 1.125rem;
    color: var(--button-color);
    display: block;
    text-align: start;
    margin-top: 10px;
}

#generation-settings {
    width: 85%;
    margin: 15px auto 0;
}

#generation-settings label {
    font-size: 1.0625rem;
}

.settings-selects {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
}

#essay_type, #language {
    height: 35px;
    background-color: black;
    color: white;
    width: 210px;
    font-size: 1.0625rem;
    padding: 3px;
    border-radius: 6px;
}

#essay_type:focus, #language:focus {
    outline: none;
}

label[for="essay_type"] {
    margin-top: 8px;
}

#essay_type option, #language option {
    background-color: black;
}

#ege_fields, #painting_fields, .info-for-generation {
    display: flex;
    flex-direction: column;
    row-gap: 5px;
    margin-top: 12px;
}

#generation-settings textarea, #generation-settings input {
    width: 100%;
    height: 55px;
    border-radius: 10px;
    border: 2px solid var(--base-border-color);
    color: white;
    background: black;
    font-size: 1.125rem;
    padding-left: 12px;
    transition: 0.5s ease-in-out;
    outline: none;
}

#generation-settings textarea:hover , #generation-settings input:hover {
    border-color: var(--button-color);
}

#generation-settings textarea:focus, #generation-settings input:focus {
    box-shadow: 0 0 12px 0 var(--button-color);
}

#generation-settings input {
    max-width: 300px;
}

#generation-settings textarea {
    min-height: 300px;
    padding-top: 12px;
}

.custom-toc-container {
    width: 85%;
    margin: 15px auto 0;
}

.toc-toggle {
    cursor: pointer;
    display: flex;
    justify-content: start;
    align-items: center;
    color: white;
}

.toc-toggle {
    font-size: 1.25rem;
}

.toc-toggle:hover {
    color: var(--button-color);
    transition: 0.3s ease-in-out;
}

#toggle-arrow {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.contents-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    width: 100%;
    background-color: black;
    border-radius: 8px;
}

.contents-container.opened {
    max-height: 2000px;
    padding: 12px;
    margin: 10px auto 20px;
    border: 2px solid var(--base-border-color);
}

.contents-header {
    color: white;
    font-size: 1.1875rem;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--base-border-color);
}

.contents {
    font-size: 1.25rem;
    width: 100%;
    display: block;
    padding-left: 20px;
    margin-top: 3px;
    margin-bottom: 3px;
}

.contents:first-of-type {
    margin-top: 0;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 20px;
    gap: 10px;
}

.input-group:last-of-type {
    margin-bottom: 6px;
}

.input-group:first-of-type {
    margin-top: 6px;
}

.input-label {
    width: 10px;
    font-size: 1.0625rem;
    font-weight: bold;
    color: white;
}

.course {
    width: 23px;
}

.text-input, .chapter-title-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 2px solid var(--base-border-color);
    background: none;
    border-radius: 8px;
    color: white;
    font-size: 1.0625rem;
    height: 40px;
}

.text-input:focus, .chapter-title-input:focus {
    outline: none;
    border-color: var(--button-color);
    box-shadow: 0 0 12px 0 var(--button-color);
    transition: 0.3s ease-in-out;
}

.add-button {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.0625rem;
    font-weight: bold;
    margin-top: 15px;
}

.add-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.add-button:hover:not(.disabled) {
    background-color: #45a049;
}

.remove-button, .remove-point-button {
    background: #ff4444;
    color: white;
    font-size: 1.0625rem;
    border: none;
    border-radius: 50%;
    font-weight: bold;
    width: 26px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


.chapter {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
}

.chapter span {
    display: block;
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: white;
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.add-point-button {
    margin-top: 5px;
    margin-bottom: 5px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.0625rem;
}

.remove-chapter-button {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.chapter-title-input {
    flex: 1;
    margin-right: 10px;
    min-width: 180px;
}

#open-instruction {
    display: block;
    cursor: pointer;
    font-size: 1.125rem;
    background: none;
    border: 2px solid var(--button-color);
    color: white;
    border-radius: 8px;
    padding: 12px 40px;
    margin-top: 15px;
}

#open-instruction:hover {
    background-color: var(--button-color);
    color: black;
    transition: 0.4s ease-in-out;
}

@media (max-width: 768px) {
    #generation-form {
        flex-direction: column;
        align-items: center;
        row-gap: 10px;
    }
    #generation-form div {
        width: 95%;
    }
    #generate-button {
        width: 95%;
        max-width: none;
        margin-top: 5px;
    }
    .work-types-list {
        gap: 12px;
    }
    .work-types-list li {
        width: 45%;
    }
}

@media (max-width: 500px) {
    .form-container {
        width: 100%;
    }
    .work-types-list {
        width: 95%;
    }
    .work-types-list li {
        font-size: 1.0625rem;
        max-width: 130px;
        min-width: 100px;
    }
    .work-types-list a {
        padding: 10px 18px;
    }
    #generation-settings {
        width: 95%;
    }
    .custom-toc-container {
        width: 100%;
    }
    .toc-toggle {
        justify-content: center;
    }
    .wheel-prizes-link {
        padding: 0;
        max-width: 190px;
    }
    .wheel-prizes-link span {
        font-size: 1.0625rem;
    }
    .wheel-prizes-link img {
        width: 35px;
    }
    .open-theme-generator {
        text-align: center;
        padding-left: 0;
    }
    .contents-container.opened {
        border: none;
        border-top: 2px solid var(--base-border-color);
        border-bottom: 2px solid var(--base-border-color);
        border-radius: 0;
    }
}