:root {
    --primary-color: #00b9ff;
    --secondary-color: #0077c8;
    --background-color: #f9f9f9;
    --text-color: #2e4369;
    --border-color: #e6e8eb;
    --success-color: #26c281;
    --error-color: #e74c3c;
    --info-color: #00b9ff;
    --bg-color: #ffffff;
    --input-bg: #f9f9f9;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --hover-color: #f2f5f7;
    --bg-secondary: var(--bg-color);
    --bg-tertiary: var(--input-bg);
    --bg-hover: var(--hover-color);
    --text-primary: var(--text-color);
    --text-secondary: var(--text-color);
    --shadow-sm: var(--card-shadow);
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    margin-top: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.page-header h1 i {
    color: var(--primary-color);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
}

main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Formulário */
.converter-form {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    width: 100%;
    transition: box-shadow 0.3s ease;
}

.converter-form:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 185, 255, 0.25);
}

.form-control:hover {
    border-color: #2E4369;
}

/* Estilo para campos com erro */
.form-control.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25) !important;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Seletores de moeda */
.currency-selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.swap-btn {
    background-color: var(--primary-color);
    color: white;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
    animation: pulse 2s infinite;
}

.swap-btn:hover {
    background-color: #2E4369;
    transform: rotate(180deg);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.swap-btn:active {
    transform: scale(0.95) rotate(180deg);
}

.swap-btn i {
    font-size: 1.2rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 185, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(0, 185, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 185, 255, 0);
    }
}

/* Resultado */
.result {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.exchange-rate {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 1.5rem 0;
    font-weight: 600;
    text-align: center;
}

.last-update {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background-color: var(--success-color);
    color: white;
}

.toast-error {
    background-color: var(--error-color);
    color: white;
}

.toast-info {
    background-color: var(--info-color);
    color: white;
}

/* Estilos para o gráfico e informações de variação */
.chart-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin: 20px 0;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.chart-container.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.chart-container.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-color-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
}

.chart-tabs {
    display: flex;
    gap: 5px;
}

.chart-tab {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--input-bg);
    color: var(--text-color-light);
    transition: all 0.2s ease;
}

.chart-tab:hover {
    background-color: #2E4369;
    color: white;
}

.chart-tab.active {
    background-color: var(--primary-color);
    color: white;
}

.chart-body {
    height: 250px;
    position: relative;
}

/* Estilos para informações de variação */
.variation-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--input-bg);
    margin-left: auto;
    min-width: 200px;
}

.variation-main {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 16px;
}

.variation-main small {
    font-weight: normal;
    font-size: 12px;
    opacity: 0.7;
    margin-left: 5px;
}

.variation-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
}

