body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(120deg, #f0f0f0, #d7e4ef);
    transition: background-color 0.5s ease-in-out;
}

#app {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 25px;
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

#logo {
    text-align: center;
    padding: 20px 0;
    background-color: #ffffff;
    position: relative;
}

#logo img {
    max-width: 300px;
    height: auto;
}

.screen {
    display: none;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.screen.active {
    display: block;
}

h1, h2, h3 {
    text-align: center;
    color: #073E85;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
}

.instructions {
    font-size: 14px;
    color: #292929;
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;
}

#operations-list, #mandatory-list, #optional-list, #instrument-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#mandatory-list, #optional-list {
    list-style-type: decimal;
    margin-left: 20px;
}

button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-top: 20px;
    background-color: #073E85;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #052a5e;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

button:disabled {
    cursor: not-allowed;
    background-color: #292929;
    color: #9e9e9e;
}

#instrument-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

#instrument-list li {
    list-style: none;
    margin: 10px;
    text-align: center;
    cursor: pointer;
    width: calc(50% - 20px);
    max-width: 300px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

#instrument-list li img {
    width: 100%;
    height: auto;
    z-index: 1;
}

#instrument-list li:hover {
    transform: scale(1.05);
}

#instrument-list li.selected::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 62, 133, 0.5);
    pointer-events: none;
    border-radius: 10px;
    z-index: 2;
}

#instrument-list li.selected {
    box-shadow: 0 0 0 3px #073E85;
}

.details-preparation-result {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

#button-container {
    display: block;
    padding: 20px 0;
    margin-top: 20px;
}

#button-container button {
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    margin-top: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    box-sizing: border-box;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #073E85;
}

.modal-content p {
    font-size: 16px;
    color: #292929;
}

.discipline-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.modal-content button {
    display: block;
    width: 80%;
    max-width: 250px;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: #073E85;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}

.modal-content button:hover {
    background-color: #052a5e;
}

.hint {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #292929;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    transform: translateY(-20px);
}

.hint.show {
    opacity: 1;
    transform: translateY(0);
}

.hint.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.mobile-tooltip {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #292929;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s, transform 0.5s;
}

.mobile-tooltip.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes flash {
    0% {
        box-shadow: 0 0 0 0 rgba(7, 62, 133, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(7, 62, 133, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(7, 62, 133, 0);
    }
}

.pulse {
    animation: pulse 0.3s ease-in-out;
}

.flash {
    animation: flash 0.3s ease-in-out;
}

#rewards {
    margin: 30px auto;
    width: 100%;
    max-width: 800px;
}

#rewards-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

#rewards-list.show {
    opacity: 1;
}

#rewards-list li {
    list-style: none;
    margin: 10px;
    text-align: center;
    cursor: pointer;
    width: calc(50% - 20px);
    max-width: 300px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 1.2s, box-shadow 1.2s;
}

#rewards-list li a {
    display: block;
    width: 100%;
    height: 100%;
}

#rewards-list li img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

#rewards-list li:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.operation-result {
    margin-bottom: 15px;
    font-size: 18px;
}

.operation-name {
    font-weight: bold;
}

.operation-percentage {
    font-size: 1.5em;
    font-weight: bold;
    color: #073E85;
}

#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.popup h3 {
    margin-top: 0;
    color: #073E85;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
}

.popup p {
    font-size: 16px;
    color: #292929;
    margin-bottom: 15px;
}

.popup button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #073E85;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.popup button:hover {
    background-color: #052a5e;
}

#change-discipline {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #073E85;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

#change-discipline:hover {
    color: #052a5e;
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        background: #ffffff;
    }

    #app {
        padding: 15px;
        box-shadow: none;
    }

    .screen {
        padding-bottom: 20px;
    }

    #button-container {
        position: static;
        box-shadow: none;
        padding: 10px 0;
        margin-top: 20px;
    }

    #button-container button {
        padding: 14px 20px;
    }

    #instrument-list li,
    #rewards-list li {
        width: calc(100% - 20px);
    }
}