body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    margin: 0px;
    padding: 0px;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

:root {
    --primary-blue: #1B4965;
    --secondary-blue: #5FA8D3;
    --white: #fdfaeb;
    --black: #000000;
    --red: #E63946;
}

header {
    width: calc(100% - 30px);
    position: static;
    top: 0;
    left: 0;
    background-color: var(--white);
    box-shadow: 0px 7px 22px -5px rgba(0, 0, 0, 0.271);

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

header img {
    width: 100px;
}

#header-wallet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.8rem 1.5rem;
    border-radius: 1rem;
    background-color: var(--primary-blue);
}

#header-wallet p {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: bold;
}

#Home {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);

    width: 100%;

    margin: 1rem auto;
    padding: 0 1rem;
}

main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: var(--white);

    width: 100%;

    margin: 1rem auto;
}

/* CARD */
.card {
    width: 420px;
    border-radius: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background-color: var(--white);
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cd-header {
    width: 100%;
    max-width: 100%;
    height: 320px;
    position: relative;
}

.cd-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.cd-div-avaliation {
    background-color: var(--primary-blue);
    width: auto;
}

.cd-avaliation {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    display: block;
    margin: 1.5rem auto;
    text-align: center;
    width: fit-content;
    font-size: 1.1rem;
    font-weight: bold;
}

.cd-name {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: var(--primary-blue);
    text-align: center;
    font-weight: bold;
}

.cd-quest {
    font-size: 1.8rem;
    margin: 2rem 0;
    text-align: center;
    color: #333;
    font-weight: 500;
}

.cd-certeza {
    background-color: var(--primary-blue);
    outline: none;
    border: none;

    color: var(--white);
    font-weight: bold;

    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
}

.cd-naosei {
    background-color: var(--red);
}

.cd-jamais {
    background-color: var(--black);
}

.cd-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cd-buttons button {
    width: 100%;
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3sease;
}

.cd-buttons svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cd-footer {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cd-foo-name {
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.1rem;
}

.cd-foo-progress {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.cd-foo-progress-bar {
    width: 20%;
    height: 100%;
    background-color: var(--primary-blue);
    transition: width 0.3sease;
}

/* ==========================================================================
     !Loading Styles
     ========================================================================== */
.loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

.loading-text {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
     !Modal Styles
     ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 500px;
}

/* Money Modal */
.money-modal-content {
    animation: slideIn 0.3s ease-out;
}

.check-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    color: var(--primary-blue);
}

.money-text {
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--primary-blue);
}

.amount {
    color: var(--red);
    font-weight: bold;
}

/* Welcome Modal */
.welcome-image {
    width: 200px;
    margin-bottom: 1rem;
}

.modal-content h1 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.bonus-amount {
    color: var(--red);
    font-size: 3rem;
    font-weight: bold;
    margin: 1.5rem 0;
}

.instructions {
    color: var(--primary-blue);
    font-weight: bold;
}

.btn-start {
    background-color: var(--primary-blue);
    color: white;
    width: 100%;
    margin-top: 1.5rem;
}

.btn-start.iniciando {
    background-color: #333;
    cursor: not-allowed;
}

/* ==========================================================================
     !Confetti Canvas
     ========================================================================== */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 500px;
}

/* Money Modal */
.money-modal-content {
    animation: slideIn 0.3s ease-out;
}

.check-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    color: var(--primary-blue);
    overflow: hidden;
}

.money-text {
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--primary-blue);
}

.amount {
    color: var(--red);
    font-weight: bold;
}



.completion-card, #promocao {
    text-align: center;
    padding: 2rem;
}

.completion-title {
    color: var(--red);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.completion-text {
    color: var(--primary-blue);
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.completion-balance {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin: 2rem 0;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-pix, .btn-promocao {
    background-color: var(--primary-blue);
    color: white;
    font-size: 1.5rem;
}

.pix-registration-card {
    text-align: center;
    padding: 2rem !important;
}

.pix-title {
    color: #E63946;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.pix-subtitle {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.pix-info-box {
    background-color: #f8f9fe;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
}

.pix-info-box p {
    color: var(--primary-blue);
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.pix-info-box p:last-child {
    margin-bottom: 0;
}

.pix-register-title {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin: 2rem 0;
}

.pix-select-text {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.pix-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.pix-option {
    background-color: #fff;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pix-option svg {
    opacity: 0;
    transition: opacity 0.2s;
}

.pix-option.active {
    background-color: var(--primary-blue);
    color: white;
}

.pix-option.active svg {
    opacity: 1;
}

.pix-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.btn-validate-pix {
    background-color: #ccc;
    color: white;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: not-allowed;
}

.exchange-page {
    max-width: 500px;
    width: 100%;
    border-radius: 20px;
    padding: 2rem;
}

.exchange-title {
    color: var(--red);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.exchange-subtitle {
    color: var(--primary-blue);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.exchange-center {
    padding: 1rem;
}

.exchange-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--red);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.exchange-rate {
    background-color: var(--primary-blue);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.exchange-rate h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.rate {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.update-time {
    font-size: 0.9rem;
    opacity: 0.8;
}

.balance-box {
    background-color: white;
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.balance-box.converted-value {
    border-color: var(--red);
    animation: fadeIn 0.5s ease-out;
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.converted-value .balance-header {
    color: var(--red);
}

.flag-icon {
    width: 24px;
    height: auto;
}

.currency {
    margin-left: auto;
    background: #f0f0f0;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.balance-amount.converted {
    color: var(--red);
}

.btn-convert {
    background-color: var(--primary-blue);
    color: white;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.btn-withdraw {
    background-color: var(--red);
    animation: fadeIn 0.5s ease-out;
}

.convert-instruction {
    text-align: center;
    color: var(--text-gray);
    font-size: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px){
    .btn-pix, .btn-validate-pix, .pix-input{
        width: 80%;
    }
}