.variation-stat {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.variation-stat span {
    font-weight: 500;
    color: var(--text-color-light);
}

.variation-info.positive {
    border-left: 3px solid var(--success-color);
}

.variation-info.negative {
    border-left: 3px solid var(--error-color);
}

.variation-info.positive .variation-main {
    color: var(--success-color);
}

.variation-info.negative .variation-main {
    color: var(--error-color);
}

/* Responsividade para o gráfico */
@media (max-width: 768px) {
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .variation-info {
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
    }
    
    .chart-body {
        height: 250px;
        width: 100%;
        overflow-x: hidden;
    }
    
    .chart-header h3 {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .variation-info {
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 10px;
        background-color: rgba(0, 0, 0, 0.03);
    }
    
    .variation-main {
        justify-content: center;
        font-size: 18px;
    }
    
    .variation-details {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .chart-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        display: flex;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .chart-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }
    
    .chart-tab {
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .chart-body {
        height: 200px;
        min-height: 200px;
        width: 100%;
        overflow: hidden;
    }
    
    .chart-container {
        padding: 10px;
        margin-bottom: 20px;
        border-radius: 10px;
        min-height: 350px;
    }
    
    canvas#exchange_rate_chart {
        width: 100% !important;
        height: 100% !important;
    }
    
    .variation-details {
        font-size: 11px;
    }
    
    .variation-info {
        padding: 8px;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    .variation-main {
        font-size: 16px;
    }
    
    .variation-main small {
        font-size: 10px;
    }
    
    .variation-stat {
        padding: 2px 0;
    }
    
    .chart-header h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
}

/* Animação de carregamento */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Estilos para o tooltip personalizado do gráfico */
.chartjs-tooltip {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 10px !important;
    font-size: 13px !important;
    pointer-events: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--primary-color) !important;
}

/* Estilos para o modo escuro */
@media (prefers-color-scheme: dark) {
    .chart-container.loading::after {
        background-color: rgba(30, 30, 30, 0.7);
    }
    
    .variation-info {
        background-color: var(--card-bg-dark);
    }
    
    .chartjs-tooltip {
        background-color: rgba(40, 40, 40, 0.95) !important;
        border: 1px solid var(--primary-color-dark) !important;
    }
}

/* Estilos RTL para o gráfico */
.rtl .variation-info {
    margin-left: 0;
    margin-right: auto;
}

.rtl .variation-info.positive {
    border-left: none;
    border-right: 3px solid var(--success-color);
}

.rtl .variation-info.negative {
    border-left: none;
    border-right: 3px solid var(--error-color);
}

.rtl .variation-stat {
    flex-direction: row-reverse;
}

.rtl .variation-main small {
    margin-left: 0;
    margin-right: 5px;
}

.rtl .chart-tabs {
    direction: ltr; /* Manter a direção das abas para garantir que a ordem dos períodos seja correta */
}

/* Animação para destacar mudanças nos valores */
@keyframes highlight {
    0% { background-color: rgba(var(--primary-rgb), 0.2); }
    100% { background-color: transparent; }
}

.highlight-change {
    animation: highlight 1.5s ease-out;
}

/* Footer */
.page-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    gap: 0.5rem;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Estados */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error {
    border-color: var(--error-color) !important;
    animation: shake 0.5s;
}

.highlight {
    animation: highlight 1s ease-out;
}

/* Temas escuro/claro */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #121a2b;
        --text-color: #f3f4f6;
        --border-color: #2e3a54;
        --bg-color: #1a2234;
        --input-bg: #232f46;
        --hover-color: #2a3754;
        --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    body {
        background-color: var(--background-color);
    }

    .form-control {
        background-color: var(--input-bg);
        color: var(--text-color);
    }

    .highlight {
        animation: highlightDark 1s ease-out;
    }

    .chart-container::before {
        background-color: rgba(30, 30, 30, 0.8);
    }
    
    canvas {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .chart-container.loading::before {
        background-color: rgba(30, 30, 30, 0.8);
    }
    
    .chart-container.loading::after {
        border-color: rgba(255, 255, 255, 0.2);
        border-top-color: var(--primary-color);
    }
    
    .variation-info.positive {
        background-color: rgba(38, 194, 129, 0.2);
    }
    
    .variation-info.negative {
        background-color: rgba(231, 76, 60, 0.2);
    }
}

@keyframes highlightDark {
    0% { background-color: rgba(0, 185, 255, 0.2); }
    100% { background-color: transparent; }
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .converter-form {
        padding: 24px;
    }
    
    .currency-selectors {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .swap-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        margin: 10px auto;
        z-index: 3;
    }
    
    .swap-btn:hover {
        transform: rotate(90deg) scale(1.1);
    }
    
    .form-control {
        font-size: 16px; /* Evitar zoom em dispositivos móveis */
    }
    
    .page-header h1 {
        font-size: 2rem;
        word-break: keep-all;
        white-space: nowrap;
    }
    
    .page-header p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    .chart-container {
        padding: 16px;
        margin-top: 10px;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .feature-card i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        padding: 0.8rem;
    }
    
    .convert-btn {
        padding: 0.7rem;
    }
    
    .result {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .exchange-rate {
        font-size: 1rem;
        margin: 1rem 0;
    }
    
    .info-box {
        padding: 10px;
        margin-top: 1rem;
    }
    
    .info-box p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .page-header {
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
        white-space: nowrap;
        overflow: visible;
    }
    
    .page-header p {
        font-size: 0.9rem;
        padding: 0 5px;
        line-height: 1.3;
    }
    
    .converter-form {
        padding: 15px;
        border-radius: 10px;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .currency-selectors {
        gap: 0.5rem;
    }
    
    .swap-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        margin: 8px auto;
    }
    
    .chart-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        margin-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .chart-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .chart-tab {
        flex: 0 0 auto;
        padding: 6px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .chart-header h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .features-container {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .feature-card {
        padding: 12px;
    }
    
    .feature-card i {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }
    
    .feature-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .feature-card p {
        font-size: 0.75rem;
        min-height: auto;
    }
    
    .search-tip {
        font-size: 0.7rem;
    }
    
    .variation-info {
        padding: 8px;
        margin-top: 8px;
    }
    
    .variation-main {
        font-size: 14px;
    }
    
    .variation-details {
        font-size: 11px;
    }
    
    .variation-stat {
        padding: 3px 0;
    }
    
    .chart-body {
        height: 180px;
        min-height: 180px;
    }
    
    @media (prefers-color-scheme: dark) {
        .chart-container {
            background-color: var(--bg-color);
        }
        
        .variation-info {
            background-color: rgba(30, 30, 30, 0.5);
        }
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 360px) {
    .page-header h1 {
        font-size: 1.4rem;
        letter-spacing: -0.5px;
    }
    
    .page-header p {
        font-size: 0.8rem;
        padding: 0;
    }
    
    .form-control {
        padding: 0.7rem;
        font-size: 14px;
    }
    
    .convert-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .chart-tab {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .chart-body {
        height: 160px;
        min-height: 160px;
    }
    
    .feature-card i {
        font-size: 1.2rem;
    }
    
    .feature-card h3 {
        font-size: 0.85rem;
    }
    
    .feature-card p {
        font-size: 0.7rem;
    }
}

/* Estilos para os novos elementos */

/* Input com ícone */
.input-with-icon, .select-with-icon {
    position: relative;
}

.input-with-icon i, .select-with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.5;
    pointer-events: none;
}

.success-icon {
    color: var(--success-color) !important;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-container.has-value .success-icon {
    opacity: 1;
    transform: scale(1);
}

/* Info box */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: rgba(0, 185, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 3px solid var(--primary-color);
    animation: fadeIn 0.5s ease-in-out;
}

.info-box i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 2px;
}

.info-box p {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* Chart header */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Chart footer */
.chart-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Features */
.features-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #2E4369;
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-card:hover i {
    color: #2E4369;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Footer */
.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    gap: 0.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 0 0.8rem;
    position: relative;
    cursor: pointer;
    display: inline-block;
    z-index: 1;
}

.footer-links a:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -3px;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

.footer-links a:hover {
    color: #2E4369;
    opacity: 1;
    text-decoration: underline;
}

/* Responsivo para os novos elementos */
@media (max-width: 768px) {
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .features-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }
    
    .footer-links {
        justify-content: center;
        margin-top: 1rem;
        gap: 0.5rem;
    }
    
    .footer-links a {
        padding: 0.5rem 0.8rem;
        margin: 0.3rem 0;
    }
    
    .footer-links a:not(:last-child)::after {
        right: -2px;
    }
}

/* Melhorar a responsividade para dispositivos muito pequenos */
@media (max-width: 380px) {
    .currency-selectors {
        flex-direction: column;
        gap: 15px;
    }
    
    .swap-btn {
        transform: rotate(90deg);
        margin: 10px auto;
    }
    
    .chart-tabs {
        flex-wrap: wrap;
    }
    
    .chart-tab {
        flex: 1 1 calc(50% - 10px);
        min-width: 80px;
        margin-bottom: 5px;
    }
}

/* Adicionar animação de carregamento para o gráfico */
.chart-container::before {
    opacity: 0;
    transition: opacity 0.3s;
}

/* Melhorar a aparência dos inputs */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 185, 255, 0.25);
}

/* Melhorar a aparência do toast */
.toast {
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Adicionar animação para o ícone de sucesso */
.success-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Melhorar a aparência dos cards de recursos */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card i {
    transition: transform 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.2);
}

/* Adicionar efeito de hover para os links do rodapé */
.footer-links a:hover {
    color: #2E4369;
    opacity: 1;
    text-decoration: underline;
}

/* Melhorar a aparência da caixa de informações */
.info-box {
    border-left: 3px solid var(--primary-color);
    animation: fadeIn 0.5s ease-in-out;
}

/* Adicionar animação para o título da página */
.page-header:hover h1 i {
    transform: rotate(180deg);
}

/* Melhorar a aparência do select */
.select-with-icon select {
    cursor: pointer;
    appearance: none;
}

.select-with-icon i {
    pointer-events: none;
    transition: transform 0.2s ease;
}

.select-with-icon:hover i {
    color: #2E4369;
}

/* Adicionar animação para o valor convertido */
.highlight {
    animation: highlight 1s ease-out;
}

/* Melhorar a aparência do gráfico */
canvas {
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Estilos para o cabeçalho com seletor de idioma */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    flex: 1;
}

.language-selector {
    margin-left: 20px;
}

.language-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
}

.language-select:hover {
    border-color: #2E4369;
    color: #2E4369;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 185, 255, 0.25);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .logo-container {
        text-align: center;
        margin-bottom: 5px;
        margin-top: 30px;
    }
    
    .language-selector {
        margin-left: 0;
        margin-top: 5px;
        align-self: center;
    }
    
    .page-header {
        padding: 10px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .logo-container {
        text-align: center;
        width: 100%;
        margin-top: 30px;
    }
    
    .language-selector {
        margin-top: 8px;
        align-self: center;
    }
    
    .page-header {
        padding: 5px 0;
        margin-bottom: 15px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
        margin-bottom: 3px;
    }
    
    .page-header h1 i {
        font-size: 1.4rem;
    }
}

@media (max-width: 360px) {
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .language-select {
        padding: 6px 10px;
        font-size: 13px;
        padding-right: 25px;
        background-position: right 6px center;
    }
}

/* Estilo para a dica de pesquisa */
.search-tip {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
    text-align: right;
}

.search-tip i {
    margin-right: 3px;
    font-size: 0.75rem;
}

/* Melhorar a aparência dos selects com muitas opções */
.currency-select {
    transition: all 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0099ff #f0f0f0;
}

.currency-select::-webkit-scrollbar {
    width: 8px;
}

.currency-select::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.currency-select::-webkit-scrollbar-thumb {
    background: #0099ff;
    border-radius: 4px;
}

.currency-select::-webkit-scrollbar-thumb:hover {
    background: #007acc;
}

.currency-select option {
    padding: 8px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.currency-select option:checked {
    background-color: #0099ff;
    color: white;
}

.currency-select option:hover {
    background-color: #e6f3ff;
}

.currency-select optgroup {
    font-weight: 600;
    color: #333;
    padding: 8px 0;
    transition: opacity 0.3s ease;
}

.currency-select optgroup[style*="display: none"] {
    opacity: 0;
    height: 0;
    padding: 0;
}

.search-box {
    position: relative;
    margin-top: 8px;
    margin-bottom: 4px;
}

.search-box input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 36px;
    transition: all 0.3s ease;
    background-color: white;
}

.search-box input:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
    outline: none;
    background-color: #f8fcff;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: color 0.3s ease;
}

.search-box input:focus + i {
    color: #0099ff;
}

.search-tip {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    margin-bottom: 8px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.search-tip:hover {
    opacity: 1;
}

.currency-select option[style*="display: none"] {
    display: none !important;
}

@keyframes highlightSearch {
    0% {
        background-color: rgba(0, 153, 255, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.currency-select option[data-highlighted="true"] {
    animation: highlightSearch 1s ease;
}

@media (max-width: 768px) {
    .currency-select {
        max-height: 250px;
    }

    .search-box {
        margin-top: 6px;
        margin-bottom: 3px;
    }
    
    .search-box input {
        height: 32px;
        font-size: 13px;
        padding: 6px 28px 6px 10px;
    }
    
    .search-tip {
        font-size: 11px;
        margin-top: 3px;
        margin-bottom: 6px;
    }
    
    .currency-select option {
        padding: 6px;
        font-size: 13px;
    }
    
    .currency-select optgroup {
        padding: 6px 0;
    }

    .currency-select::-webkit-scrollbar {
        width: 6px;
    }
}

/* Destacar moedas principais */
.currency-select optgroup[label="Principais"] {
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(0, 185, 255, 0.05);
}

.currency-select optgroup[label="Principais"] option {
    font-weight: 600;
    background-color: rgba(0, 185, 255, 0.05);
}

@media (max-width: 768px) {
    .search-tip {
        text-align: left;
    }
}

/* Destacar opção USD */
.usd-option {
    font-weight: 700 !important;
    color: var(--primary-color) !important;
}

/* Estilo para a estrela */
.currency-select option[value="USD"]::before {
    content: "★";
    margin-right: 5px;
    color: var(--primary-color);
}

/* Mensagem de boas-vindas */
.welcome-message {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
    border-left: 4px solid var(--primary-color);
}

.welcome-message i {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 3px;
}

.welcome-text {
    flex: 1;
}

.welcome-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.welcome-text p {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.5;
}

.close-welcome {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.5;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: opacity 0.3s;
}

.close-welcome:hover {
    background-color: #2E4369;
}

@media (max-width: 768px) {
    .welcome-message {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px 15px 15px;
    }
    
    .welcome-text h3 {
        margin-top: 5px;
    }
}

/* Melhorias para o gráfico em tema escuro */
@media (prefers-color-scheme: dark) {
    .chart-container.loading::before {
        background-color: rgba(30, 30, 30, 0.8);
    }
    
    .chart-container.loading::after {
        border-color: rgba(255, 255, 255, 0.2);
        border-top-color: var(--primary-color);
    }
    
    .variation-info.positive {
        background-color: rgba(38, 194, 129, 0.2);
    }
    
    .variation-info.negative {
        background-color: rgba(231, 76, 60, 0.2);
    }
}

/* Responsividade para o gráfico */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    .chart-header {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .chart-tabs {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }
    
    .chart-tab {
        flex: 1;
        text-align: center;
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .variation-info {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 250px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-tabs {
        margin-top: 1rem;
    }
    
    .chart-body {
        padding: 1rem;
    }
}

/* Botão de conversão */
.convert-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.convert-btn:hover {
    background-color: #2E4369;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.convert-btn:active {
    transform: translateY(0);
}

.convert-btn i {
    font-size: 0.9rem;
}

/* Responsividade para o botão de conversão */
@media (max-width: 768px) {
    .convert-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Estilos para a seção de traders e investidores */
.traders-section {
    margin-top: 3rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header h2 i {
    margin-right: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Indicadores de mercado */
.market-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.indicator-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.indicator-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.indicator-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.refresh-indicator {
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.refresh-indicator:hover {
    background-color: #2E4369;
    transform: rotate(180deg);
}

.refresh-indicator.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.indicator-body {
    padding: 1rem;
}

.market-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.market-item:last-child {
    border-bottom: none;
}

.market-name {
    font-weight: 600;
    color: var(--text-primary);
}

.market-value {
    color: var(--text-primary);
}

.market-change {
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

.market-change.positive {
    color: var(--success-color);
}

.market-change.negative {
    color: var(--error-color);
}

/* Notícias do mercado */
.market-news {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.news-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
}

.news-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.news-tabs {
    display: flex;
    gap: 1rem;
}

.news-tab {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.news-tab:hover {
    background-color: #2E4369;
    color: white;
}

.news-tab.active {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

.news-container {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.news-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.news-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.news-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.news-item:hover {
    background-color: rgba(46, 67, 105, 0.05);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.news-source {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.news-source i {
    margin-right: 0.3rem;
}

.news-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.news-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.news-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.news-link {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.news-link i {
    margin-left: 0.3rem;
}

.news-link:hover {
    color: #2E4369;
    text-decoration: underline;
}

.news-category {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.news-category.stocks {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.news-category.forex {
    background-color: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.news-category.crypto {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

/* Calendário econômico */
.economic-calendar {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.economic-calendar h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.calendar-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-filter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: white;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-nav {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-nav:hover {
    background-color: #2E4369;
}

#current-date {
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-container {
    max-height: 400px;
    overflow-y: auto;
}

.calendar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.calendar-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.event-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.event-item:hover {
    background-color: rgba(46, 67, 105, 0.05);
}

.event-item:last-child {
    border-bottom: none;
}

.event-time {
    min-width: 80px;
    font-weight: 600;
    color: var(--text-primary);
}

.event-country {
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.event-country img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.event-details {
    flex: 1;
}

.event-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.event-forecast {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.event-previous {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.event-importance {
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.importance-indicator {
    display: flex;
    gap: 2px;
}

.importance-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.importance-dot.active {
    background-color: var(--primary-color);
}

.importance-dot.high.active {
    background-color: var(--error-color);
}

.importance-dot.medium.active {
    background-color: var(--warning-color);
}

.importance-dot.low.active {
    background-color: var(--success-color);
}

/* Ferramentas para traders */
.trader-tools {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
}

.trader-tools h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: #2E4369;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tool-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.tool-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    background-color: #2E4369;
}

/* Responsividade para a seção de traders */
@media (max-width: 768px) {
    .traders-section {
        padding: 1.5rem;
    }
    
    .market-indicators {
        grid-template-columns: 1fr;
    }
    
    .calendar-filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .event-item {
        flex-direction: column;
    }
    
    .event-time, .event-country {
        margin-bottom: 0.5rem;
    }
    
    .event-importance {
        margin-top: 0.5rem;
        justify-content: flex-start;
    }
    
    .tools-container {
        grid-template-columns: 1fr;
    }
}

/* Modo escuro para a seção de traders */
@media (prefers-color-scheme: dark) {
    .indicator-card, .market-news, .economic-calendar, .trader-tools {
        background-color: var(--bg-dark);
    }
    
    .tool-card {
        background-color: var(--card-bg-dark);
    }
    
    .calendar-filter {
        background-color: var(--bg-dark);
        color: var(--text-primary-dark);
    }
}

/* Estilos para calculadoras */
.calculator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.calculator-container {
    background-color: var(--bg-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.calculator-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.close-calculator {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.close-calculator:hover {
    color: var(--primary-color);
}

.calculator-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calculator-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    gap: 15px;
}

.calculator-loading i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Formulários das calculadoras */
.calc-form-group {
    margin-bottom: 16px;
}

.calc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.calc-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.calc-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 185, 255, 0.25);
}

.calc-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 32px;
    transition: all 0.3s ease;
}

.calc-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 185, 255, 0.25);
}

.calc-input-group {
    display: flex;
    gap: 10px;
}

.calc-input-group .calc-input {
    flex: 1;
}

.calc-input-group .calc-select {
    width: 100px;
}

.calc-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.calc-submit-btn:hover {
    background-color: #2E4369;
}

/* Estilos para os botões de rádio */
.calc-radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.calc-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.calc-radio input {
    margin-right: 5px;
}

/* Resultados das calculadoras */
.calculator-result {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.calc-results {
    margin-top: 25px;
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.calc-results h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.calc-result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}

.calc-result-item:last-child {
    border-bottom: none;
}

.calc-result-item span {
    color: var(--text-secondary);
}

.calc-result-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

.calc-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: rgba(0, 185, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
}

.calc-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    gap: 15px;
}

/* Seletor de tipo de posição */
.position-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.position-type-option {
    flex: 1;
    cursor: pointer;
}

.position-type-option input {
    display: none;
}

.position-type-btn {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.position-type-btn.buy {
    color: var(--success-color);
}

.position-type-btn.sell {
    color: var(--error-color);
}

.position-type-option input:checked + .position-type-btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.position-type-option input:checked + .position-type-btn.buy {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.position-type-option input:checked + .position-type-btn.sell {
    background-color: var(--error-color);
    border-color: var(--error-color);
}

/* Responsividade para calculadoras */
@media (max-width: 768px) {
    .calculator-container {
        width: 95%;
    }
    
    .calc-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .calc-input-group .calc-select {
        width: 100%;
    }
}

/* Seção de Câmbio Comercial em Tempo Real */
.commercial-exchange-section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.commercial-exchange-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 1rem;
}

.commercial-exchange-section .section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.commercial-exchange-section .section-header h2 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.commercial-exchange-section .refresh-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.commercial-exchange-section .last-update-time {
    font-size: 0.85rem;
    color: #666;
}

.commercial-exchange-section .refresh-btn {
    background-color: transparent;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.commercial-exchange-section .refresh-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.commercial-exchange-section .refresh-btn.loading i {
    animation: spin 1s linear infinite;
}

.exchange-rates-container {
    margin-bottom: 1rem;
}

.exchange-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.exchange-rate-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
    border-left: 4px solid #3498db;
    position: relative;
    overflow: hidden;
}

.exchange-rate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.exchange-rate-card .currency-flag {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0.5rem;
    opacity: 0.2;
}

.exchange-rate-card .currency-code {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.exchange-rate-card .currency-name {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exchange-rate-card .rate-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.exchange-rate-card .rate-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.exchange-rate-card .rate-change.positive {
    color: #27ae60;
}

.exchange-rate-card .rate-change.negative {
    color: #e74c3c;
}

.exchange-rate-card .rate-change.neutral {
    color: #7f8c8d;
}

.exchange-rate-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #7f8c8d;
    text-align: center;
}

.exchange-rate-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.exchange-info-box {
    background-color: #f1f9fe;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exchange-info-box i {
    font-size: 1.5rem;
    color: #3498db;
}

.exchange-info-box p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

/* Animação de atualização */
@keyframes highlight-update {
    0% {
        background-color: rgba(52, 152, 219, 0.2);
    }
    100% {
        background-color: #f8f9fa;
    }
}

.exchange-rate-card.updated {
    animation: highlight-update 1.5s ease;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .commercial-exchange-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .commercial-exchange-section .refresh-control {
        width: 100%;
        justify-content: space-between;
    }
    
    .exchange-rates-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Estilos para Notícias do Mercado em Tempo Real */
.news-item.updated {
    animation: highlight-update 1.5s ease;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.news-category {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.category-stocks {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.category-forex {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.category-crypto {
    background-color: #fff8e1;
    color: #ff6f00;
}

.category-commodities {
    background-color: #ffebee;
    color: #b71c1c;
}

.category-economy {
    background-color: #e8eaf6;
    color: #303f9f;
}

.category-general {
    background-color: #f5f5f5;
    color: #424242;
}

.news-time {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Estilos para Calendário Econômico em Tempo Real */
.calendar-header {
    display: grid;
    grid-template-columns: 0.6fr 0.6fr 2fr 0.8fr 0.8fr 0.8fr 0.8fr;
    background-color: #f8f9fa;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.calendar-event {
    display: grid;
    grid-template-columns: 0.6fr 0.6fr 2fr 0.8fr 0.8fr 0.8fr 0.8fr;
    padding: 12px 15px;
    font-size: 0.875rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.calendar-event:last-child {
    border-bottom: none;
}

.calendar-event:hover {
    background-color: #f8f9fa;
}

.calendar-event.updated {
    animation: highlight-update 1.5s ease;
}

.event-time, .event-country, .event-name, .event-impact, .event-actual, .event-forecast, .event-previous {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-country img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 5px;
}

.event-impact {
    display: flex;
    align-items: center;
}

.impact-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.impact-high {
    background-color: #dc3545;
}

.impact-medium {
    background-color: #ffc107;
}

.impact-low {
    background-color: #28a745;
}

.impact-text {
    font-size: 0.75rem;
    text-transform: capitalize;
}

.value-better {
    color: #28a745;
    font-weight: 600;
}

.value-worse {
    color: #dc3545;
    font-weight: 600;
}

.value-neutral {
    color: #6c757d;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .calendar-header, .calendar-event {
        grid-template-columns: 0.7fr 0.7fr 2fr 0.8fr;
    }
    
    .event-forecast, .event-previous {
        display: none;
    }
    
    .calendar-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-selector {
        margin-top: 10px;
    }
    
    .news-tabs {
        padding-bottom: 10px;
    }
    
    .news-tab {
        padding: 5px 10px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 576px) {
    .calendar-header, .calendar-event {
        grid-template-columns: 0.8fr 0.8fr 2.4fr;
    }
    
    .event-impact, .event-actual {
        display: none;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-time {
        margin-top: 5px;
    }
}

.search-box {
    position: relative;
    margin-top: 8px;
    margin-bottom: 4px;
}

.search-box input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 36px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
    outline: none;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: color 0.3s ease;
}

.search-box input:focus + i {
    color: #0099ff;
}

.search-tip {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    margin-bottom: 8px;
}

.currency-select option[style*="display: none"] {
    display: none !important;
}

@media (max-width: 768px) {
    .search-box {
        margin-top: 6px;
        margin-bottom: 3px;
    }
    
    .search-box input {
        height: 32px;
        font-size: 13px;
        padding: 6px 28px 6px 10px;
    }
    
    .search-tip {
        font-size: 11px;
        margin-top: 3px;
        margin-bottom: 6px;
    }
    
    .currency-select option {
        padding: 6px;
        font-size: 13px;
    }
    
    .currency-select optgroup {
        padding: 6px 0;
    }
}

.select-with-icon {
    position: relative;
    margin-bottom: 1rem;
}

.select-with-icon .search-box {
    position: relative;
    margin-bottom: 0.5rem;
}

.select-with-icon .search-box input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 36px;
    transition: all 0.3s ease;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-with-icon .search-box input:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
    outline: none;
    background-color: #f8fcff;
}

.select-with-icon .search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: color 0.3s ease;
    pointer-events: none;
}

.select-with-icon .search-box input:focus + i {
    color: #0099ff;
}

.select-with-icon .currency-select {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    transition: all 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0099ff #f0f0f0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.select-with-icon .currency-select:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
    outline: none;
}

.select-with-icon .currency-select::-webkit-scrollbar {
    width: 8px;
}

.select-with-icon .currency-select::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.select-with-icon .currency-select::-webkit-scrollbar-thumb {
    background: #0099ff;
    border-radius: 4px;
}

.select-with-icon .currency-select::-webkit-scrollbar-thumb:hover {
    background: #007acc;
}

.select-with-icon .currency-select option {
    padding: 8px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.select-with-icon .currency-select option:checked {
    background-color: #0099ff;
    color: white;
}

.select-with-icon .currency-select option:hover {
    background-color: #e6f3ff;
}

.select-with-icon .currency-select optgroup {
    font-weight: 600;
    color: #333;
    padding: 8px 0;
    transition: opacity 0.3s ease;
}

.select-with-icon .currency-select optgroup[style*="display: none"] {
    opacity: 0;
    height: 0;
    padding: 0;
}

.search-tip {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    margin-bottom: 8px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.search-tip:hover {
    opacity: 1;
}

.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@media (hover: none) and (pointer: coarse) {
    .search-box input:focus,
    .currency-select:focus {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        z-index: 1001;
        background-color: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    }

    .currency-select:focus {
        max-height: 60vh;
        overflow-y: auto;
        z-index: 1002;
    }
}

@media (prefers-reduced-motion: reduce) {
    .search-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: rgba(0, 0, 0, 0.7);
    }
}

@supports not (backdrop-filter: blur(5px)) {
    .search-overlay {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

.dollar-today-title {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dollar-today-title h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.current-rate {
    font-size: 1.5rem;
    color: #0066cc;
    font-weight: 500;
    margin-top: 0.5rem;
}

.last-update-time {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .dollar-today-title h2 {
        font-size: 1.5rem;
    }
    
    .current-rate {
        font-size: 1.3rem;
    }
}

.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.input-row .input-group {
    flex: 1;
    min-width: 0;
}

.input-row .input-group label {
    display: block;
    margin-bottom: 8px;
}

.input-row .input-with-icon {
    width: 100%;
}

@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
        gap: 15px;
    }
} 