  /* Estilos Globais */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #2e4172;
            margin: 0;
            color: #333;
            
        }
        
        .container-principal {
            background-color: #ffab00;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
            width: 320px; /* Aumentei um pouquinho a largura */
            position: relative;
        }

        /* Botão de Alternância (Toggle) */
        .btn-alternar {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            background-color: #10379a;
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .btn-alternar:hover { background-color: #0d2972; }

        /* Ocultar painéis */
        .oculto { display: none !important; }

        /* --- Estilos da Calculadora --- */
        #visor {
            width: 100%;
            height: 60px;
            background-color: #e0fdff;
            border: none;
            border-radius: 5px;
            font-size: 28px;
            text-align: right;
            margin-bottom: 15px;
            box-sizing: border-box;
            padding: 10px;
            color: #333;
        }
        
        .botoes {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            
        }
        
        .botoes button {
            padding: 15px;
            font-size: 25px;
            font-weight: bold;
            border: none;
            border-radius: 5px;
            background-color: #f8f9fa;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
            color: #333;
        }
        
        .botoes button:hover { background-color: #e2e6ea; }
        .botoes button:active { transform: scale(0.95); }
        .operador { background-color: #e56a00 !important; color: white !important; font-weight: bold; }
        .operador:hover { background-color: #b15504!important; }
        .igual { background-color: #01858b !important; color: white !important; font-weight: bold; }
        .igual:hover { background-color: #236467 !important; }
        .limpar { grid-column: span 4; background-color: #01858b !important; color: white !important; font-weight: bold; }
        .limpar:hover { background-color: #236467 !important; }

        /* --- Estilos do Histórico --- */
        .historico-container {
            margin-top: 15px;
            background-color: #f1f2f6;
            border-radius: 8px;
            padding: 10px;
            height: 220px;
            overflow-y: auto; /* Permite rolar a lista se ficar muito grande */
            box-sizing: border-box;
        }

        .historico-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #ced6e0;
            padding-bottom: 5px;
            margin-bottom: 8px;
            font-size: 14px;
            font-weight: bold;
            color: #2f3542;
        }

        .btn-limpar-historico {
            background: none;
            border: none;
            color: #ff4757;
            cursor: pointer;
            font-size: 12px;
            font-weight: bold;
            padding: 0;
        }

        .btn-limpar-historico:hover { text-decoration: underline; }

        #lista-historico {
            list-style-type: none;
            padding: 0;
            margin: 0;
            font-size: 14px;
        }

        #lista-historico li {
            padding: 4px 0;
            border-bottom: 1px dashed #dfe4ea;
            color: #57606f;
            text-align: right; /* Alinha o histórico à direita, como a calculadora */
        }

        /* --- Estilos do Conversor de Moedas --- */
        .painel-conversor {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        .input-grupo {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .input-grupo label {
            font-size: 14px;
            font-weight: bold;
            color: #555;
        }
        .painel-conversor input, .painel-conversor select {
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 16px;
        }
        .btn-converter {
            padding: 12px;
            background-color: #0d2970;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
        }
        .btn-converter:hover { background-color: #0d2970; }
        #resultado-conversao {
            text-align: center;
            font-size: 24px;
            font-weight: bold;
            color: #222f3e;
            margin-top: 10px;
            min-height: 30px;
        }