/* style.css */

body {
    font-family: Arial, sans-serif;
    color: #333;
    margin: 1rem;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cdn.suwalls.com/wallpapers/games/ragnarok-online-characters-54301-1920x1080.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.pix-box {
    background-color: rgba(255, 255, 255, 0.95); /* Fundo levemente transparente para contraste */
    max-width: min(90%, 400px);
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
    z-index: 1;
}

.pix-box p {
    font-size: 1rem;
    margin: 0.75rem 0;
}

.pix-box strong {
    color: #555;
}

.pending {
    color: #e67e22;
    font-weight: bold;
}

.completed {
    color: #27ae60;
    font-weight: bold;
}

.canceled {
    color: #c0392b;
    font-weight: bold;
}

.qr {
    margin: 1.25rem 0;
}

.qr img {
    max-width: 100%;
    width: min(100%, 300px);
    height: auto;
    display: block;
    margin: 0 auto;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

input[readonly] {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    user-select: all;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input[readonly]:hover {
    cursor: url('/pix/images/ragnarok hand (press state).cur'), pointer; /* Ragnarok hand cursor on hover */
}

input[readonly]:focus {
    border-color: #3498db;
    outline: none;
}

#countdown {
    font-weight: bold;
    font-size: 1.1rem;
    color: #e67e22;
    margin-top: 0.6rem;
}

footer {
    max-width: min(90%, 400px);
    margin: 1.25rem auto;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.95); /* Fundo levemente transparente */
    padding: 0.5rem;
    border-radius: 8px;
}

footer p {
    margin: 0.5rem 0;
}

footer p:last-child {
    font-size: 0.75rem;
    color: #888;
}

/* Estilizar outros elementos clicáveis */
a:hover, button:hover {
    cursor: url('/pix/images/ragnarok-hand-press.cur'), pointer; /* Cursor para links e botões */
}

/* Media Query para telas menores que 600px (smartphones) */
@media screen and (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .pix-box {
        padding: 1rem;
    }

    .pix-box p {
        font-size: 0.9rem;
    }

    .qr img {
        width: min(100%, 200px);
    }

    input[readonly] {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    #countdown {
        font-size: 1rem;
    }

    footer {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    footer p:last-child {
        font-size: 0.7rem;
    }
}

/* Media Query para telas muito pequenas (abaixo de 400px) */
@media screen and (max-width: 400px) {
    h1 {
        font-size: 1.2rem;
    }

    .pix-box {
        padding: 0.8rem;
    }

    .pix-box p {
        font-size: 0.8rem;
    }

    .qr img {
        width: min(100%, 150px);
    }

    input[readonly] {
        font-size: 0.7rem;
        padding: 0.4rem;
    }

    #countdown {
        font-size: 0.9rem;
    }

    footer {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    footer p:last-child {
        font-size: 0.6rem;
    }
}

/* Popup modal */
.popup-overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.popup {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.popup button {
    margin-top: 20px;
    padding: 8px 16px;
    background: #28a745;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}
.expired { color: #d9534f; font-weight: bold; }
.unknown { color: #777; font-weight: bold; } /* Adicionado para consistência */
.hidden { display: none; } /* Para esconder elementos via JS */