@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --cor-principal: #c9a84c;
    --cor-principal-hover: rgba(201, 168, 76, 0.6);
    --cor-principal-sombra: rgba(201, 168, 76, 0.4);
    --cor-fundo-card: linear-gradient(135deg, #0a0f1e 0%, #0d1b2a 50%, #111827 100%);
    --cor-texto: #f0f0f0;
    --cor-texto-secundario: #8899aa;
    --cor-borda: rgba(201, 168, 76, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 50%, #f0f9ff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 40px 20px;
}

.header {
    text-align: center;
}

.titulo {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cor-principal);
}

.subtitulo {
    font-size: 16px;
    font-weight: 300;
    color: var(--cor-texto-secundario);
    margin-top: 6px;
    letter-spacing: 1px;
}

.taxas-container,
.container {
    background: #0d1b2a;
    background: var(--cor-fundo-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 900px;
    padding: 40px;
}

.taxas-titulo {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--cor-principal);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.taxas-update {
    text-align: center;
    font-size: 12px;
    color: var(--cor-texto-secundario);
    margin-bottom: 24px;
}

.taxas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.taxa-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(212, 161, 20, 0.5);
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.taxa-card:hover {
    transform: translateY(-3px);
    border-color: var(--cor-principal-hover);
    box-shadow: 0 0 8px var(--cor-principal-sombra);
}

.taxa-moeda {
    font-size: 18px;
    font-weight: 700;
    color: var(--cor-texto);
    text-align: center;
    margin-bottom: 12px;
}

.taxa-valores {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.taxa-valores span {
    font-size: 14px;
    color: var(--cor-texto-secundario);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    text-align: center;
}

.selects-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.select-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bandeira {
    font-size: 24px;
}

.select-box {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--cor-borda);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--cor-texto);
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.select-box:hover {
    border-color: var(--cor-principal-hover);
}

.select-box:focus {
    border-color: var(--cor-principal);
    box-shadow: 0 0 8px var(--cor-principal-sombra);
}

.select-box option {
    background: #0d1b2a;
    color: var(--cor-texto);
}

.btn-moeda {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--cor-principal);
    background: radial-gradient(circle at 35% 35%, #f0d060, #c9a84c 50%, #8a6a1a);
    font-size: 22px;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 4px 15px var(--cor-principal-sombra);
    perspective: 600px;
    transform-style: preserve-3d;
    flex-shrink: 0;
}

.btn-moeda:hover {
    box-shadow: 0 6px 20px var(--cor-principal-hover);
    transform: scale(1.08);
}

@keyframes coinSpin {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.btn-moeda.girando {
    animation: coinSpin 0.6s ease-in-out;
}

.btn-converter-moeda {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--cor-principal);
    background: radial-gradient(circle at 35% 35%, #f0d060, #c9a84c 50%, #8a6a1a);
    font-size: 28px;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 4px 20px var(--cor-principal-sombra);
    flex-shrink: 0;
}

.btn-converter-moeda:hover {
    box-shadow: 0 6px 28px var(--cor-principal-hover);
    transform: scale(1.08);
}

.btn-moeda:focus-visible,
.btn-converter-moeda:focus-visible {
    outline: 2px solid var(--cor-principal);
    outline-offset: 3px;
}

.btn-converter-moeda.girando {
    animation: coinSpin 0.6s ease-in-out;
}

.converter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.placeholder-box {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 1px solid var(--cor-borda);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--cor-texto);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.placeholder-box::placeholder {
    color: var(--cor-texto-secundario);
}

.placeholder-box:focus {
    border-color: var(--cor-principal);
    box-shadow: 0 0 8px var(--cor-principal-sombra);
}

.placeholder-box[readonly] {
    background: rgba(255, 255, 255, 0.03);
    color: var(--cor-principal);
    cursor: default;
}

@media (max-width: 768px) {
    .titulo {
        font-size: 26px;
    }

    .selects-row {
        flex-direction: column;
    }

    .select-wrapper {
        width: 100%;
    }

    .converter-row {
        flex-direction: column;
    }

    .taxas-grid {
        grid-template-columns: 1fr;
    }

    .taxas-container,
    .container {
        padding: 24px 20px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}