@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    background-color: #131313;
}

main {
    margin: 0 auto;
    padding: 20px;
    color: #fff;
    background-color: #131313;
    border-radius: 8px;
}

.user-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #fff;
}

#answer {
    color: #fff;
    background-color: transparent;
    border: #0a2373 2px solid;
    border-radius: 0.5rem;
    padding: 0.3rem;
}

#btn-submit {
    background-color: transparent;
    border: 2px solid #0a2373;
    border-radius: 0.5rem;
    padding: 0.3rem;
    color: #a0a0a0;
}

#btn-submit:hover {
    color: #fff;
    border: 2px solid #fff;
    transition: 0.5s ease-in-out;
}

section#header {
    text-align: center;
    margin-bottom: 20px;
}

div#riddle {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
}

div#riddle h3 {
    margin-top: 1rem;
}

.riddle-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

section#rank {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#ranking-table {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: separate;
    border-spacing: 0;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

#ranking-table thead {
    background: linear-gradient(135deg, #0a2373, #520ba8);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#ranking-table th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
}

#ranking-table tbody tr:nth-child(even) {
    background-color: #282828;
}

#ranking-table tbody tr:nth-child(odd) {
    background-color: #282828;
}

#ranking-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

#ranking-table td:first-child {
    font-weight: bold;
    color: #6e8efb;
}

#ranking-table tbody tr:nth-child(1) {
    background-color: #232323;
}

#ranking-table tbody tr:nth-child(1) td:first-child {
    color: #ffc107;
    font-size: 16px;
}

#ranking-table tbody tr:nth-child(2) {
    background-color: #242424;
}

#ranking-table tbody tr:nth-child(3) {
    background-color: #252525;
}

#ranking-table tbody tr:nth-child(4) {
    background-color: #262626;
}

#ranking-table tbody tr:nth-child(5) {
    background-color: #272727;
}

#ranking-table td:nth-child(3) {
    font-weight: bold;
    color: #4caf50;
}

#ranking-table td:nth-child(4) {
    color: white;
    font-size: 13px;
}

#ranking-table tbody tr:nth-child(1) td:first-child::before {
    content: "🥇";
    margin-right: 5px;
}

#ranking-table tbody tr:nth-child(2) td:first-child::before {
    content: "🥈";
    margin-right: 5px;
}

#ranking-table tbody tr:nth-child(3) td:first-child::before {
    content: "🥉";
    margin-right: 5px;
}

.congratulations-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#form-rank {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#username {
    text-align: center;
    color: #fff;
    background-color: transparent;
    border: #0a2373 2px solid;
    border-radius: 0.5rem;
    padding: 0.3rem;
}


#btn-submit-2 {
    background-color: transparent;
    border: 2px solid #0a2373;
    border-radius: 0.5rem;
    padding: 0.3rem;
    color: #ffffff;
}

#btn-submit-2:hover {
    color: #fff;
    border: 2px solid #fff;
    transition: 0.5s ease-in-out;
}

#waiting, #no-enigma {
    text-align: center;
}

.back-button, .rank-button {
    margin-top: 20px;
    text-align: center;
}

.back-button a, .rank-button a{
    text-decoration: none;
    color: #fff;
    background-color: transparent;
    border: 1px solid #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}

.back-button a:hover, .rank-button a:hover {
    background-color: #fff;
    color: #131313;
    transition: 0.3s ease-in-out;
}

.p-riddle {
    font-size: 1.1rem;
    text-align: center;
}